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 Fri, 26 Jul 2024 15:43:20 +0200 Maciej Fijalkowski wrote:
> > The _ONCE() helpers basically give you the ability to store the pointer
> > to a variable on the stack, and that variable won't change behind your
> > back. But the only reason to READ_ONCE(ptr->thing) something multiple
> > times is to tell KCSAN that "I know what I'm doing", it just silences
> > potential warnings :S  
> 
> I feel like you keep on referring to _ONCE (*) being used multiple times
> which might be counter-intuitive whereas I was trying from the beginning
> to explain my point that xsk pool from driver POV should get the very same
> treatment as xdp prog has currently. So, either mark it as __rcu variable
> and use rcu helpers or use _ONCE variants plus some sync.
> 
> (*) Ok, if you meant from the very beginning that two READ_ONCE against
> pool per single critical section is suspicious then I didn't get that,
> sorry. With diff below I would have single READ_ONCE and work on that
> variable for rest of the napi. Patch was actually trying to limit xsk_pool
> accesses from ring struct by working on stack variable.
> 
> Would you be okay with that?

Yup! That diff makes sense, thanks!




[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