net: sched: make bstats per cpu and estimator RCU safe
In order to run qdisc's without locking statistics and estimators need to be handled correctly. To resolve bstats make the statistics per cpu. And because this is only needed for qdiscs that are running without locks which is not the case for most qdiscs in the near future only create percpu stats when qdiscs set the TCQ_F_CPUSTATS flag. Next because estimators use the bstats to calculate packets per second and bytes per second the estimator code paths are updated to use the per cpu statistics. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
79cf79abce
commit
22e0f8b932
19 changed files with 164 additions and 51 deletions
|
@ -136,7 +136,7 @@ static int xt_rateest_tg_checkentry(const struct xt_tgchk_param *par)
|
|||
cfg.est.interval = info->interval;
|
||||
cfg.est.ewma_log = info->ewma_log;
|
||||
|
||||
ret = gen_new_estimator(&est->bstats, &est->rstats,
|
||||
ret = gen_new_estimator(&est->bstats, NULL, &est->rstats,
|
||||
&est->lock, &cfg.opt);
|
||||
if (ret < 0)
|
||||
goto err2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue