summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Duyck <aduyck@mirantis.com>2016-04-14 15:33:58 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-16 19:09:13 -0400
commite0c20967c8a653d0213238621381e224d8f065fc (patch)
tree61d362585fafdd68559e36c894e6eddd8f9311f3 /net
parentac4eb009e4776e9ef4c0484865c2f5a3786eecae (diff)
downloadblackbird-op-linux-e0c20967c8a653d0213238621381e224d8f065fc.tar.gz
blackbird-op-linux-e0c20967c8a653d0213238621381e224d8f065fc.zip
GRE: Add support for GRO/GSO of IPv6 GRE traffic
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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/gre_offload.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index 20557f211408..e88190a8699a 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -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);
OpenPOWER on IntegriCloud