projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c30d6e
)
vrf: Prepare vrf_process_v4_outbound() to future .flowi4_tos conversion.
author
Guillaume Nault
<gnault@redhat.com>
Wed, 30 Oct 2024 13:27:19 +0000
(14:27 +0100)
committer
Jakub Kicinski
<kuba@kernel.org>
Sun, 3 Nov 2024 22:29:05 +0000
(14:29 -0800)
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>
drivers/net/vrf.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/vrf.c
b/drivers/net/vrf.c
index 4087f72f0d2be866dbc93adc257a931e9a10477c..67d25f4f94efffdf22b11dcf2ebad77893436820 100644
(file)
--- a/
drivers/net/vrf.c
+++ b/
drivers/net/vrf.c
@@
-521,7
+521,7
@@
static netdev_tx_t vrf_process_v4_outbound(struct sk_buff *skb,
/* needed to match OIF rule */
fl4.flowi4_l3mdev = vrf_dev->ifindex;
fl4.flowi4_iif = LOOPBACK_IFINDEX;
- fl4.flowi4_tos = i
p4h->tos & INET_DSCP_MASK
;
+ fl4.flowi4_tos = i
net_dscp_to_dsfield(ip4h_dscp(ip4h))
;
fl4.flowi4_flags = FLOWI_FLAG_ANYSRC;
fl4.flowi4_proto = ip4h->protocol;
fl4.daddr = ip4h->daddr;