From: wen.yang@linux.dev
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Dumazet <edumazet@google.com>,
Jason Xing <kerneljasonxing@gmail.com>,
Paolo Abeni <pabeni@redhat.com>, Wen Yang <wen.yang@linux.dev>
Subject: [PATCH 6.6 1/3] net: napi_schedule_rps() cleanup
Date: Mon, 19 Jan 2026 00:15:44 +0800 [thread overview]
Message-ID: <72f1345baff9fe5a296915d4b5a7a18bd304df68.1768751557.git.wen.yang@linux.dev> (raw)
In-Reply-To: <cover.1768751557.git.wen.yang@linux.dev>
From: Eric Dumazet <edumazet@google.com>
commit 8fcb76b934daff12cde76adeab3d502eeb0734b1 upstream.
napi_schedule_rps() return value is ignored, remove it.
Change the comment to clarify the intent.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Tested-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Wen Yang <wen.yang@linux.dev>
---
net/core/dev.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 114fc8bc37f8..e35f41e75bdd 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4684,11 +4684,18 @@ static void trigger_rx_softirq(void *data)
}
/*
- * Check if this softnet_data structure is another cpu one
- * If yes, queue it to our IPI list and return 1
- * If no, return 0
+ * After we queued a packet into sd->input_pkt_queue,
+ * we need to make sure this queue is serviced soon.
+ *
+ * - If this is another cpu queue, link it to our rps_ipi_list,
+ * and make sure we will process rps_ipi_list from net_rx_action().
+ * As we do not know yet if we are called from net_rx_action(),
+ * we have to raise NET_RX_SOFTIRQ. This might change in the future.
+ *
+ * - If this is our own queue, NAPI schedule our backlog.
+ * Note that this also raises NET_RX_SOFTIRQ.
*/
-static int napi_schedule_rps(struct softnet_data *sd)
+static void napi_schedule_rps(struct softnet_data *sd)
{
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
@@ -4698,11 +4705,10 @@ static int napi_schedule_rps(struct softnet_data *sd)
mysd->rps_ipi_list = sd;
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
- return 1;
+ return;
}
#endif /* CONFIG_RPS */
__napi_schedule_irqoff(&mysd->backlog);
- return 0;
}
#ifdef CONFIG_NET_FLOW_LIMIT
--
2.25.1
WARNING: multiple messages have this Message-ID
From: wen.yang@linux.dev
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Dumazet <edumazet@google.com>,
Jason Xing <kerneljasonxing@gmail.com>,
Paolo Abeni <pabeni@redhat.com>, Wen Yang <wen.yang@linux.dev>
Subject: [PATCH 6.1 1/3] net: napi_schedule_rps() cleanup
Date: Mon, 19 Jan 2026 00:17:39 +0800 [thread overview]
Message-ID: <72f1345baff9fe5a296915d4b5a7a18bd304df68.1768751557.git.wen.yang@linux.dev> (raw)
Message-ID: <20260118161739.QIjNMox2SNCB_OiN4Y2zPFqCji95gxiKPtpq0VE_BMI@z> (raw)
In-Reply-To: <cover.1768751557.git.wen.yang@linux.dev>
From: Eric Dumazet <edumazet@google.com>
commit 8fcb76b934daff12cde76adeab3d502eeb0734b1 upstream.
napi_schedule_rps() return value is ignored, remove it.
Change the comment to clarify the intent.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Tested-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Wen Yang <wen.yang@linux.dev>
---
net/core/dev.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 114fc8bc37f8..e35f41e75bdd 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4684,11 +4684,18 @@ static void trigger_rx_softirq(void *data)
}
/*
- * Check if this softnet_data structure is another cpu one
- * If yes, queue it to our IPI list and return 1
- * If no, return 0
+ * After we queued a packet into sd->input_pkt_queue,
+ * we need to make sure this queue is serviced soon.
+ *
+ * - If this is another cpu queue, link it to our rps_ipi_list,
+ * and make sure we will process rps_ipi_list from net_rx_action().
+ * As we do not know yet if we are called from net_rx_action(),
+ * we have to raise NET_RX_SOFTIRQ. This might change in the future.
+ *
+ * - If this is our own queue, NAPI schedule our backlog.
+ * Note that this also raises NET_RX_SOFTIRQ.
*/
-static int napi_schedule_rps(struct softnet_data *sd)
+static void napi_schedule_rps(struct softnet_data *sd)
{
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
@@ -4698,11 +4705,10 @@ static int napi_schedule_rps(struct softnet_data *sd)
mysd->rps_ipi_list = sd;
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
- return 1;
+ return;
}
#endif /* CONFIG_RPS */
__napi_schedule_irqoff(&mysd->backlog);
- return 0;
}
#ifdef CONFIG_NET_FLOW_LIMIT
--
2.25.1
WARNING: multiple messages have this Message-ID
From: wen.yang@linux.dev
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Dumazet <edumazet@google.com>,
Jason Xing <kerneljasonxing@gmail.com>,
Paolo Abeni <pabeni@redhat.com>, Wen Yang <wen.yang@linux.dev>
Subject: [PATCH 6.1 1/3] net: napi_schedule_rps() cleanup
Date: Mon, 19 Jan 2026 00:28:22 +0800 [thread overview]
Message-ID: <72f1345baff9fe5a296915d4b5a7a18bd304df68.1768751557.git.wen.yang@linux.dev> (raw)
Message-ID: <20260118162822.M4jUnzHWSZFj1_tP-2uX0RVgAXloMLtprWvomVYJvEQ@z> (raw)
In-Reply-To: <cover.1768751557.git.wen.yang@linux.dev>
From: Eric Dumazet <edumazet@google.com>
commit 8fcb76b934daff12cde76adeab3d502eeb0734b1 upstream.
napi_schedule_rps() return value is ignored, remove it.
Change the comment to clarify the intent.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Tested-by: Jason Xing <kerneljasonxing@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Wen Yang <wen.yang@linux.dev>
---
net/core/dev.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 114fc8bc37f8..e35f41e75bdd 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4684,11 +4684,18 @@ static void trigger_rx_softirq(void *data)
}
/*
- * Check if this softnet_data structure is another cpu one
- * If yes, queue it to our IPI list and return 1
- * If no, return 0
+ * After we queued a packet into sd->input_pkt_queue,
+ * we need to make sure this queue is serviced soon.
+ *
+ * - If this is another cpu queue, link it to our rps_ipi_list,
+ * and make sure we will process rps_ipi_list from net_rx_action().
+ * As we do not know yet if we are called from net_rx_action(),
+ * we have to raise NET_RX_SOFTIRQ. This might change in the future.
+ *
+ * - If this is our own queue, NAPI schedule our backlog.
+ * Note that this also raises NET_RX_SOFTIRQ.
*/
-static int napi_schedule_rps(struct softnet_data *sd)
+static void napi_schedule_rps(struct softnet_data *sd)
{
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
@@ -4698,11 +4705,10 @@ static int napi_schedule_rps(struct softnet_data *sd)
mysd->rps_ipi_list = sd;
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
- return 1;
+ return;
}
#endif /* CONFIG_RPS */
__napi_schedule_irqoff(&mysd->backlog);
- return 0;
}
#ifdef CONFIG_NET_FLOW_LIMIT
--
2.25.1
next prev parent reply other threads:[~2026-01-18 16:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 16:15 [PATCH 6.6 0/3] net: Backlog NAPI threading for PREEMPT_RT wen.yang
2026-01-18 16:15 ` wen.yang [this message]
2026-01-18 16:17 ` [PATCH 6.1 1/3] net: napi_schedule_rps() cleanup wen.yang
2026-01-18 16:28 ` wen.yang
2026-01-18 16:15 ` [PATCH 6.6 2/3] net: Remove conditional threaded-NAPI wakeup based on task state wen.yang
2026-01-18 16:17 ` [PATCH 6.1 " wen.yang
2026-01-18 16:28 ` wen.yang
2026-01-18 16:15 ` [PATCH 6.6 3/3] net: Allow to use SMP threads for backlog NAPI wen.yang
2026-01-18 16:17 ` [PATCH 6.1 " wen.yang
2026-01-18 16:28 ` wen.yang
2026-01-18 16:31 ` wen.yang
2026-01-19 16:25 ` [PATCH 6.6 " Jakub Kicinski
2026-01-19 16:30 ` Sebastian Andrzej Siewior
2026-01-20 6:03 ` Greg Kroah-Hartman
2026-01-20 8:01 ` Sebastian Andrzej Siewior
2026-01-20 9:21 ` Greg Kroah-Hartman
2026-01-20 10:38 ` Sebastian Andrzej Siewior
2026-02-04 13:54 ` Greg Kroah-Hartman
2026-02-07 20:26 ` Wen Yang
2026-01-18 16:17 ` [PATCH 6.1 0/3] net: Backlog NAPI threading for PREEMPT_RT wen.yang
2026-01-18 16:28 ` wen.yang
2026-01-18 17:02 ` [PATCH 6.6 " Wen Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=72f1345baff9fe5a296915d4b5a7a18bd304df68.1768751557.git.wen.yang@linux.dev \
--to=wen.yang@linux.dev \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kerneljasonxing@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome