Thread (9 messages) 9 messages, 3 authors, 2021-04-09

Re: [PATCH net] net: fix hangup on napi_disable for threaded napi

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-04-09 15:15:59

On Fri, 09 Apr 2021 11:24:07 +0200 Paolo Abeni wrote:
I think it can be simplified as the following - if NAPIF_STATE_DISABLE
is set, napi_threaded_poll()/__napi_poll() will return clearing the
SCHEDS bits after trying to poll the device:
Indeed!
quoted hunk ↗ jump to hunk
diff --git a/net/core/dev.c b/net/core/dev.c
index d9db02d4e044..5cb6f411043d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6985,7 +6985,7 @@ static int napi_thread_wait(struct napi_struct *napi)
 
        set_current_state(TASK_INTERRUPTIBLE);
 
-       while (!kthread_should_stop() && !napi_disable_pending(napi)) {
+       while (!kthread_should_stop()) {
                /* Testing SCHED_THREADED bit here to make sure the current
                 * kthread owns this napi and could poll on this napi.
                 * Testing SCHED bit is not enough because SCHED bit might be

---
And works as intended here. I'll submit that formally, unless there are
objection.
Please and thank you!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help