aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/pkt_sched.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-16 05:15:04 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-17 22:21:20 -0400
commit37437bb2e1ae8af470dfcd5b4ff454110894ccaf (patch)
tree1795e78a7648252b0c92c972df12b776a28437d7 /include/net/pkt_sched.h
parent7698b4fcabcd790efc4f226bada1e7b5870653af (diff)
pkt_sched: Schedule qdiscs instead of netdev_queue.
When we have shared qdiscs, packets come out of the qdiscs for multiple transmit queues. Therefore it doesn't make any sense to schedule the transmit queue when logically we cannot know ahead of time the TX queue of the SKB that the qdisc->dequeue() will give us. Just for sanity I added a BUG check to make sure we never get into a state where the noop_qdisc is scheduled. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r--include/net/pkt_sched.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 06a442d85186..e4e30052e4e2 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -84,15 +84,12 @@ extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
84 struct nlattr *tab); 84 struct nlattr *tab);
85extern void qdisc_put_rtab(struct qdisc_rate_table *tab); 85extern void qdisc_put_rtab(struct qdisc_rate_table *tab);
86 86
87extern void __qdisc_run(struct netdev_queue *txq); 87extern void __qdisc_run(struct Qdisc *q);
88 88
89static inline void qdisc_run(struct netdev_queue *txq) 89static inline void qdisc_run(struct Qdisc *q)
90{ 90{
91 struct Qdisc *q = txq->qdisc; 91 if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
92 92 __qdisc_run(q);
93 if (!netif_tx_queue_stopped(txq) &&
94 !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
95 __qdisc_run(txq);
96} 93}
97 94
98extern int tc_classify_compat(struct sk_buff *skb, struct tcf_proto *tp, 95extern int tc_classify_compat(struct sk_buff *skb, struct tcf_proto *tp,