diff options
author | Patrick McHardy <kaber@trash.net> | 2006-11-29 17:35:18 -0800 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-02 21:31:41 -0800 |
commit | 9f9afec48221fe4a19f84a9341f5b304bf7d7783 (patch) | |
tree | 26a906902a7af4a835d59d452f567ca641fa1917 /net/sched/sch_generic.c | |
parent | 814a175e7b1531a4bcaa63be47bf58cacdcb5010 (diff) | |
download | kernel_samsung_aries-9f9afec48221fe4a19f84a9341f5b304bf7d7783.zip kernel_samsung_aries-9f9afec48221fe4a19f84a9341f5b304bf7d7783.tar.gz kernel_samsung_aries-9f9afec48221fe4a19f84a9341f5b304bf7d7783.tar.bz2 |
[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_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 88c6a99..deafeb9 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -450,13 +450,15 @@ errout: return ERR_PTR(-err); } -struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops) +struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops, + unsigned int parentid) { struct Qdisc *sch; sch = qdisc_alloc(dev, ops); if (IS_ERR(sch)) goto errout; + sch->parent = parentid; if (!ops->init || ops->init(sch, NULL) == 0) return sch; @@ -520,7 +522,8 @@ void dev_activate(struct net_device *dev) if (dev->qdisc_sleeping == &noop_qdisc) { struct Qdisc *qdisc; if (dev->tx_queue_len) { - qdisc = qdisc_create_dflt(dev, &pfifo_fast_ops); + qdisc = qdisc_create_dflt(dev, &pfifo_fast_ops, + TC_H_ROOT); if (qdisc == NULL) { printk(KERN_INFO "%s: activation failed\n", dev->name); return; |