mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
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>
This commit is contained in:
committed by
David S. Miller
parent
d3c15cab21
commit
5a0d2268d2
@@ -309,8 +309,7 @@ restart:
|
||||
if (__netif_tx_trylock(slave_txq)) {
|
||||
unsigned int length = qdisc_pkt_len(skb);
|
||||
|
||||
if (!netif_tx_queue_stopped(slave_txq) &&
|
||||
!netif_tx_queue_frozen(slave_txq) &&
|
||||
if (!netif_tx_queue_frozen_or_stopped(slave_txq) &&
|
||||
slave_ops->ndo_start_xmit(skb, slave) == NETDEV_TX_OK) {
|
||||
txq_trans_update(slave_txq);
|
||||
__netif_tx_unlock(slave_txq);
|
||||
|
||||
Reference in New Issue
Block a user