public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2 net-next] geneve: fix TOS inheriting
@ 2022-07-24  0:37 Matthias May
  2022-07-24  0:37 ` [PATCH 1/2 net-next] geneve: fix TOS inheriting for ipv4 Matthias May
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matthias May @ 2022-07-24  0:37 UTC (permalink / raw)
  To: netdev
  Cc: davem, yoshfuji, dsahern, edumazet, kuba, pabeni, nicolas.dichtel,
	eyal.birger, linux-kernel, Matthias May

Currently when the TOS of an encapsulated frame is inherited,
the 6 DSCP bits are cut down to 3 original TOS bits.
Compare to other L2 tunneling protocols (gretap, vxlan) this
is unexpected.
IPv4 and IPv6 have both this behaviour but for different reasons.

For IPv4 the bits are lost in the routing table lookup.
The patch copies the full tos out before the lookup and uses the copy.

For IPv6 the RT_TOS macro cuts off the 3 bits.
I'm not really familiar with the IPv6 code, but to me it seems as
if this part of the code only uses the TOS for the flowlabel.
Is there any reason why the flowlabel should be restricted to these
3 bits? The patch simply removes the usage of this macro, but i don't
know if there was a specific intention behind that. I can't find any
immediate breakage, but then again my IPv6 testing is fairly limited.

Matthias May (2):
  geneve: fix TOS inheriting for ipv4
  geneve: fix TOS inheriting for ipv6

 drivers/net/geneve.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-27 14:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-24  0:37 [PATCH 0/2 net-next] geneve: fix TOS inheriting Matthias May
2022-07-24  0:37 ` [PATCH 1/2 net-next] geneve: fix TOS inheriting for ipv4 Matthias May
2022-07-24  0:37 ` [PATCH 2/2 net-next] geneve: fix TOS inheriting for ipv6 Matthias May
2022-07-25 17:05   ` Guillaume Nault
2022-07-26 16:29     ` Matthias May
2022-07-27 14:45       ` Guillaume Nault
2022-07-25 16:57 ` [PATCH 0/2 net-next] geneve: fix TOS inheriting Guillaume Nault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox