]> git.karo-electronics.de Git - linux-beck.git/commitdiff
netpoll: remove IFF_IN_NETPOLL flag
authorAmerigo Wang <amwang@redhat.com>
Thu, 17 Feb 2011 23:43:33 +0000 (23:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Feb 2011 00:11:51 +0000 (16:11 -0800)
V4: rebase to net-next-2.6

This patch removes the flag IFF_IN_NETPOLL, we don't need it any more since
we have netpoll_tx_running() now.

Signed-off-by: WANG Cong <amwang@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bonding.h
include/linux/if.h
net/core/netpoll.c

index 2ed662464cacd59fbc0ad243e8a90e2c36c8f9a6..c75126ddc646323be172753b97c279a9d1e560ef 100644 (file)
@@ -423,11 +423,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
 {
        skb->dev = slave_dev;
        skb->priority = 1;
-       if (unlikely(netpoll_tx_running(slave_dev))) {
-               slave_dev->priv_flags |= IFF_IN_NETPOLL;
+       if (unlikely(netpoll_tx_running(slave_dev)))
                bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
-               slave_dev->priv_flags &= ~IFF_IN_NETPOLL;
-       } else
+       else
                dev_queue_xmit(skb);
 
        return 0;
index 0a3e00b220b7347816cec8a7d069cf7886a8e872..a401b8df84f01a111d3d3623e805ba4f47b9e641 100644 (file)
@@ -133,7 +133,7 @@ static inline void unblock_netpoll_tx(void)
 
 static inline int is_netpoll_tx_blocked(struct net_device *dev)
 {
-       if (unlikely(dev->priv_flags & IFF_IN_NETPOLL))
+       if (unlikely(netpoll_tx_running(dev)))
                return atomic_read(&netpoll_block_tx);
        return 0;
 }
index 123959927745b7934cacea3e1aacf5c6303bcb1c..3bc63e6a02f7390909cd128fbd1fceb4c41c7df7 100644 (file)
                                         * release skb->dst
                                         */
 #define IFF_DONT_BRIDGE 0x800          /* disallow bridging this ether dev */
-#define IFF_IN_NETPOLL 0x1000          /* whether we are processing netpoll */
-#define IFF_DISABLE_NETPOLL    0x2000  /* disable netpoll at run-time */
-#define IFF_MACVLAN_PORT       0x4000  /* device used as macvlan port */
-#define IFF_BRIDGE_PORT        0x8000          /* device used as bridge port */
-#define IFF_OVS_DATAPATH       0x10000 /* device used as Open vSwitch
+#define IFF_DISABLE_NETPOLL    0x1000  /* disable netpoll at run-time */
+#define IFF_MACVLAN_PORT       0x2000  /* device used as macvlan port */
+#define IFF_BRIDGE_PORT        0x4000          /* device used as bridge port */
+#define IFF_OVS_DATAPATH       0x8000  /* device used as Open vSwitch
                                         * datapath port */
 
 #define IF_GET_IFACE   0x0001          /* for querying only */
index 02dc2cbcbe8652a0dd9e3b514cc96583da27842d..f68e6949294ef3dc0dd83c3a25d3a83b3b625212 100644 (file)
@@ -313,9 +313,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
                     tries > 0; --tries) {
                        if (__netif_tx_trylock(txq)) {
                                if (!netif_tx_queue_stopped(txq)) {
-                                       dev->priv_flags |= IFF_IN_NETPOLL;
                                        status = ops->ndo_start_xmit(skb, dev);
-                                       dev->priv_flags &= ~IFF_IN_NETPOLL;
                                        if (status == NETDEV_TX_OK)
                                                txq_trans_update(txq);
                                }