]> git.proxmox.com Git - pve-kernel-2.6.32.git/commitdiff
openvswitch: fix ovs_netdev_get_vport
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 15 Sep 2015 11:54:30 +0000 (13:54 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 15 Sep 2015 11:54:30 +0000 (13:54 +0200)
ovspatches/ovs-compile.patch

index a5adeb712450c6c819916b8e8f471ea67a31d109..e0e37988092be9bbbe211029b64e570cd60e5962 100644 (file)
@@ -1,7 +1,7 @@
 Index: new/acinclude.m4
 ===================================================================
 --- new.orig/acinclude.m4      2015-06-18 21:32:47.000000000 +0200
-+++ new/acinclude.m4   2015-09-14 10:55:29.000000000 +0200
++++ new/acinclude.m4   2015-09-15 12:14:56.000000000 +0200
 @@ -291,6 +291,7 @@
    OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [can_checksum_protocol])
    OVS_GREP_IFELSE([$KSRC/include/linux/netdevice.h], [netdev_features_t])
@@ -22,7 +22,7 @@ Index: new/acinclude.m4
 Index: new/datapath/linux/compat/net_namespace.c
 ===================================================================
 --- new.orig/datapath/linux/compat/net_namespace.c     2015-06-18 21:32:47.000000000 +0200
-+++ new/datapath/linux/compat/net_namespace.c  2015-09-14 10:55:29.000000000 +0200
++++ new/datapath/linux/compat/net_namespace.c  2015-09-15 12:14:56.000000000 +0200
 @@ -3,7 +3,7 @@
  #include <net/net_namespace.h>
  #include <net/netns/generic.h>
@@ -35,7 +35,7 @@ Index: new/datapath/linux/compat/net_namespace.c
 Index: new/datapath/linux/compat/include/net/net_namespace.h
 ===================================================================
 --- new.orig/datapath/linux/compat/include/net/net_namespace.h 2015-06-18 21:32:47.000000000 +0200
-+++ new/datapath/linux/compat/include/net/net_namespace.h      2015-09-14 10:55:29.000000000 +0200
++++ new/datapath/linux/compat/include/net/net_namespace.h      2015-09-15 12:14:56.000000000 +0200
 @@ -3,7 +3,7 @@
  
  #include_next <net/net_namespace.h>
@@ -48,7 +48,7 @@ Index: new/datapath/linux/compat/include/net/net_namespace.h
 Index: new/datapath/linux/compat/dev-openvswitch.c
 ===================================================================
 --- new.orig/datapath/linux/compat/dev-openvswitch.c   2015-06-18 21:32:47.000000000 +0200
-+++ new/datapath/linux/compat/dev-openvswitch.c        2015-09-14 10:55:29.000000000 +0200
++++ new/datapath/linux/compat/dev-openvswitch.c        2015-09-15 12:14:56.000000000 +0200
 @@ -33,8 +33,7 @@
  
  #endif /* HAVE_DEV_DISABLE_LRO */
@@ -62,7 +62,7 @@ Index: new/datapath/linux/compat/dev-openvswitch.c
 Index: new/datapath/linux/compat/include/linux/netdevice.h
 ===================================================================
 --- new.orig/datapath/linux/compat/include/linux/netdevice.h   2015-06-18 21:32:47.000000000 +0200
-+++ new/datapath/linux/compat/include/linux/netdevice.h        2015-09-14 10:55:29.000000000 +0200
++++ new/datapath/linux/compat/include/linux/netdevice.h        2015-09-15 12:14:56.000000000 +0200
 @@ -22,9 +22,7 @@
  extern void dev_disable_lro(struct net_device *dev);
  #endif
@@ -77,7 +77,7 @@ Index: new/datapath/linux/compat/include/linux/netdevice.h
 Index: new/datapath/vport-netdev.c
 ===================================================================
 --- new.orig/datapath/vport-netdev.c   2015-06-18 21:32:47.000000000 +0200
-+++ new/datapath/vport-netdev.c        2015-09-14 11:01:54.000000000 +0200
++++ new/datapath/vport-netdev.c        2015-09-15 13:39:03.000000000 +0200
 @@ -36,7 +36,7 @@
  
  static void netdev_port_receive(struct vport *vport, struct sk_buff *skb);
@@ -87,7 +87,26 @@ Index: new/datapath/vport-netdev.c
  /* Called with rcu_read_lock and bottom-halves disabled. */
  static rx_handler_result_t netdev_frame_hook(struct sk_buff **pskb)
  {
-@@ -280,8 +280,7 @@
+@@ -253,8 +253,7 @@
+ /* Returns null if this device is not attached to a datapath. */
+ struct vport *ovs_netdev_get_vport(struct net_device *dev)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) || \
+-    defined HAVE_RHEL_OVS_HOOK
++#if 1
+ #if IFF_OVS_DATAPATH != 0
+       if (likely(dev->priv_flags & IFF_OVS_DATAPATH))
+ #else
+@@ -263,7 +262,7 @@
+ #ifdef HAVE_RHEL_OVS_HOOK
+               return (struct vport *)rcu_dereference_rtnl(dev->ax25_ptr);
+ #else
+-              return (struct vport *)rcu_dereference_rtnl(dev->rx_handler_data);
++        return (struct vport *)rcu_dereference_rtnl(netdev_extended(dev)->rx_handler_data);
+ #endif
+       else
+               return NULL;
+@@ -280,8 +279,7 @@
        .send           = netdev_send,
  };