BPF List
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<edumazet@google.com>, <gnault@redhat.com>, <dsahern@kernel.org>,
	<fw@strlen.de>, <martin.lau@linux.dev>, <daniel@iogearbox.net>,
	<john.fastabend@gmail.com>, <ast@kernel.org>,
	<pablo@netfilter.org>, <kadlec@netfilter.org>,
	<willemdebruijn.kernel@gmail.com>, <bpf@vger.kernel.org>,
	<netfilter-devel@vger.kernel.org>, <coreteam@netfilter.org>,
	Ido Schimmel <idosch@nvidia.com>
Subject: [PATCH net-next 09/12] ipv4: Unmask upper DSCP bits in RTM_GETROUTE input route lookup
Date: Wed, 21 Aug 2024 15:52:48 +0300	[thread overview]
Message-ID: <20240821125251.1571445-10-idosch@nvidia.com> (raw)
In-Reply-To: <20240821125251.1571445-1-idosch@nvidia.com>

Unmask the upper DSCP bits when looking up an input route via the
RTM_GETROUTE netlink message so that in the future the lookup could be
performed according to the full DSCP value.

No functional changes intended since the upper DSCP bits are masked when
comparing against the TOS selectors in FIB rules and routes.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
---
 net/ipv4/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 73bb61162445..524b70ab77a0 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3286,7 +3286,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
 		skb->dev	= dev;
 		skb->mark	= mark;
 		err = ip_route_input_rcu(skb, dst, src,
-					 rtm->rtm_tos & IPTOS_RT_MASK, dev,
+					 rtm->rtm_tos & INET_DSCP_MASK, dev,
 					 &res);
 
 		rt = skb_rtable(skb);
-- 
2.46.0


  parent reply	other threads:[~2024-08-21 12:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-21 12:52 [PATCH net-next 00/12] Unmask upper DSCP bits - part 1 Ido Schimmel
2024-08-21 12:52 ` [PATCH net-next 01/12] bpf: Unmask upper DSCP bits in bpf_fib_lookup() helper Ido Schimmel
2024-08-21 14:35   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 02/12] ipv4: Unmask upper DSCP bits in NETLINK_FIB_LOOKUP family Ido Schimmel
2024-08-21 14:37   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 03/12] ipv4: Unmask upper DSCP bits when constructing the Record Route option Ido Schimmel
2024-08-21 14:46   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 04/12] netfilter: rpfilter: Unmask upper DSCP bits Ido Schimmel
2024-08-21 14:50   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 05/12] netfilter: nft_fib: " Ido Schimmel
2024-08-21 14:53   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 06/12] ipv4: ipmr: Unmask upper DSCP bits in ipmr_rt_fib_lookup() Ido Schimmel
2024-08-21 15:05   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 07/12] ipv4: Unmask upper DSCP bits in fib_compute_spec_dst() Ido Schimmel
2024-08-21 15:06   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 08/12] ipv4: Unmask upper DSCP bits in input route lookup Ido Schimmel
2024-08-21 16:28   ` Guillaume Nault
2024-08-21 12:52 ` Ido Schimmel [this message]
2024-08-21 16:30   ` [PATCH net-next 09/12] ipv4: Unmask upper DSCP bits in RTM_GETROUTE " Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 10/12] ipv4: icmp: Pass full DS field to ip_route_input() Ido Schimmel
2024-08-21 16:44   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 11/12] ipv4: udp: Unmask upper DSCP bits during early demux Ido Schimmel
2024-08-21 16:46   ` Guillaume Nault
2024-08-21 12:52 ` [PATCH net-next 12/12] ipv4: Unmask upper DSCP bits when using hints Ido Schimmel
2024-08-21 16:50   ` Guillaume Nault
2024-08-21 14:48 ` [PATCH net-next 00/12] Unmask upper DSCP bits - part 1 Florian Westphal
2024-08-21 17:00 ` David Ahern
2024-08-23  0:10 ` 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=20240821125251.1571445-10-idosch@nvidia.com \
    --to=idosch@nvidia.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=coreteam@netfilter.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=fw@strlen.de \
    --cc=gnault@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=willemdebruijn.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox