diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-08 20:18:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-08 20:18:23 -0400 |
commit | dc2b48475a0a36f8b3bbb2da60d3a006dc5c2c84 (patch) | |
tree | b2421a338840bd1c675f4f91de7c7cf03863fb78 /net/sched/sch_htb.c | |
parent | 5ce2d488fe039ddd86a638496cf704df86c74eeb (diff) |
netdev: Move queue_lock into struct netdev_queue.
The lock is now an attribute of the device queue.
One thing to notice is that "suspicious" places
emerge which will need specific training about
multiple queue handling. They are so marked with
explicit "netdev->rx_queue" and "netdev->tx_queue"
references.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 31f7d1536e6d..c8ca54cc26b0 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -1043,7 +1043,7 @@ static int htb_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
1043 | struct nlattr *nest; | 1043 | struct nlattr *nest; |
1044 | struct tc_htb_glob gopt; | 1044 | struct tc_htb_glob gopt; |
1045 | 1045 | ||
1046 | spin_lock_bh(&qdisc_dev(sch)->queue_lock); | 1046 | spin_lock_bh(&sch->dev_queue->lock); |
1047 | 1047 | ||
1048 | gopt.direct_pkts = q->direct_pkts; | 1048 | gopt.direct_pkts = q->direct_pkts; |
1049 | gopt.version = HTB_VER; | 1049 | gopt.version = HTB_VER; |
@@ -1057,11 +1057,11 @@ static int htb_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
1057 | NLA_PUT(skb, TCA_HTB_INIT, sizeof(gopt), &gopt); | 1057 | NLA_PUT(skb, TCA_HTB_INIT, sizeof(gopt), &gopt); |
1058 | nla_nest_end(skb, nest); | 1058 | nla_nest_end(skb, nest); |
1059 | 1059 | ||
1060 | spin_unlock_bh(&qdisc_dev(sch)->queue_lock); | 1060 | spin_unlock_bh(&sch->dev_queue->lock); |
1061 | return skb->len; | 1061 | return skb->len; |
1062 | 1062 | ||
1063 | nla_put_failure: | 1063 | nla_put_failure: |
1064 | spin_unlock_bh(&qdisc_dev(sch)->queue_lock); | 1064 | spin_unlock_bh(&sch->dev_queue->lock); |
1065 | nla_nest_cancel(skb, nest); | 1065 | nla_nest_cancel(skb, nest); |
1066 | return -1; | 1066 | return -1; |
1067 | } | 1067 | } |
@@ -1073,7 +1073,7 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg, | |||
1073 | struct nlattr *nest; | 1073 | struct nlattr *nest; |
1074 | struct tc_htb_opt opt; | 1074 | struct tc_htb_opt opt; |
1075 | 1075 | ||
1076 | spin_lock_bh(&qdisc_dev(sch)->queue_lock); | 1076 | spin_lock_bh(&sch->dev_queue->lock); |
1077 | tcm->tcm_parent = cl->parent ? cl->parent->common.classid : TC_H_ROOT; | 1077 | tcm->tcm_parent = cl->parent ? cl->parent->common.classid : TC_H_ROOT; |
1078 | tcm->tcm_handle = cl->common.classid; | 1078 | tcm->tcm_handle = cl->common.classid; |
1079 | if (!cl->level && cl->un.leaf.q) | 1079 | if (!cl->level && cl->un.leaf.q) |
@@ -1095,11 +1095,11 @@ static int htb_dump_class(struct Qdisc *sch, unsigned long arg, | |||
1095 | NLA_PUT(skb, TCA_HTB_PARMS, sizeof(opt), &opt); | 1095 | NLA_PUT(skb, TCA_HTB_PARMS, sizeof(opt), &opt); |
1096 | 1096 | ||
1097 | nla_nest_end(skb, nest); | 1097 | nla_nest_end(skb, nest); |
1098 | spin_unlock_bh(&qdisc_dev(sch)->queue_lock); | 1098 | spin_unlock_bh(&sch->dev_queue->lock); |
1099 | return skb->len; | 1099 | return skb->len; |
1100 | 1100 | ||
1101 | nla_put_failure: | 1101 | nla_put_failure: |
1102 | spin_unlock_bh(&qdisc_dev(sch)->queue_lock); | 1102 | spin_unlock_bh(&sch->dev_queue->lock); |
1103 | nla_nest_cancel(skb, nest); | 1103 | nla_nest_cancel(skb, nest); |
1104 | return -1; | 1104 | return -1; |
1105 | } | 1105 | } |
@@ -1365,7 +1365,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, | |||
1365 | goto failure; | 1365 | goto failure; |
1366 | 1366 | ||
1367 | gen_new_estimator(&cl->bstats, &cl->rate_est, | 1367 | gen_new_estimator(&cl->bstats, &cl->rate_est, |
1368 | &qdisc_dev(sch)->queue_lock, | 1368 | &sch->dev_queue->lock, |
1369 | tca[TCA_RATE] ? : &est.nla); | 1369 | tca[TCA_RATE] ? : &est.nla); |
1370 | cl->refcnt = 1; | 1370 | cl->refcnt = 1; |
1371 | cl->children = 0; | 1371 | cl->children = 0; |
@@ -1420,7 +1420,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid, | |||
1420 | } else { | 1420 | } else { |
1421 | if (tca[TCA_RATE]) | 1421 | if (tca[TCA_RATE]) |
1422 | gen_replace_estimator(&cl->bstats, &cl->rate_est, | 1422 | gen_replace_estimator(&cl->bstats, &cl->rate_est, |
1423 | &qdisc_dev(sch)->queue_lock, | 1423 | &sch->dev_queue->lock, |
1424 | tca[TCA_RATE]); | 1424 | tca[TCA_RATE]); |
1425 | sch_tree_lock(sch); | 1425 | sch_tree_lock(sch); |
1426 | } | 1426 | } |