On kernels 2.6.37 and above IFF_OVS_DATAPATH has a unique value upstream,
on 2.6.36 we define it to be IFF_BRIDGE_PORT and below to 0. There isn't
really a good reason to use IFF_BRIDGE_PORT on 2.6.36 (and it's perhaps
bad because it's checked in a few places and we don't want those checks
to trigger on just this kernel) and it makes it difficult to know what
value we should use in the face of backporting. Therefore, this just
uses 0 on the places where we don't have a real value.
Reported-by: Benoit ML <ben42ml@gmail.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
#define IFF_TX_SKB_SHARING 0
#endif
-#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,36)
-#define IFF_OVS_DATAPATH IFF_BRIDGE_PORT
-#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
-#define IFF_OVS_DATAPATH 0 /* no-op flag */
+#ifndef IFF_OVS_DATAPATH
+#define IFF_OVS_DATAPATH 0
#endif
#endif
struct vport *ovs_netdev_get_vport(struct net_device *dev)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
-#if IFF_BRIDGE_PORT != IFF_OVS_DATAPATH
+#if IFF_OVS_DATAPATH != 0
if (likely(dev->priv_flags & IFF_OVS_DATAPATH))
#else
if (likely(rcu_access_pointer(dev->rx_handler) == netdev_frame_hook))