]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: make bstats per cpu and estimator RCU safe
authorJohn Fastabend <john.fastabend@gmail.com>
Sun, 28 Sep 2014 18:52:56 +0000 (11:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 05:02:26 +0000 (01:02 -0400)
commitf8cc4369c6929818661e22d5668be271ba8fc036
tree2c9ef18dca9d9a441d92ea57cf7f7a292f4ceb3f
parentfe178a01da1654c6dcf11ad079ff2afa1110fd6b
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>
19 files changed:
include/net/gen_stats.h
include/net/sch_generic.h
net/core/gen_estimator.c
net/core/gen_stats.c
net/netfilter/xt_RATEEST.c
net/sched/act_api.c
net/sched/act_police.c
net/sched/sch_api.c
net/sched/sch_atm.c
net/sched/sch_cbq.c
net/sched/sch_drr.c
net/sched/sch_generic.c
net/sched/sch_hfsc.c
net/sched/sch_htb.c
net/sched/sch_mq.c
net/sched/sch_mqprio.c
net/sched/sch_multiq.c
net/sched/sch_prio.c
net/sched/sch_qfq.c