[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240724075742.0e70de49@kernel.org>
Date: Wed, 24 Jul 2024 07:57:42 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
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, 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..
Powered by blists - more mailing lists