diff options
| author | Joe Damato <jdamato@fastly.com> | 2025-04-24 03:27:31 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-06-27 13:11:33 +0300 |
| commit | 4e42f355c5105050139751b2e843aeed231c4bfc (patch) | |
| tree | 2d49dbbd2a0e120b3b1d98e2383d3f2776175bae /drivers/net/netdevsim/netdev.c | |
| parent | 606b577368a2b8239942bf579d100c8db0f0119d (diff) | |
| download | linux-4e42f355c5105050139751b2e843aeed231c4bfc.tar.xz | |
netdevsim: Mark NAPI ID on skb in nsim_rcv
[ Upstream commit f71c549b26a33fd62f1e9c7deeba738bfc73fbfc ]
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.
Signed-off-by: Joe Damato <jdamato@fastly.com>
Link: https://patch.msgid.link/20250424002746.16891-2-jdamato@fastly.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/netdevsim/netdev.c')
| -rw-r--r-- | drivers/net/netdevsim/netdev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index 79b898311819..ee2a7b2f6268 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -25,6 +25,7 @@ #include <net/pkt_cls.h> #include <net/rtnetlink.h> #include <net/udp_tunnel.h> +#include <net/busy_poll.h> #include "netdevsim.h" @@ -341,6 +342,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); } |
