Skip to content

Commit

Permalink
GRE: Add support for GRO/GSO of IPv6 GRE traffic
Browse files Browse the repository at this point in the history
Since GRE doesn't really care about L3 protocol we can support IPv4 and
IPv6 using the same offloads.  With that being the case we can add a call
to register the offloads for IPv6 as a part of our GRE offload
initialization.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Apr 16, 2016
1 parent ac4eb00 commit e0c2096
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion net/ipv4/gre_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,18 @@ static const struct net_offload gre_offload = {

static int __init gre_offload_init(void)
{
return inet_add_offload(&gre_offload, IPPROTO_GRE);
int err;

err = inet_add_offload(&gre_offload, IPPROTO_GRE);
#if IS_ENABLED(CONFIG_IPV6)
if (err)
return err;

err = inet6_add_offload(&gre_offload, IPPROTO_GRE);
if (err)
inet_del_offload(&gre_offload, IPPROTO_GRE);
#endif

return err;
}
device_initcall(gre_offload_init);

0 comments on commit e0c2096

Please sign in to comment.