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.

ipvlan: Prepare ipvlan_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: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/f48335504a05b3587e0081a9b4511e0761571ca5.1730292157.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Guillaume Nault and committed by
Jakub Kicinski
0c30d6ee 8a6631f1

+2 -1
+2 -1
drivers/net/ipvlan/ipvlan_core.c
··· 3 3 */ 4 4 5 5 #include <net/inet_dscp.h> 6 + #include <net/ip.h> 6 7 7 8 #include "ipvlan.h" 8 9 ··· 423 422 int err, ret = NET_XMIT_DROP; 424 423 struct flowi4 fl4 = { 425 424 .flowi4_oif = dev->ifindex, 426 - .flowi4_tos = ip4h->tos & INET_DSCP_MASK, 425 + .flowi4_tos = inet_dscp_to_dsfield(ip4h_dscp(ip4h)), 427 426 .flowi4_flags = FLOWI_FLAG_ANYSRC, 428 427 .flowi4_mark = skb->mark, 429 428 .daddr = ip4h->daddr,