Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Eric Dumazet
On 4/14/21 10:08 AM, Lijun Pan wrote: > There are chances that napi_disable can be called twice by NIC driver. > This could generate deadlock. For example, > the first napi_disable will spin until NAPI_STATE_SCHED is cleared > by napi_complete_done, then set it again. > When napi_disable is call

Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Eric Dumazet
On 4/15/21 1:21 AM, Jakub Kicinski wrote: > On Wed, 14 Apr 2021 03:08:45 -0500 Lijun Pan wrote: >> There are chances that napi_disable can be called twice by NIC driver. >> This could generate deadlock. For example, >> the first napi_disable will spin until NAPI_STATE_SCHED is cleared >> by napi

Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Jakub Kicinski
On Wed, 14 Apr 2021 03:08:45 -0500 Lijun Pan wrote: > There are chances that napi_disable can be called twice by NIC driver. > This could generate deadlock. For example, > the first napi_disable will spin until NAPI_STATE_SCHED is cleared > by napi_complete_done, then set it again. > When napi_disa

Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Lijun Pan
On Wed, Apr 14, 2021 at 3:45 AM Yunsheng Lin wrote: > > On 2021/4/14 16:08, Lijun Pan wrote: > > There are chances that napi_disable can be called twice by NIC driver. > > This could generate deadlock. For example, > > the first napi_disable will spin until NAPI_STATE_SCHED is cleared > > by napi_

Re: [PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Yunsheng Lin
On 2021/4/14 16:08, Lijun Pan wrote: > There are chances that napi_disable can be called twice by NIC driver. > This could generate deadlock. For example, > the first napi_disable will spin until NAPI_STATE_SCHED is cleared > by napi_complete_done, then set it again. > When napi_disable is called t

[PATCH net v2] net: core: make napi_disable more robust

2021-04-14 Thread Lijun Pan
There are chances that napi_disable can be called twice by NIC driver. This could generate deadlock. For example, the first napi_disable will spin until NAPI_STATE_SCHED is cleared by napi_complete_done, then set it again. When napi_disable is called the second time, it will loop infinitely because