datapath: internal-dev: set IFF_NO_QUEUE
authorPravin B Shelar <pshelar@ovn.org>
Sun, 17 Jul 2016 16:52:11 +0000 (09:52 -0700)
committerPravin B Shelar <pshelar@ovn.org>
Sun, 17 Jul 2016 17:25:09 +0000 (10:25 -0700)
Introduced by upstream commit 4272cc51a6d ("openvswitch: Convert to
using IFF_NO_QUEUE").

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Acked-by: Jesse Gross <jesse@kernel.org>
datapath/linux/compat/include/linux/netdevice.h
datapath/vport-internal_dev.c

index 235851b..f066e91 100644 (file)
@@ -281,4 +281,10 @@ static inline void netdev_reset_rx_headroom(struct net_device *dev)
 
 #endif
 
+#ifdef IFF_NO_QUEUE
+#define HAVE_IFF_NO_QUEUE
+#else
+#define IFF_NO_QUEUE 0
+#endif
+
 #endif /* __LINUX_NETDEVICE_WRAPPER_H */
index 794f480..198bae6 100644 (file)
@@ -169,11 +169,14 @@ static void do_setup(struct net_device *netdev)
 
        netdev->priv_flags &= ~IFF_TX_SKB_SHARING;
        netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_OPENVSWITCH |
-                             IFF_PHONY_HEADROOM;
+                             IFF_PHONY_HEADROOM | IFF_NO_QUEUE;
        netdev->destructor = internal_dev_destructor;
        netdev->ethtool_ops = &internal_dev_ethtool_ops;
        netdev->rtnl_link_ops = &internal_dev_link_ops;
+
+#ifndef HAVE_IFF_NO_QUEUE
        netdev->tx_queue_len = 0;
+#endif
 
        netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
                           NETIF_F_HIGHDMA | NETIF_F_HW_CSUM |