public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Damato <jdamato@fastly.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, alexanderduyck@fb.com
Subject: Re: [PATCH net-next 1/2] eth: fbnic: add basic rtnl stats
Date: Thu, 8 Aug 2024 09:34:46 +0100	[thread overview]
Message-ID: <ZrSDJn3QnU8DZZz6@LQ3V64L9R2> (raw)
In-Reply-To: <20240807093837.6aaa6566@kernel.org>

On Wed, Aug 07, 2024 at 09:38:37AM -0700, Jakub Kicinski wrote:
> On Wed, 7 Aug 2024 16:43:47 +0100 Joe Damato wrote:
> > > +static void fbnic_aggregate_ring_rx_counters(struct fbnic_net *fbn,
> > > +					     struct fbnic_ring *rxr)
> > > +{
> > > +	struct fbnic_queue_stats *stats = &rxr->stats;
> > > +
> > > +	if (!(rxr->flags & FBNIC_RING_F_STATS))
> > > +		return;
> > > +  
> > 
> > Nit: I noticed this check is in both aggregate functions and just
> > before where the functions are called below. I'm sure you have
> > better folks internally to review this than me, but: maybe the extra
> > flags check isn't necessary?
> > 
> > Could be good if you are trying to be defensive, though.
> 
> Perils of upstreaming code that live out of tree for too long :(
> These functions will also be called from the path which does runtime
> ring changes (prepare/swap) and there the caller has no such check.
> 
> I'll drop it, and make a note to bring it back later.

I suppose you could drop it from the call sites and leave it in the
fbnic_aggregate_ring* functions? Sorry, didn't intend to cause you
to send a v2.

I think the extra checks are harmless, so if you want to leave them
that seems fine to me.

- Joe

  reply	other threads:[~2024-08-08  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07  2:26 [PATCH net-next 0/2] eth: fbnic: add basic stats Jakub Kicinski
2024-08-07  2:26 ` [PATCH net-next 1/2] eth: fbnic: add basic rtnl stats Jakub Kicinski
2024-08-07 15:43   ` Joe Damato
2024-08-07 16:38     ` Jakub Kicinski
2024-08-08  8:34       ` Joe Damato [this message]
2024-08-07  2:26 ` [PATCH net-next 2/2] eth: fbnic: add support for basic qstats Jakub Kicinski
2024-08-07 15:45   ` Joe Damato

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=ZrSDJn3QnU8DZZz6@LQ3V64L9R2 \
    --to=jdamato@fastly.com \
    --cc=alexanderduyck@fb.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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