Re: [PATCH net 6/8] ice: improve updating ice_{t, r}x_ring::xsk_pool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

> 




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux