aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-16 03:56:32 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-17 22:21:18 -0400
commite2627c8c2241bce45e368e150654d076b58a4595 (patch)
treee3ad7d1867339f254a324ba1acd5d8bdac1aca76 /include
parentd3b753db7c4f1f37a98b51974d484fda5d86dab5 (diff)
pkt_sched: Make QDISC_RUNNING a qdisc state.
Currently it is associated with a netdev_queue, but when we have qdisc sharing that no longer makes any sense. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/net/pkt_sched.h4
-rw-r--r--include/net/sch_generic.h6
3 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0883fcf2d16a..9240a95793be 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -441,7 +441,6 @@ static inline void napi_synchronize(const struct napi_struct *n)
441enum netdev_queue_state_t 441enum netdev_queue_state_t
442{ 442{
443 __QUEUE_STATE_XOFF, 443 __QUEUE_STATE_XOFF,
444 __QUEUE_STATE_QDISC_RUNNING,
445}; 444};
446 445
447struct netdev_queue { 446struct netdev_queue {
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index cb9527815606..06a442d85186 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -88,8 +88,10 @@ extern void __qdisc_run(struct netdev_queue *txq);
88 88
89static inline void qdisc_run(struct netdev_queue *txq) 89static inline void qdisc_run(struct netdev_queue *txq)
90{ 90{
91 struct Qdisc *q = txq->qdisc;
92
91 if (!netif_tx_queue_stopped(txq) && 93 if (!netif_tx_queue_stopped(txq) &&
92 !test_and_set_bit(__QUEUE_STATE_QDISC_RUNNING, &txq->state)) 94 !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
93 __qdisc_run(txq); 95 __qdisc_run(txq);
94} 96}
95 97
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index b96c3d9e10a8..bc2a09da21b1 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -23,6 +23,11 @@ struct qdisc_rate_table
23 int refcnt; 23 int refcnt;
24}; 24};
25 25
26enum qdisc_state_t
27{
28 __QDISC_STATE_RUNNING,
29};
30
26struct Qdisc 31struct Qdisc
27{ 32{
28 int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); 33 int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev);
@@ -36,6 +41,7 @@ struct Qdisc
36 u32 handle; 41 u32 handle;
37 u32 parent; 42 u32 parent;
38 atomic_t refcnt; 43 atomic_t refcnt;
44 unsigned long state;
39 struct sk_buff *gso_skb; 45 struct sk_buff *gso_skb;
40 struct sk_buff_head q; 46 struct sk_buff_head q;
41 struct netdev_queue *dev_queue; 47 struct netdev_queue *dev_queue;