dccp: Prepare dccp_v4_route_skb() to .flowi4_tos conversion.
Subsystems (2)
PATCH v2 1/1 dccp: Prepare dccp_v4_route_skb() to .flowi4_tos conversion.
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.
---
v2: Remove useless parenthesis (Eric).
Slightly reword the commit message for clarity.
net/dccp/ipv4.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/dccp/ipv4.c +2 -1
@@ -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 = ip_sock_rt_tos(sk), + .flowi4_tos = inet_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,
Signature · 1 line
2.39.2
Quoted 8 lines · Guillaume Nault
Use
inet_sk_dscp()to get the socket DSCP value asdscp_t, instead ofip_sock_rt_tos()which returns a__u8. This will ease the conversion offl4->flowi4_tostodscp_t, which now just becomes a matter of dropping theinet_dscp_to_dsfield()call.Signed-off-by Guillaume Nault <[email protected]>---
Quoted 6 lines · Guillaume Nault
Use
inet_sk_dscp()to get the socket DSCP value asdscp_t, instead ofip_sock_rt_tos()which returns a__u8. This will ease the conversion offl4->flowi4_tostodscp_t, which now just becomes a matter of dropping theinet_dscp_to_dsfield()call.Signed-off-by Guillaume Nault <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Thu, 16 Jan 2025 14:10:16 +0100 you wrote:
Use
inet_sk_dscp()to get the socket DSCP value asdscp_t, instead ofip_sock_rt_tos()which returns a__u8. This will ease the conversion offl4->flowi4_tostodscp_t, which now just becomes a matter of dropping theinet_dscp_to_dsfield()call.Signed-off-by Guillaume Nault <[email protected]>[...]
Here is the summary with links:
- [net-next,v2] dccp: Prepare dccp_v4_route_skb() to .flowi4_tos conversion.
https://git.kernel.org/netdev/net-next/c/02673d58adfa
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html