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/sched/sch_multiq.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/sched/sch_multiq.c')
-rw-r--r-- | net/sched/sch_multiq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c index edc1950e0e77..49131d7a7446 100644 --- a/net/sched/sch_multiq.c +++ b/net/sched/sch_multiq.c | |||
@@ -107,7 +107,8 @@ static struct sk_buff *multiq_dequeue(struct Qdisc *sch) | |||
107 | /* Check that target subqueue is available before | 107 | /* Check that target subqueue is available before |
108 | * pulling an skb to avoid head-of-line blocking. | 108 | * pulling an skb to avoid head-of-line blocking. |
109 | */ | 109 | */ |
110 | if (!__netif_subqueue_stopped(qdisc_dev(sch), q->curband)) { | 110 | if (!netif_xmit_stopped( |
111 | netdev_get_tx_queue(qdisc_dev(sch), q->curband))) { | ||
111 | qdisc = q->queues[q->curband]; | 112 | qdisc = q->queues[q->curband]; |
112 | skb = qdisc->dequeue(qdisc); | 113 | skb = qdisc->dequeue(qdisc); |
113 | if (skb) { | 114 | if (skb) { |
@@ -138,7 +139,8 @@ static struct sk_buff *multiq_peek(struct Qdisc *sch) | |||
138 | /* Check that target subqueue is available before | 139 | /* Check that target subqueue is available before |
139 | * pulling an skb to avoid head-of-line blocking. | 140 | * pulling an skb to avoid head-of-line blocking. |
140 | */ | 141 | */ |
141 | if (!__netif_subqueue_stopped(qdisc_dev(sch), curband)) { | 142 | if (!netif_xmit_stopped( |
143 | netdev_get_tx_queue(qdisc_dev(sch), curband))) { | ||
142 | qdisc = q->queues[curband]; | 144 | qdisc = q->queues[curband]; |
143 | skb = qdisc->ops->peek(qdisc); | 145 | skb = qdisc->ops->peek(qdisc); |
144 | if (skb) | 146 | if (skb) |