[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <72f1345baff9fe5a296915d4b5a7a18bd304df68.1768751557.git.wen.yang@linux.dev>
Date: Mon, 19 Jan 2026 00:28:22 +0800
From: wen.yang@...ux.dev
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: stable@...r.kernel.org,
linux-kernel@...r.kernel.org,
Eric Dumazet <edumazet@...gle.com>,
Jason Xing <kerneljasonxing@...il.com>,
Paolo Abeni <pabeni@...hat.com>,
Wen Yang <wen.yang@...ux.dev>
Subject: [PATCH 6.1 1/3] net: napi_schedule_rps() cleanup
From: Eric Dumazet <edumazet@...gle.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@...gle.com>
Reviewed-by: Jason Xing <kerneljasonxing@...il.com>
Tested-by: Jason Xing <kerneljasonxing@...il.com>
Signed-off-by: Paolo Abeni <pabeni@...hat.com>
Signed-off-by: Wen Yang <wen.yang@...ux.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
Powered by blists - more mailing lists