[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <677d455fd9613_261ae42942d@willemb.c.googlers.com.notmuch>
Date: Tue, 07 Jan 2025 10:16:47 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jakub Kicinski <kuba@...nel.org>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: davem@...emloft.net,
netdev@...r.kernel.org,
edumazet@...gle.com,
pabeni@...hat.com,
dw@...idwei.uk,
almasrymina@...gle.com,
jdamato@...tly.com
Subject: Re: [PATCH net-next 6/8] netdevsim: add queue management API support
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..
Powered by blists - more mailing lists