diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-11-23 05:42:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-28 13:47:18 -0500 |
commit | 5a0d2268d259886f0c87131639d19eb4a67b4532 (patch) | |
tree | 952e6225fcee027f3a4ae8e1c2b2c889eff3a8b2 /net/core/pktgen.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/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 2e57830cbeb2..2953b2abc971 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -3527,7 +3527,7 @@ static void pktgen_xmit(struct pktgen_dev *pkt_dev) | |||
3527 | 3527 | ||
3528 | __netif_tx_lock_bh(txq); | 3528 | __netif_tx_lock_bh(txq); |
3529 | 3529 | ||
3530 | if (unlikely(netif_tx_queue_stopped(txq) || netif_tx_queue_frozen(txq))) { | 3530 | if (unlikely(netif_tx_queue_frozen_or_stopped(txq))) { |
3531 | ret = NETDEV_TX_BUSY; | 3531 | ret = NETDEV_TX_BUSY; |
3532 | pkt_dev->last_ok = 0; | 3532 | pkt_dev->last_ok = 0; |
3533 | goto unlock; | 3533 | goto unlock; |