diff options
author | David S. Miller <davem@davemloft.net> | 2009-09-06 04:58:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-06 05:07:05 -0400 |
commit | 6ec1c69a8f6492fd25722f4762721921da074c12 (patch) | |
tree | a78323d1f7f84acbe08c25d7300b935ae4bb7c62 /include/net/sch_generic.h | |
parent | 589983cd21f4a2e4ed74a958805a90fa676845c5 (diff) |
net_sched: add classful multiqueue dummy scheduler
This patch adds a classful dummy scheduler which can be used as root qdisc
for multiqueue devices and exposes each device queue as a child class.
This allows to address queues individually and graft them similar to regular
classes. Additionally it presents an accumulated view of the statistics of
all real root qdiscs in the dummy root.
Two new callbacks are added to the qdisc_ops and qdisc_class_ops:
- cl_ops->select_queue selects the tx queue number for new child classes.
- qdisc_ops->attach() overrides root qdisc device grafting to attach
non-shared qdiscs to the queues.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r-- | include/net/sch_generic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a92dc6208eff..9c69585a1be8 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -80,6 +80,7 @@ struct Qdisc | |||
80 | struct Qdisc_class_ops | 80 | struct Qdisc_class_ops |
81 | { | 81 | { |
82 | /* Child qdisc manipulation */ | 82 | /* Child qdisc manipulation */ |
83 | unsigned int (*select_queue)(struct Qdisc *, struct tcmsg *); | ||
83 | int (*graft)(struct Qdisc *, unsigned long cl, | 84 | int (*graft)(struct Qdisc *, unsigned long cl, |
84 | struct Qdisc *, struct Qdisc **); | 85 | struct Qdisc *, struct Qdisc **); |
85 | struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); | 86 | struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); |
@@ -122,6 +123,7 @@ struct Qdisc_ops | |||
122 | void (*reset)(struct Qdisc *); | 123 | void (*reset)(struct Qdisc *); |
123 | void (*destroy)(struct Qdisc *); | 124 | void (*destroy)(struct Qdisc *); |
124 | int (*change)(struct Qdisc *, struct nlattr *arg); | 125 | int (*change)(struct Qdisc *, struct nlattr *arg); |
126 | void (*attach)(struct Qdisc *); | ||
125 | 127 | ||
126 | int (*dump)(struct Qdisc *, struct sk_buff *); | 128 | int (*dump)(struct Qdisc *, struct sk_buff *); |
127 | int (*dump_stats)(struct Qdisc *, struct gnet_dump *); | 129 | int (*dump_stats)(struct Qdisc *, struct gnet_dump *); |
@@ -255,6 +257,8 @@ static inline void sch_tree_unlock(struct Qdisc *q) | |||
255 | 257 | ||
256 | extern struct Qdisc noop_qdisc; | 258 | extern struct Qdisc noop_qdisc; |
257 | extern struct Qdisc_ops noop_qdisc_ops; | 259 | extern struct Qdisc_ops noop_qdisc_ops; |
260 | extern struct Qdisc_ops pfifo_fast_ops; | ||
261 | extern struct Qdisc_ops mq_qdisc_ops; | ||
258 | 262 | ||
259 | struct Qdisc_class_common | 263 | struct Qdisc_class_common |
260 | { | 264 | { |