Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vrf: Prepare vrf_process_v4_outbound() to future .flowi4_tos conversion.

Use ip4h_dscp() to get the DSCP from the IPv4 header, then convert the
dscp_t value to __u8 with inet_dscp_to_dsfield().

Then, when we'll convert .flowi4_tos to dscp_t, we'll just have to drop
the inet_dscp_to_dsfield() call.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/6be084229008dcfa7a4e2758befccfd2217a331e.1730294788.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Guillaume Nault and committed by
Jakub Kicinski
937677f4 0c30d6ee

+1 -1
+1 -1
drivers/net/vrf.c
··· 521 521 /* needed to match OIF rule */ 522 522 fl4.flowi4_l3mdev = vrf_dev->ifindex; 523 523 fl4.flowi4_iif = LOOPBACK_IFINDEX; 524 - fl4.flowi4_tos = ip4h->tos & INET_DSCP_MASK; 524 + fl4.flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(ip4h)); 525 525 fl4.flowi4_flags = FLOWI_FLAG_ANYSRC; 526 526 fl4.flowi4_proto = ip4h->protocol; 527 527 fl4.daddr = ip4h->daddr;