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
@@ -76,7 +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_frozen_or_stopped(txq) ||
|
||||
if (netif_xmit_frozen_or_stopped(txq) ||
|
||||
ops->ndo_start_xmit(skb, dev) != NETDEV_TX_OK) {
|
||||
skb_queue_head(&npinfo->txq, skb);
|
||||
__netif_tx_unlock(txq);
|
||||
@@ -317,7 +317,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
|
||||
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
|
||||
tries > 0; --tries) {
|
||||
if (__netif_tx_trylock(txq)) {
|
||||
if (!netif_tx_queue_stopped(txq)) {
|
||||
if (!netif_xmit_stopped(txq)) {
|
||||
status = ops->ndo_start_xmit(skb, dev);
|
||||
if (status == NETDEV_TX_OK)
|
||||
txq_trans_update(txq);
|
||||
|
Reference in New Issue
Block a user