aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_cbq.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-03 01:47:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:16:38 -0400
commit4bdf39911e7a887c4499161422423cbaf16684e8 (patch)
tree3bf1ac8b4ee1e2682d7aff722d41175a694d41dc /net/sched/sch_cbq.c
parent876d48aabf30e4981653f1a0a7ae1e262b8c8b6f (diff)
[NET_SCHED]: Remove unnecessary stats_lock pointers
Remove stats_lock pointers from qdisc-internal structures, in all cases it points to dev->queue_lock. The only case where it is necessary is for top-level qdiscs, where it might also point to dev->ingress_lock in case of the ingress qdisc. Also remove it from actions completely, it always points to the actions internal lock. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_cbq.c')
-rw-r--r--net/sched/sch_cbq.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index bf1ea9e75cd9..b093d8fce789 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -148,7 +148,6 @@ struct cbq_class
148 struct gnet_stats_basic bstats; 148 struct gnet_stats_basic bstats;
149 struct gnet_stats_queue qstats; 149 struct gnet_stats_queue qstats;
150 struct gnet_stats_rate_est rate_est; 150 struct gnet_stats_rate_est rate_est;
151 spinlock_t *stats_lock;
152 struct tc_cbq_xstats xstats; 151 struct tc_cbq_xstats xstats;
153 152
154 struct tcf_proto *filter_list; 153 struct tcf_proto *filter_list;
@@ -1442,7 +1441,6 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt)
1442 q->link.ewma_log = TC_CBQ_DEF_EWMA; 1441 q->link.ewma_log = TC_CBQ_DEF_EWMA;
1443 q->link.avpkt = q->link.allot/2; 1442 q->link.avpkt = q->link.allot/2;
1444 q->link.minidle = -0x7FFFFFFF; 1443 q->link.minidle = -0x7FFFFFFF;
1445 q->link.stats_lock = &sch->dev->queue_lock;
1446 1444
1447 qdisc_watchdog_init(&q->watchdog, sch); 1445 qdisc_watchdog_init(&q->watchdog, sch);
1448 hrtimer_init(&q->delay_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS); 1446 hrtimer_init(&q->delay_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
@@ -1871,7 +1869,8 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t
1871 1869
1872 if (tca[TCA_RATE-1]) 1870 if (tca[TCA_RATE-1])
1873 gen_replace_estimator(&cl->bstats, &cl->rate_est, 1871 gen_replace_estimator(&cl->bstats, &cl->rate_est,
1874 cl->stats_lock, tca[TCA_RATE-1]); 1872 &sch->dev->queue_lock,
1873 tca[TCA_RATE-1]);
1875 return 0; 1874 return 0;
1876 } 1875 }
1877 1876
@@ -1929,7 +1928,6 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t
1929 cl->allot = parent->allot; 1928 cl->allot = parent->allot;
1930 cl->quantum = cl->allot; 1929 cl->quantum = cl->allot;
1931 cl->weight = cl->R_tab->rate.rate; 1930 cl->weight = cl->R_tab->rate.rate;
1932 cl->stats_lock = &sch->dev->queue_lock;
1933 1931
1934 sch_tree_lock(sch); 1932 sch_tree_lock(sch);
1935 cbq_link_class(cl); 1933 cbq_link_class(cl);
@@ -1959,7 +1957,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t
1959 1957
1960 if (tca[TCA_RATE-1]) 1958 if (tca[TCA_RATE-1])
1961 gen_new_estimator(&cl->bstats, &cl->rate_est, 1959 gen_new_estimator(&cl->bstats, &cl->rate_est,
1962 cl->stats_lock, tca[TCA_RATE-1]); 1960 &sch->dev->queue_lock, tca[TCA_RATE-1]);
1963 1961
1964 *arg = (unsigned long)cl; 1962 *arg = (unsigned long)cl;
1965 return 0; 1963 return 0;