Leaving skb->priority alone when encapsulating?
Matt Corallo <[email protected]>
| Newsgroups | com.zx2c4.lists.wireguard |
|---|---|
| Message-ID | <[email protected]> |
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.