Add support for Linux kernel 3.9.

Signed-off-by: Kyle Mestery <kmest...@cisco.com>
CC: Pravin B Shelar <pshelar at nicira.com>
---
 datapath/datapath.c     | 4 ++--
 datapath/vport-netdev.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/vport-netdev.c b/datapath/vport-netdev.c
index 06598fa..0594db0 100644
--- a/datapath/vport-netdev.c
+++ b/datapath/vport-netdev.c
@@ -301,6 +301,9 @@ static int netdev_send(struct vport *vport, struct sk_buff 
*skb)
 
                if (netif_needs_gso(skb, features)) {
                        struct sk_buff *nskb;
+                       char cb[sizeof(skb->cb)];
+
+                       memcpy(cb, skb->cb, sizeof(cb));
 
                        nskb = skb_gso_segment(skb, features);
                        if (!nskb) {
@@ -316,6 +319,10 @@ static int netdev_send(struct vport *vport, struct sk_buff 
*skb)
                                goto drop;
                        consume_skb(skb);
                        skb = nskb;
+                       while (nskb) {
+                               memcpy(nskb->cb, cb, sizeof(cb));
+                               nskb = nskb->next;
+                       }
 
                        len = 0;
                        do {
-- 
1.8.3.1

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

Reply via email to