[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpV6GSACiROjD2jEUMXHWNbK9v+NuST5stFRNKoRHc9EXQ@mail.gmail.com>
Date: Wed, 13 Oct 2021 09:34:04 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>,
Thomas Gleixner <tglx@...utronix.de>,
"Ahmed S. Darwish" <a.darwish@...utronix.de>
Subject: Re: [PATCH net-next 2/4] gen_stats: Add instead Set the value in __gnet_stats_copy_basic().
On Thu, Oct 7, 2021 at 10:51 AM Sebastian Andrzej Siewior
<bigeasy@...utronix.de> 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.
Powered by blists - more mailing lists