From: Joe Damato Date: Thu, 24 Apr 2025 00:27:31 +0000 (+0000) Subject: netdevsim: Mark NAPI ID on skb in nsim_rcv X-Git-Tag: v6.16-rc1~132^2~215^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f71c549b26a33fd62f1e9c7deeba738bfc73fbfc;p=thirdparty%2Flinux.git 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. Signed-off-by: Joe Damato Link: https://patch.msgid.link/20250424002746.16891-2-jdamato@fastly.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index 0e0321a7ddd71..2aa999345fe12 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "netdevsim.h" @@ -357,6 +358,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); }