]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: gen_estimator: fix broken estimators based on percpu stats
authorEric Dumazet <edumazet@google.com>
Fri, 23 Feb 2018 03:45:27 +0000 (19:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Feb 2018 17:35:46 +0000 (12:35 -0500)
commit980b83437a7cda679edd12a015e0e6cb5bd418c5
treeba06636322eaf68b2e210502fec48a8f7b6dd883
parent05b1bc4511c31047306dc086359d68f2b656df9b
net_sched: gen_estimator: fix broken estimators based on percpu stats

pfifo_fast got percpu stats lately, uncovering a bug I introduced last
year in linux-4.10.

I missed the fact that we have to clear our temporary storage
before calling __gnet_stats_copy_basic() in the case of percpu stats.

Without this fix, rate estimators (tc qd replace dev xxx root est 1sec
4sec pfifo_fast) are utterly broken.

Fixes: b7452f9c4e64 ("net_sched: gen_estimator: complete rewrite of rate estimators")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/gen_estimator.c