aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/bonding/bond_main.c6
-rw-r--r--drivers/net/bonding/bonding.h2
-rw-r--r--include/linux/if.h9
-rw-r--r--net/core/netpoll.c2
4 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2ed662464cac..c75126ddc646 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -423,11 +423,9 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
423{ 423{
424 skb->dev = slave_dev; 424 skb->dev = slave_dev;
425 skb->priority = 1; 425 skb->priority = 1;
426 if (unlikely(netpoll_tx_running(slave_dev))) { 426 if (unlikely(netpoll_tx_running(slave_dev)))
427 slave_dev->priv_flags |= IFF_IN_NETPOLL;
428 bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb); 427 bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb);
429 slave_dev->priv_flags &= ~IFF_IN_NETPOLL; 428 else
430 } else
431 dev_queue_xmit(skb); 429 dev_queue_xmit(skb);
432 430
433 return 0; 431 return 0;
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 0a3e00b220b7..a401b8df84f0 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -133,7 +133,7 @@ static inline void unblock_netpoll_tx(void)
133 133
134static inline int is_netpoll_tx_blocked(struct net_device *dev) 134static inline int is_netpoll_tx_blocked(struct net_device *dev)
135{ 135{
136 if (unlikely(dev->priv_flags & IFF_IN_NETPOLL)) 136 if (unlikely(netpoll_tx_running(dev)))
137 return atomic_read(&netpoll_block_tx); 137 return atomic_read(&netpoll_block_tx);
138 return 0; 138 return 0;
139} 139}
diff --git a/include/linux/if.h b/include/linux/if.h
index 123959927745..3bc63e6a02f7 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -71,11 +71,10 @@
71 * release skb->dst 71 * release skb->dst
72 */ 72 */
73#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */ 73#define IFF_DONT_BRIDGE 0x800 /* disallow bridging this ether dev */
74#define IFF_IN_NETPOLL 0x1000 /* whether we are processing netpoll */ 74#define IFF_DISABLE_NETPOLL 0x1000 /* disable netpoll at run-time */
75#define IFF_DISABLE_NETPOLL 0x2000 /* disable netpoll at run-time */ 75#define IFF_MACVLAN_PORT 0x2000 /* device used as macvlan port */
76#define IFF_MACVLAN_PORT 0x4000 /* device used as macvlan port */ 76#define IFF_BRIDGE_PORT 0x4000 /* device used as bridge port */
77#define IFF_BRIDGE_PORT 0x8000 /* device used as bridge port */ 77#define IFF_OVS_DATAPATH 0x8000 /* device used as Open vSwitch
78#define IFF_OVS_DATAPATH 0x10000 /* device used as Open vSwitch
79 * datapath port */ 78 * datapath port */
80 79
81#define IF_GET_IFACE 0x0001 /* for querying only */ 80#define IF_GET_IFACE 0x0001 /* for querying only */
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 02dc2cbcbe86..f68e6949294e 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -313,9 +313,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
313 tries > 0; --tries) { 313 tries > 0; --tries) {
314 if (__netif_tx_trylock(txq)) { 314 if (__netif_tx_trylock(txq)) {
315 if (!netif_tx_queue_stopped(txq)) { 315 if (!netif_tx_queue_stopped(txq)) {
316 dev->priv_flags |= IFF_IN_NETPOLL;
317 status = ops->ndo_start_xmit(skb, dev); 316 status = ops->ndo_start_xmit(skb, dev);
318 dev->priv_flags &= ~IFF_IN_NETPOLL;
319 if (status == NETDEV_TX_OK) 317 if (status == NETDEV_TX_OK)
320 txq_trans_update(txq); 318 txq_trans_update(txq);
321 } 319 }