[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250329000030.39543-2-jdamato@fastly.com>
Date: Sat, 29 Mar 2025 00:00:29 +0000
From: Joe Damato <jdamato@...tly.com>
To: netdev@...r.kernel.org
Cc: Joe Damato <jdamato@...tly.com>,
Jakub Kicinski <kuba@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
David Wei <dw@...idwei.uk>,
linux-kernel@...r.kernel.org (open list)
Subject: [RFC net 1/1] netdevsim: Mark NAPI ID on skb in nsim_rcv
Previously, nsim_rcv was not marking the NAPI ID on the skb, leading to
applications seeing a napi ID of 0 when using SO_INCOMING_NAPI_ID.
To add to the userland confusion, netlink appears to correctly report
the NAPI IDs for netdevsim queues but the resulting file descriptor from
a call to accept() was reporting a NAPI ID of 0.
Fixes: 3762ec05a9fb ("netdevsim: add NAPI support")
Signed-off-by: Joe Damato <jdamato@...tly.com>
---
drivers/net/netdevsim/netdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index b67af4651185..1c67030fba6a 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -29,7 +29,7 @@
#include <net/pkt_cls.h>
#include <net/rtnetlink.h>
#include <net/udp_tunnel.h>
-
+#include <net/busy_poll.h>
#include "netdevsim.h"
MODULE_IMPORT_NS("NETDEV_INTERNAL");
@@ -357,6 +357,7 @@ static int nsim_rcv(struct nsim_rq *rq, int budget)
break;
skb = skb_dequeue(&rq->skb_queue);
+ skb_mark_napi_id(skb, &rq->napi);
netif_receive_skb(skb);
}
--
2.43.0
Powered by blists - more mailing lists