]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: gen_estimator: extend packet counter to 64bit
authorEric Dumazet <edumazet@google.com>
Thu, 7 Nov 2019 04:52:40 +0000 (20:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Nov 2019 05:51:36 +0000 (21:51 -0800)
commit0bc2c9f84850816b8a47ae9957222abf7cddb2e6
tree828c0bd99a0adb1c6b584d7fcda6d5a05405729f
parent93420799a2d4b866282592c2c087a15ed5145740
net_sched: gen_estimator: extend packet counter to 64bit

I forgot to change last_packets field in struct net_rate_estimator.

Without this fix, rate estimators would misbehave after more
than 2^32 packets have been sent.

Another solution would be to be careful and only use the
32 least significant bits of packets counters, but we have
a hole in net_rate_estimator structure and this looks
easier to read/maintain.

Fixes: 9f9cbc60315e ("net_sched: extend packet counter to 64bit")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/gen_estimator.c