diff options
Diffstat (limited to 'net/sched/sch_drr.c')
| -rw-r--r-- | net/sched/sch_drr.c | 13 | 
1 files changed, 5 insertions, 8 deletions
| diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index 642cd179b7a7..18e4f7a0b291 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c @@ -19,7 +19,7 @@ struct drr_class {  	struct Qdisc_class_common	common;  	unsigned int			filter_cnt; -	struct gnet_stats_basic_packed		bstats; +	struct gnet_stats_basic_sync		bstats;  	struct gnet_stats_queue		qstats;  	struct net_rate_estimator __rcu *rate_est;  	struct list_head		alist; @@ -85,8 +85,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,  		if (tca[TCA_RATE]) {  			err = gen_replace_estimator(&cl->bstats, NULL,  						    &cl->rate_est, -						    NULL, -						    qdisc_root_sleeping_running(sch), +						    NULL, true,  						    tca[TCA_RATE]);  			if (err) {  				NL_SET_ERR_MSG(extack, "Failed to replace estimator"); @@ -106,6 +105,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,  	if (cl == NULL)  		return -ENOBUFS; +	gnet_stats_basic_sync_init(&cl->bstats);  	cl->common.classid = classid;  	cl->quantum	   = quantum;  	cl->qdisc	   = qdisc_create_dflt(sch->dev_queue, @@ -118,9 +118,7 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,  	if (tca[TCA_RATE]) {  		err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, -					    NULL, -					    qdisc_root_sleeping_running(sch), -					    tca[TCA_RATE]); +					    NULL, true, tca[TCA_RATE]);  		if (err) {  			NL_SET_ERR_MSG(extack, "Failed to replace estimator");  			qdisc_put(cl->qdisc); @@ -267,8 +265,7 @@ static int drr_dump_class_stats(struct Qdisc *sch, unsigned long arg,  	if (qlen)  		xstats.deficit = cl->deficit; -	if (gnet_stats_copy_basic(qdisc_root_sleeping_running(sch), -				  d, NULL, &cl->bstats) < 0 || +	if (gnet_stats_copy_basic(d, NULL, &cl->bstats, true) < 0 ||  	    gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 ||  	    gnet_stats_copy_queue(d, cl_q->cpu_qstats, &cl_q->qstats, qlen) < 0)  		return -1; |