diff mbox

[ovs-dev,v2] datapath: compat: keep skb encapsulation zero on older kernel.

Message ID 1470949934-4167-1-git-send-email-pshelar@ovn.org
State Accepted
Headers show

Commit Message

Pravin Shelar Aug. 11, 2016, 9:12 p.m. UTC
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>
---
 datapath/linux/compat/gso.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Jesse Gross Aug. 11, 2016, 9:23 p.m. UTC | #1
On Thu, Aug 11, 2016 at 2:12 PM, Pravin B Shelar <pshelar@ovn.org> wrote:
> 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>

And, yes, I'm aware that we've now gone full circle on where to put
clearing this flag...
Pravin Shelar Aug. 11, 2016, 9:32 p.m. UTC | #2
On Thu, Aug 11, 2016 at 2:23 PM, Jesse Gross <jesse@kernel.org> wrote:
> On Thu, Aug 11, 2016 at 2:12 PM, Pravin B Shelar <pshelar@ovn.org> wrote:
>> 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>
>
Thanks. I pushed it to master.

> And, yes, I'm aware that we've now gone full circle on where to put
> clearing this flag...

Yes, I hope it stops here. :)
diff mbox

Patch

diff --git a/datapath/linux/compat/gso.c b/datapath/linux/compat/gso.c
index 10412c0..89df07f 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);