[ovs-dev] [PATCH 03/24] datapath: compat: Set OVS-GSO segment handler only for GSO packet.

Pravin B Shelar pshelar at ovn.org
Wed Jul 13 05:23:54 UTC 2016


This simplify OVS compat code where non gso packet can be directly sent
to network stack.

Signed-off-by: Pravin B Shelar <pshelar at ovn.org>
---
 datapath/linux/compat/ip_tunnels_core.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/datapath/linux/compat/ip_tunnels_core.c b/datapath/linux/compat/ip_tunnels_core.c
index 65b5aea..3964c4b 100644
--- a/datapath/linux/compat/ip_tunnels_core.c
+++ b/datapath/linux/compat/ip_tunnels_core.c
@@ -104,17 +104,18 @@ int ovs_iptunnel_handle_offloads(struct sk_buff *skb,
 		goto error;
 	}
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
-	if (gso_type_mask)
-		fix_segment = NULL;
-
-	OVS_GSO_CB(skb)->fix_segment = fix_segment;
-#endif
 	if (skb_is_gso(skb)) {
 		err = skb_unclone(skb, GFP_ATOMIC);
 		if (unlikely(err))
 			goto error;
 		skb_shinfo(skb)->gso_type |= gso_type_mask;
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
+		if (gso_type_mask)
+			fix_segment = NULL;
+
+		OVS_GSO_CB(skb)->fix_segment = fix_segment;
+#endif
 		return 0;
 	}
 
-- 
1.9.1




More information about the dev mailing list