diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-23 10:42:02 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 10:47:18 -0800 |
commit | 5a0d2268d259886f0c87131639d19eb4a67b4532 (patch) | |
tree | 952e6225fcee027f3a4ae8e1c2b2c889eff3a8b2 /net/core/netpoll.c | |
parent | d3c15cab213becc49a6f2ad7f48a59513a5f17dd (diff) |
net: add netif_tx_queue_frozen_or_stopped
When testing struct netdev_queue state against FROZEN bit, we also test
XOFF bit. We can test both bits at once and save some cycles.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r-- | net/core/netpoll.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 4e98ffac3af0..ee38acb6d463 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -76,8 +76,7 @@ static void queue_process(struct work_struct *work) local_irq_save(flags); __netif_tx_lock(txq, smp_processor_id()); - if (netif_tx_queue_stopped(txq) || - netif_tx_queue_frozen(txq) || + if (netif_tx_queue_frozen_or_stopped(txq) || ops->ndo_start_xmit(skb, dev) != NETDEV_TX_OK) { skb_queue_head(&npinfo->txq, skb); __netif_tx_unlock(txq); |