net: Add queue state xoff flag for stack
Create separate queue state flags so that either the stack or drivers can turn on XOFF. Added a set of functions used in the stack to determine if a queue is really stopped (either by stack or driver) Signed-off-by: Tom Herbert <therbert@google.com> Acked-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
75957ba36c
commit
7346649826
@@ -2270,7 +2270,7 @@ gso:
|
||||
return rc;
|
||||
}
|
||||
txq_trans_update(txq);
|
||||
if (unlikely(netif_tx_queue_stopped(txq) && skb->next))
|
||||
if (unlikely(netif_xmit_stopped(txq) && skb->next))
|
||||
return NETDEV_TX_BUSY;
|
||||
} while (skb->next);
|
||||
|
||||
@@ -2558,7 +2558,7 @@ int dev_queue_xmit(struct sk_buff *skb)
|
||||
|
||||
HARD_TX_LOCK(dev, txq, cpu);
|
||||
|
||||
if (!netif_tx_queue_stopped(txq)) {
|
||||
if (!netif_xmit_stopped(txq)) {
|
||||
__this_cpu_inc(xmit_recursion);
|
||||
rc = dev_hard_start_xmit(skb, dev, txq);
|
||||
__this_cpu_dec(xmit_recursion);
|
||||
|
Reference in New Issue
Block a user