From: Miroslav Lichvar <mlichvar@redhat.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] wireguard: queuing: preserve napi_id on decapsulation
Date: Thu, 30 Oct 2025 19:37:00 +0100 [thread overview]
Message-ID: <aQOwTIVz9lj3lcpL@localhost> (raw)
In-Reply-To: <CAHmME9rG1r5fJfubpcyK99g7G9YvnELq5+iW-+ms-Jb9dwPk+g@mail.gmail.com>
On Thu, Oct 30, 2025 at 06:57:34PM +0100, Jason A. Donenfeld wrote:
> > +#if defined(CONFIG_NET_RX_BUSY_POLL) || defined(CONFIG_XPS)
> > + skb->napi_id = napi_id;
> > +#endif
>
> Seems incorrect. Although the union where napi_id is defined has that
> define here:
>
> #if defined(CONFIG_NET_RX_BUSY_POLL) || defined(CONFIG_XPS)
> union {
> unsigned int napi_id;
> unsigned int sender_cpu;
> };
> #endif
>
> The skb_napi_id() has the narrower condition here:
> So I think all we care about is CONFIG_NET_RX_BUSY_POLL.
Ok, I'll fix that.
> > + } else {
>
> Why only do this in the !encapsulating case? Are get_timestamp() and
> put_ts_pktinfo() only called when !encapsulating?
Yes, I think so. The cmsg enabled by the timestamping option is added
only for received packets. Transmit timestamps are provided separately
with the packet looped back to the error queue (the timestamp is known
only after the actual transmission) and that can already provide the
index of the physical device in the IP_PKTINFO cmsg, which seems to
work correctly even with wireguard interfaces.
I'm not sure if the napi_id is actually used when sending. In my tests
it looked like it's the other field of the union, the sender cpu
index.
Thanks,
--
Miroslav Lichvar
prev parent reply other threads:[~2025-10-30 18:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 10:48 [PATCH net-next] wireguard: queuing: preserve napi_id on decapsulation Miroslav Lichvar
2025-10-30 17:57 ` Jason A. Donenfeld
2025-10-30 18:37 ` Miroslav Lichvar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aQOwTIVz9lj3lcpL@localhost \
--to=mlichvar@redhat.com \
--cc=Jason@zx2c4.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox