Re: [PATCH net-next v4 2/3] net: implement threaded-able napi poll loop support

2020-12-14 Thread Jakub Kicinski
On Mon, 14 Dec 2020 11:45:43 -0800 Wei Wang wrote: > > It is quite an annoying problem to address, given all relevant NAPI > > helpers seem to return void :/ But we're pushing the problem onto the > > user just because of internal API structure. > > > > This reminds me of PTP / timestamping issues

Re: [PATCH net-next v4 2/3] net: implement threaded-able napi poll loop support

2020-12-14 Thread Jakub Kicinski
On Mon, 14 Dec 2020 09:59:21 -0800 Wei Wang wrote: > On Sat, Dec 12, 2020 at 2:55 PM Jakub Kicinski wrote: > > > > On Sat, 12 Dec 2020 14:50:22 -0800 Jakub Kicinski wrote: > > > > @@ -6731,6 +6790,7 @@ void napi_disable(struct napi_struct *n) > > > > msleep(1); > > > > > > > > hr

Re: [PATCH net-next v4 2/3] net: implement threaded-able napi poll loop support

2020-12-12 Thread Jakub Kicinski
On Sat, 12 Dec 2020 14:50:22 -0800 Jakub Kicinski wrote: > > @@ -6731,6 +6790,7 @@ void napi_disable(struct napi_struct *n) > > msleep(1); > > > > hrtimer_cancel(&n->timer); > > + napi_kthread_stop(n); > > I'm surprised that we stop the thread on napi_disable() but there is n

Re: [PATCH net-next v4 2/3] net: implement threaded-able napi poll loop support

2020-12-12 Thread Jakub Kicinski
On Tue, 8 Dec 2020 16:54:43 -0800 Wei Wang wrote: > This patch allows running each napi poll loop inside its own > kernel thread. > The threaded mode could be enabled through napi_set_threaded() > api, and does not require a device up/down. The kthread gets > created on demand when napi_set_thread