netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Ahmed S. Darwish" <a.darwish@linutronix.de>
Subject: Re: [PATCH net-next 2/4] gen_stats: Add instead Set the value in __gnet_stats_copy_basic().
Date: Wed, 13 Oct 2021 09:34:04 -0700	[thread overview]
Message-ID: <CAM_iQpV6GSACiROjD2jEUMXHWNbK9v+NuST5stFRNKoRHc9EXQ@mail.gmail.com> (raw)
In-Reply-To: <20211007175000.2334713-3-bigeasy@linutronix.de>

On Thu, Oct 7, 2021 at 10:51 AM Sebastian Andrzej Siewior
<bigeasy@linutronix.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.

  parent reply	other threads:[~2021-10-13 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07 17:49 [PATCH 0/4] mqprio fixup and simplify code Sebastian Andrzej Siewior
2021-10-07 17:49 ` [PATCH net 1/4] mqprio: Correct stats in mqprio_dump_class_stats() Sebastian Andrzej Siewior
2021-10-08 23:33   ` Jakub Kicinski
2021-10-07 17:49 ` [PATCH net-next 2/4] gen_stats: Add instead Set the value in __gnet_stats_copy_basic() Sebastian Andrzej Siewior
2021-10-08 23:35   ` Jakub Kicinski
2021-10-13 16:34   ` Cong Wang [this message]
2021-10-07 17:49 ` [PATCH net-next 3/4] gen_stats: Add instead Set the value in __gnet_stats_copy_queue() Sebastian Andrzej Siewior
2021-10-08 23:38   ` Jakub Kicinski
2021-10-13 16:00     ` Sebastian Andrzej Siewior
2021-10-07 17:50 ` [PATCH net-next 4/4] mq, mqprio: Simplify stats copy Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAM_iQpV6GSACiROjD2jEUMXHWNbK9v+NuST5stFRNKoRHc9EXQ@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=a.darwish@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).