[RFC -next 0/3] Re: [PATCH net 1/2] net: disable netpoll on fresh napis

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 10:47:53 -0700 Jakub Kicinski wrote: > > Oh, I really thought list_for_each_entry_rcu() was only checking standard > > rcu. > > > > I might have been confused because we do have hlist_for_each_entry_rcu_bh() > > helper. > > > > Anyway, when looking at the patch I was not at

Re: [PATCH net 1/2] net: disable netpoll on fresh napis

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 08:43:22 -0700 Eric Dumazet wrote: > On 8/27/20 8:10 AM, Jakub Kicinski wrote: > > On Thu, 27 Aug 2020 00:25:31 -0700 Eric Dumazet wrote: > >> On 8/26/20 12:40 PM, Jakub Kicinski wrote: > >>> To ensure memory ordering is correct we need to use RCU accessors. > >> > >>> +

Re: [PATCH net 1/2] net: disable netpoll on fresh napis

2020-08-27 Thread Eric Dumazet
On 8/27/20 8:10 AM, Jakub Kicinski wrote: > On Thu, 27 Aug 2020 00:25:31 -0700 Eric Dumazet wrote: >> On 8/26/20 12:40 PM, Jakub Kicinski wrote: >>> To ensure memory ordering is correct we need to use RCU accessors. >> >>> + set_bit(NAPI_STATE_NPSVC, &napi->state); >>> + list_add_rcu(&napi->

Re: [PATCH net 1/2] net: disable netpoll on fresh napis

2020-08-27 Thread Jakub Kicinski
On Thu, 27 Aug 2020 00:25:31 -0700 Eric Dumazet wrote: > On 8/26/20 12:40 PM, Jakub Kicinski wrote: > > To ensure memory ordering is correct we need to use RCU accessors. > > > + set_bit(NAPI_STATE_NPSVC, &napi->state); > > + list_add_rcu(&napi->dev_list, &dev->napi_list); > > > > > - list

Re: [PATCH net 1/2] net: disable netpoll on fresh napis

2020-08-27 Thread Eric Dumazet
On 8/26/20 12:40 PM, Jakub Kicinski wrote: > napi_disable() makes sure to set the NAPI_STATE_NPSVC bit to prevent > netpoll from accessing rings before init is complete. However, the > same is not done for fresh napi instances in netif_napi_add(), > even though we expect NAPI instances to be add