aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2013-02-14 09:02:41 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-15 15:17:11 -0500
commit68c331631143f5f039baac99a650e0b9e1ea02b6 (patch)
treec69d73c5599aab5e92a8c99bc5343c9fc9ffbbd8 /net/ipv6
parent05e8ef4ab2d8087d360e814d14da20b9f7fb2283 (diff)
v4 GRE: Add TCP segmentation offload for GRE
Following patch adds GRE protocol offload handler so that skb_gso_segment() can segment GRE packets. SKB GSO CB is added to keep track of total header length so that skb_segment can push entire header. e.g. in case of GRE, skb_segment need to push inner and outer headers to every segment. New NETIF_F_GRE_GSO feature is added for devices which support HW GRE TSO offload. Currently none of devices support it therefore GRE GSO always fall backs to software GSO. [ Compute pkt_len before ip_local_out() invocation. -DaveM ] Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/ip6_offload.c1
-rw-r--r--net/ipv6/udp_offload.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ip6_offload.c b/net/ipv6/ip6_offload.c
index f26f0da7f095..8234c1dcdf72 100644
--- a/net/ipv6/ip6_offload.c
+++ b/net/ipv6/ip6_offload.c
@@ -99,6 +99,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
99 ~(SKB_GSO_UDP | 99 ~(SKB_GSO_UDP |
100 SKB_GSO_DODGY | 100 SKB_GSO_DODGY |
101 SKB_GSO_TCP_ECN | 101 SKB_GSO_TCP_ECN |
102 SKB_GSO_GRE |
102 SKB_GSO_TCPV6 | 103 SKB_GSO_TCPV6 |
103 0))) 104 0)))
104 goto out; 105 goto out;
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
index 0c8934a317c2..cf05cf073c51 100644
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -56,7 +56,8 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
56 /* Packet is from an untrusted source, reset gso_segs. */ 56 /* Packet is from an untrusted source, reset gso_segs. */
57 int type = skb_shinfo(skb)->gso_type; 57 int type = skb_shinfo(skb)->gso_type;
58 58
59 if (unlikely(type & ~(SKB_GSO_UDP | SKB_GSO_DODGY) || 59 if (unlikely(type & ~(SKB_GSO_UDP | SKB_GSO_DODGY |
60 SKB_GSO_GRE) ||
60 !(type & (SKB_GSO_UDP)))) 61 !(type & (SKB_GSO_UDP))))
61 goto out; 62 goto out;
62 63