projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54ea680
)
dccp: Prepare dccp_v4_route_skb() to .flowi4_tos conversion.
author
Guillaume Nault
<gnault@redhat.com>
Thu, 16 Jan 2025 13:10:16 +0000
(14:10 +0100)
committer
Jakub Kicinski
<kuba@kernel.org>
Sat, 18 Jan 2025 03:01:21 +0000
(19:01 -0800)
Use inet_sk_dscp() to get the socket DSCP value as dscp_t, instead of
ip_sock_rt_tos() which returns a __u8. This will ease the conversion
of fl4->flowi4_tos to dscp_t, which now just becomes a matter of
dropping the inet_dscp_to_dsfield() call.
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link:
https://patch.msgid.link/208dc5ca28bb5595d7a545de026bba18b1d63bda.1737032802.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dccp/ipv4.c
patch
|
blob
|
blame
|
history
diff --git
a/net/dccp/ipv4.c
b/net/dccp/ipv4.c
index 5926159a6f2040a78b185f0ad79addaad4386822..be515ba821e2d4d6a7bca973b5e7c2363a2f13cc 100644
(file)
--- a/
net/dccp/ipv4.c
+++ b/
net/dccp/ipv4.c
@@
-15,6
+15,7
@@
#include <net/icmp.h>
#include <net/inet_common.h>
+#include <net/inet_dscp.h>
#include <net/inet_hashtables.h>
#include <net/inet_sock.h>
#include <net/protocol.h>
@@
-473,7
+474,7
@@
static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk,
.flowi4_oif = inet_iif(skb),
.daddr = iph->saddr,
.saddr = iph->daddr,
- .flowi4_tos = i
p_sock_rt_tos(sk
),
+ .flowi4_tos = i
net_dscp_to_dsfield(inet_sk_dscp(inet_sk(sk))
),
.flowi4_scope = ip_sock_rt_scope(sk),
.flowi4_proto = sk->sk_protocol,
.fl4_sport = dccp_hdr(skb)->dccph_dport,