From: Ido Schimmel <idosch@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <edumazet@google.com>,
<pabeni@redhat.com>, <dsahern@kernel.org>, <gnault@redhat.com>,
Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 1/4] ipv4: Unmask upper DSCP bits in __ip_queue_xmit()
Date: Tue, 3 Sep 2024 16:53:24 +0300 [thread overview]
Message-ID: <20240903135327.2810535-2-idosch@nvidia.com> (raw)
In-Reply-To: <20240903135327.2810535-1-idosch@nvidia.com>
The function is passed the full DS field in its 'tos' argument by its
two callers. It then masks the upper DSCP bits using RT_TOS() when
passing it to ip_route_output_ports().
Unmask the upper DSCP bits when passing 'tos' to ip_route_output_ports()
so that in the future it could perform the FIB lookup according to the
full DSCP value.
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
net/ipv4/ip_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index eea443b7f65e..49811c9281d4 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -494,7 +494,7 @@ int __ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
inet->inet_dport,
inet->inet_sport,
sk->sk_protocol,
- RT_TOS(tos),
+ tos & INET_DSCP_MASK,
sk->sk_bound_dev_if);
if (IS_ERR(rt))
goto no_route;
--
2.46.0
next prev parent reply other threads:[~2024-09-03 13:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 13:53 [PATCH net-next 0/4] Unmask upper DSCP bits - part 3 Ido Schimmel
2024-09-03 13:53 ` Ido Schimmel [this message]
2024-09-03 15:52 ` [PATCH net-next 1/4] ipv4: Unmask upper DSCP bits in __ip_queue_xmit() Guillaume Nault
2024-09-03 13:53 ` [PATCH net-next 2/4] ipv4: ipmr: Unmask upper DSCP bits in ipmr_queue_xmit() Ido Schimmel
2024-09-03 15:54 ` Guillaume Nault
2024-09-03 13:53 ` [PATCH net-next 3/4] ip6_tunnel: Unmask upper DSCP bits in ip4ip6_err() Ido Schimmel
2024-09-03 15:59 ` Guillaume Nault
2024-09-03 13:53 ` [PATCH net-next 4/4] ipv6: sit: Unmask upper DSCP bits in ipip6_tunnel_bind_dev() Ido Schimmel
2024-09-03 16:02 ` Guillaume Nault
2024-09-03 14:45 ` [PATCH net-next 0/4] Unmask upper DSCP bits - part 3 David Ahern
2024-09-05 0:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240903135327.2810535-2-idosch@nvidia.com \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.