[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZqEieHlPdMZcPGXI@boxer>
Date: Wed, 24 Jul 2024 17:49:12 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: Tony Nguyen <anthony.l.nguyen@...el.com>, <davem@...emloft.net>,
<pabeni@...hat.com>, <edumazet@...gle.com>, <netdev@...r.kernel.org>,
<magnus.karlsson@...el.com>, <aleksander.lobakin@...el.com>,
<ast@...nel.org>, <daniel@...earbox.net>, <hawk@...nel.org>,
<john.fastabend@...il.com>, <bpf@...r.kernel.org>, Shannon Nelson
<shannon.nelson@....com>, Chandan Kumar Rout <chandanx.rout@...el.com>
Subject: Re: [PATCH net 6/8] ice: improve updating ice_{t, r}x_ring::xsk_pool
On Wed, Jul 24, 2024 at 07:57:42AM -0700, Jakub Kicinski wrote:
> On Wed, 24 Jul 2024 01:46:11 +0200 Maciej Fijalkowski wrote:
> > Goal of this commit was to prevent compiler from code reoder such as NAPI
> > is launched before update of xsk_buff_pool pointer which is achieved with
> > WRITE_ONCE()/synchronize_net() pair. Then per my understanding single
> > READ_ONCE() within NAPI was sufficient, the one that makes the decision
> > which Rx routine should be called (zc or standard one). Given that bh are
> > disabled and updater respects RCU grace period IMHO pointer is valid for
> > current NAPI cycle.
>
> So if we are already in the af_xdp handler, and update patch sets pool
> to NULL - the af_xdp handler will be fine with the pool becoming NULL?
> I guess it may be fine, it's just quite odd to call the function called
> _ONCE() multiple times..
Update path before NULLing pool will go through rcu grace period, stop
napis, disable irqs, etc. Running napi won't be exposed to nulled pool in
such case.
>
Powered by blists - more mailing lists