diff options
| author | Joe Damato <[email protected]> | 2025-04-24 00:27:31 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-04-25 01:30:01 +0000 |
| commit | f71c549b26a33fd62f1e9c7deeba738bfc73fbfc (patch) | |
| tree | ebe9ecf87fbdd2322b1f96ef3b105a94c3e75927 /drivers/net/netdevsim/netdev.c | |
| parent | tools: ynl: fix the header guard name for OVPN (diff) | |
| download | kernel-f71c549b26a33fd62f1e9c7deeba738bfc73fbfc.tar.gz kernel-f71c549b26a33fd62f1e9c7deeba738bfc73fbfc.zip | |
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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
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 0e0321a7ddd7..2aa999345fe1 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -29,6 +29,7 @@ #include <net/pkt_cls.h> #include <net/rtnetlink.h> #include <net/udp_tunnel.h> +#include <net/busy_poll.h> #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); } |
