Development discussion of WireGuard
 help / color / mirror / Atom feed
* Leaving skb->priority alone when encapsulating?
@ 2025-09-06 21:12 Matt Corallo
  0 siblings, 0 replies; only message in thread
From: Matt Corallo @ 2025-09-06 21:12 UTC (permalink / raw)
  To: WireGuard mailing list

Its (I presume) fairly common to have multiple wireguard links on a single machine which ultimately 
has its outbound interface shaped with some tc qdisc. While wg_reset_packet leaves the skb hash flag 
alone to allow that qdisc to have visibility into the header hash, it wipes all other skb headers 
with a `memset(&skb->headers...)`. This makes it (I believe) impossible to allow the primary qdisc 
to operate on the DSCP of the inner packet (which wireguard reasonably wipes, but could otherwise be 
copied into skb->priority, which is generally an appropriate place for it).

This appears to differ from every other tunneling protocol (the only instances of `memset.*headers` 
in the entire tree are in wireguard and the mellanox drivers) and other encapsulation protocols 
appear to rely on iptunnel_xmit's clearing of the relevant flags, rather than doing it themselves.

While most of the fields in a skb's headers are perfectly reasonable to clear, I do wonder why 
wireguard is special here, but in any case it would be very nice to allow at least priority to 
propagate past wg_reset_packet.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-06 21:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-06 21:12 Leaving skb->priority alone when encapsulating? Matt Corallo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).