diff options
author | Tom Herbert <therbert@google.com> | 2011-11-28 11:32:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-29 12:46:19 -0500 |
commit | 7346649826382b769cfadf4a2fe8a84d060c55e9 (patch) | |
tree | 0241cce453992881f61d3fbc4f9baf7eb0578135 /net/core/dev.c | |
parent | 75957ba36c05b979701e9ec64b37819adc12f830 (diff) |
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>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index c7ef6c5d3782..cb8f753b4238 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2270,7 +2270,7 @@ gso: | |||
2270 | return rc; | 2270 | return rc; |
2271 | } | 2271 | } |
2272 | txq_trans_update(txq); | 2272 | txq_trans_update(txq); |
2273 | if (unlikely(netif_tx_queue_stopped(txq) && skb->next)) | 2273 | if (unlikely(netif_xmit_stopped(txq) && skb->next)) |
2274 | return NETDEV_TX_BUSY; | 2274 | return NETDEV_TX_BUSY; |
2275 | } while (skb->next); | 2275 | } while (skb->next); |
2276 | 2276 | ||
@@ -2558,7 +2558,7 @@ int dev_queue_xmit(struct sk_buff *skb) | |||
2558 | 2558 | ||
2559 | HARD_TX_LOCK(dev, txq, cpu); | 2559 | HARD_TX_LOCK(dev, txq, cpu); |
2560 | 2560 | ||
2561 | if (!netif_tx_queue_stopped(txq)) { | 2561 | if (!netif_xmit_stopped(txq)) { |
2562 | __this_cpu_inc(xmit_recursion); | 2562 | __this_cpu_inc(xmit_recursion); |
2563 | rc = dev_hard_start_xmit(skb, dev, txq); | 2563 | rc = dev_hard_start_xmit(skb, dev, txq); |
2564 | __this_cpu_dec(xmit_recursion); | 2564 | __this_cpu_dec(xmit_recursion); |