diff options
author | Pravin B Shelar <pshelar@ovn.org> | 2016-08-11 14:07:18 -0700 |
---|---|---|
committer | Pravin B Shelar <pshelar@ovn.org> | 2016-08-11 14:30:38 -0700 |
commit | 51f4f3f8917aacff1600fea38fc7ffbeae59101d (patch) | |
tree | c15f9a07f549b83de0ffac1672ef2546da9bd898 | |
parent | edf6cd31d58e914f26f9bc996c1a963169992938 (diff) | |
download | openvswitch-51f4f3f8917aacff1600fea38fc7ffbeae59101d.tar.gz |
datapath: compat: keep skb encapsulation zero on older kernel.
When using compat GSO there is no need to turn on skb
encapsulation bit since OVS does not use any tunnel GSO
functionality from the networking stack.
Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
-rw-r--r-- | datapath/linux/compat/gso.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/datapath/linux/compat/gso.c b/datapath/linux/compat/gso.c index 10412c0c9..89df07fca 100644 --- a/datapath/linux/compat/gso.c +++ b/datapath/linux/compat/gso.c @@ -187,8 +187,6 @@ static struct sk_buff *tnl_skb_gso_segment(struct sk_buff *skb, * make copy of it to restore it back. */ memcpy(cb, skb->cb, sizeof(cb)); - skb->encapsulation = 0; - /* We are handling offloads by segmenting l3 packet, so * no need to call OVS compat segmentation function. */ @@ -238,6 +236,9 @@ static int output_ip(struct sk_buff *skb) int rpl_ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb) { + /* This bit set can confuse some drivers on old kernel. */ + skb->encapsulation = 0; + if (!OVS_GSO_CB(skb)->fix_segment) return output_ip(skb); @@ -281,6 +282,8 @@ static int output_ipv6(struct sk_buff *skb) int rpl_ip6_local_out(struct net *net, struct sock *sk, struct sk_buff *skb) { + /* This bit set can confuse some drivers on old kernel. */ + skb->encapsulation = 0; if (!OVS_GSO_CB(skb)->fix_segment) return output_ipv6(skb); |