[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>
This commit is contained in:
committed by
David S. Miller
parent
876d48aabf
commit
4bdf39911e
@@ -148,7 +148,6 @@ struct cbq_class
|
||||
struct gnet_stats_basic bstats;
|
||||
struct gnet_stats_queue qstats;
|
||||
struct gnet_stats_rate_est rate_est;
|
||||
spinlock_t *stats_lock;
|
||||
struct tc_cbq_xstats xstats;
|
||||
|
||||
struct tcf_proto *filter_list;
|
||||
@@ -1442,7 +1441,6 @@ static int cbq_init(struct Qdisc *sch, struct rtattr *opt)
|
||||
q->link.ewma_log = TC_CBQ_DEF_EWMA;
|
||||
q->link.avpkt = q->link.allot/2;
|
||||
q->link.minidle = -0x7FFFFFFF;
|
||||
q->link.stats_lock = &sch->dev->queue_lock;
|
||||
|
||||
qdisc_watchdog_init(&q->watchdog, sch);
|
||||
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
|
||||
|
||||
if (tca[TCA_RATE-1])
|
||||
gen_replace_estimator(&cl->bstats, &cl->rate_est,
|
||||
cl->stats_lock, tca[TCA_RATE-1]);
|
||||
&sch->dev->queue_lock,
|
||||
tca[TCA_RATE-1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1929,7 +1928,6 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t
|
||||
cl->allot = parent->allot;
|
||||
cl->quantum = cl->allot;
|
||||
cl->weight = cl->R_tab->rate.rate;
|
||||
cl->stats_lock = &sch->dev->queue_lock;
|
||||
|
||||
sch_tree_lock(sch);
|
||||
cbq_link_class(cl);
|
||||
@@ -1959,7 +1957,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct rtattr **t
|
||||
|
||||
if (tca[TCA_RATE-1])
|
||||
gen_new_estimator(&cl->bstats, &cl->rate_est,
|
||||
cl->stats_lock, tca[TCA_RATE-1]);
|
||||
&sch->dev->queue_lock, tca[TCA_RATE-1]);
|
||||
|
||||
*arg = (unsigned long)cl;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user