On Thu, Oct 7, 2021 at 10:51 AM Sebastian Andrzej Siewior
[off-list ref] wrote:
Since day one __gnet_stats_copy_basic() always assigned the value to the
bstats argument overwriting the previous value.
Based on review there are five users of that function as of today:
- est_fetch_counters(), ___gnet_stats_copy_basic()
memsets() bstats to zero, single invocation.
- mq_dump(), mqprio_dump(), mqprio_dump_class_stats()
memsets() bstats to zero, multiple invocation but does not use the
function due to !qdisc_is_percpu_stats().
It will probably simplify in percpu stats case if the value would be
added and not just stored
You at least need to rename it before doing so, otherwise "copy"
would be too confusing.