diff options
author | Patrick McHardy <kaber@trash.net> | 2006-11-29 20:35:18 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:31:41 -0500 |
commit | 9f9afec48221fe4a19f84a9341f5b304bf7d7783 (patch) | |
tree | 26a906902a7af4a835d59d452f567ca641fa1917 /net/sched/sch_tbf.c | |
parent | 814a175e7b1531a4bcaa63be47bf58cacdcb5010 (diff) |
[NET_SCHED]: Set parent classid in default qdiscs
Set parent classids in default qdiscs to allow walking up the tree
from outside the qdiscs. This is needed by the next patch.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r-- | net/sched/sch_tbf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index d9a5d298d755..2562a6040b76 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -273,12 +273,14 @@ static void tbf_reset(struct Qdisc* sch) | |||
273 | del_timer(&q->wd_timer); | 273 | del_timer(&q->wd_timer); |
274 | } | 274 | } |
275 | 275 | ||
276 | static struct Qdisc *tbf_create_dflt_qdisc(struct net_device *dev, u32 limit) | 276 | static struct Qdisc *tbf_create_dflt_qdisc(struct Qdisc *sch, u32 limit) |
277 | { | 277 | { |
278 | struct Qdisc *q = qdisc_create_dflt(dev, &bfifo_qdisc_ops); | 278 | struct Qdisc *q; |
279 | struct rtattr *rta; | 279 | struct rtattr *rta; |
280 | int ret; | 280 | int ret; |
281 | 281 | ||
282 | q = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops, | ||
283 | TC_H_MAKE(sch->handle, 1)); | ||
282 | if (q) { | 284 | if (q) { |
283 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); | 285 | rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); |
284 | if (rta) { | 286 | if (rta) { |
@@ -341,7 +343,7 @@ static int tbf_change(struct Qdisc* sch, struct rtattr *opt) | |||
341 | goto done; | 343 | goto done; |
342 | 344 | ||
343 | if (qopt->limit > 0) { | 345 | if (qopt->limit > 0) { |
344 | if ((child = tbf_create_dflt_qdisc(sch->dev, qopt->limit)) == NULL) | 346 | if ((child = tbf_create_dflt_qdisc(sch, qopt->limit)) == NULL) |
345 | goto done; | 347 | goto done; |
346 | } | 348 | } |
347 | 349 | ||