Ensure that in tunnel.c:handle_offloads() we save off skb->cb before
calling __skb_gso_segment() and restore it after the return.

Signed-off-by: Pravin B Shelar <pshelar at nicira.com>
Signed-off-by: Kyle Mestery <kmest...@cisco.com>
---
Changes in v2:
* No longer save skb->sb in vport_netdev.c:netdev_send().
---
 datapath/datapath.c | 4 ++--
 datapath/tunnel.c   | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 4330ce3..e5e0616 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -63,8 +63,8 @@
 #include "vport-netdev.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) || \
-    LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-#error Kernels before 2.6.18 or after 3.8 are not supported by this version of 
Open vSwitch.
+    LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+#error Kernels before 2.6.18 or after 3.9 are not supported by this version of 
Open vSwitch.
 #endif
 
 #define REHASH_FLOW_INTERVAL (10 * 60 * HZ)
diff --git a/datapath/tunnel.c b/datapath/tunnel.c
index ef46a69..bd63da5 100644
--- a/datapath/tunnel.c
+++ b/datapath/tunnel.c
@@ -144,6 +144,9 @@ static struct sk_buff *handle_offloads(struct sk_buff *skb)
 
        if (skb_is_gso(skb)) {
                struct sk_buff *nskb;
+               char cb[sizeof(skb->cb)];
+
+               memcpy(cb, skb->cb, sizeof(cb));
 
                nskb = __skb_gso_segment(skb, 0, false);
                if (IS_ERR(nskb)) {
@@ -153,6 +156,10 @@ static struct sk_buff *handle_offloads(struct sk_buff *skb)
 
                consume_skb(skb);
                skb = nskb;
+               while (nskb) {
+                       memcpy(nskb->cb, cb, sizeof(cb));
+                       nskb = nskb->next;
+               }
        } else if (get_ip_summed(skb) == OVS_CSUM_PARTIAL) {
                /* Pages aren't locked and could change at any time.
                 * If this happens after we compute the checksum, the
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to