Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: davem@davemloft.net,  netdev@vger.kernel.org,
	 edumazet@google.com,  pabeni@redhat.com,  dw@davidwei.uk,
	 almasrymina@google.com,  jdamato@fastly.com
Subject: Re: [PATCH net-next 6/8] netdevsim: add queue management API support
Date: Tue, 07 Jan 2025 10:16:47 -0500	[thread overview]
Message-ID: <677d455fd9613_261ae42942d@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20250107064951.200e9dfd@kernel.org>

Jakub Kicinski wrote:
> On Tue, 07 Jan 2025 09:03:54 -0500 Willem de Bruijn wrote:
> > Jakub Kicinski wrote:
> > > +/* Queue reset mode is controled by ns->rq_reset_mode.  
> > 
> > controlled
> 
> ack
> 
> > also perhaps an enum for the modes?
> 
> I couldn't come up with concise yet meaningful names for them, TBH :(

Fair enough. I don't immediately have good names either.
 
> > > + * - normal - new NAPI new pool (old NAPI enabled when new added)
> > > + * - mode 1 - allocate new pool (NAPI is only disabled / enabled)
> > > + * - mode 2 - new NAPI new pool (old NAPI removed before new added)
> > > + * - mode 3 - new NAPI new pool (old NAPI disabled when new added)
> > > + */
> 
> > > +	/* netif_napi_add()/_del() should normally be called from alloc/free,
> > > +	 * here we want to test various call orders.
> > > +	 */
> > > +	if (ns->rq_reset_mode == 2) {
> > > +		netif_napi_del(&ns->rq[idx]->napi);
> > > +		netif_napi_add_config(dev, &qmem->rq->napi, nsim_poll, idx);
> > > +	} else if (ns->rq_reset_mode == 3) {
> > > +		netif_napi_add_config(dev, &qmem->rq->napi, nsim_poll, idx);
> > > +		netif_napi_del(&ns->rq[idx]->napi);  
> > 
> > Just to make sure my understanding: this is expected to not change
> > anything, due to test_and_(set|clear)_bit(NAPI_STATE_LISTED, ..),
> > right?
> 
> Say more..
> Note that ns->rq[idx]->napi != qmem->rq->napi

Thanks. I did misunderstand this code a bit. Reading the config stuff
once more..


  reply	other threads:[~2025-01-07 15:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-03 18:59 [PATCH net-next 0/8] net: make sure we retain NAPI ordering on netdev->napi_list Jakub Kicinski
2025-01-03 18:59 ` [PATCH net-next 1/8] " Jakub Kicinski
2025-01-06  9:35   ` Eric Dumazet
2025-01-03 18:59 ` [PATCH net-next 2/8] netdev: define NETDEV_INTERNAL Jakub Kicinski
2025-01-06  9:36   ` Eric Dumazet
2025-01-07 21:04   ` Mina Almasry
2025-01-03 18:59 ` [PATCH net-next 3/8] netdevsim: support NAPI config Jakub Kicinski
2025-01-06  9:36   ` Eric Dumazet
2025-01-03 18:59 ` [PATCH net-next 4/8] netdevsim: allocate rqs individually Jakub Kicinski
2025-01-06  9:52   ` Eric Dumazet
2025-01-07 10:33   ` Paolo Abeni
2025-01-03 18:59 ` [PATCH net-next 5/8] netdevsim: add queue alloc/free helpers Jakub Kicinski
2025-01-06  9:57   ` Eric Dumazet
2025-01-07 21:08   ` Mina Almasry
2025-01-07 21:15     ` Jakub Kicinski
2025-01-03 18:59 ` [PATCH net-next 6/8] netdevsim: add queue management API support Jakub Kicinski
2025-01-06 16:45   ` Stanislav Fomichev
2025-01-07 14:03   ` Willem de Bruijn
2025-01-07 14:49     ` Jakub Kicinski
2025-01-07 15:16       ` Willem de Bruijn [this message]
2025-01-03 18:59 ` [PATCH net-next 7/8] netdevsim: add debugfs-triggered queue reset Jakub Kicinski
2025-01-06 16:46   ` Stanislav Fomichev
2025-01-07 11:06   ` Paolo Abeni
2025-01-07 14:04   ` Willem de Bruijn
2025-01-03 18:59 ` [PATCH net-next 8/8] selftests: net: test listing NAPI vs queue resets Jakub Kicinski
2025-01-06 16:47   ` Stanislav Fomichev
2025-01-07 14:06 ` [PATCH net-next 0/8] net: make sure we retain NAPI ordering on netdev->napi_list Willem de Bruijn

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=677d455fd9613_261ae42942d@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=almasrymina@google.com \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=jdamato@fastly.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