Skip to content

Unmask upper DSCP bits - part 1

Ido Schimmel bpf netdev netfilter-devel 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 14 repliesApplied 12/12

Patches in v1 All 12 applied

#Subject and filesSizeRepliesApplied
1/12bpf: Unmask upper DSCP bits in bpf_fib_lookup() helpernet/core/filter.c+2 -11 replyApplied
2/12ipv4: Unmask upper DSCP bits in NETLINK_FIB_LOOKUP familynet/ipv4/fib_frontend.c+1 -11 replyApplied
3/12ipv4: Unmask upper DSCP bits when constructing the Record Route optionnet/ipv4/route.c+1 -11 replyApplied
4/12netfilter: rpfilter: Unmask upper DSCP bitsnet/ipv4/netfilter/ipt_rpfilter.c+2 -11 replyApplied
5/12netfilter: nft_fib: Unmask upper DSCP bitsnet/ipv4/netfilter/nft_fib_ipv4.c+2 -11 replyApplied
6/12ipv4: ipmr: Unmask upper DSCP bits in ipmr_rt_fib_lookup()net/ipv4/ipmr.c+2 -11 replyApplied
7/12ipv4: Unmask upper DSCP bits in fib_compute_spec_dst()net/ipv4/fib_frontend.c+1 -11 replyApplied
8/12ipv4: Unmask upper DSCP bits in input route lookupnet/ipv4/route.c+1 -11 replyApplied
9/12ipv4: Unmask upper DSCP bits in RTM_GETROUTE input route lookupnet/ipv4/route.c+1 -11 replyApplied
10/12ipv4: icmp: Pass full DS field to ip_route_input()net/ipv4/icmp.c+1 -11 replyApplied
11/12ipv4: udp: Unmask upper DSCP bits during early demuxnet/ipv4/udp.c+2 -11 replyApplied
12/12ipv4: Unmask upper DSCP bits when using hintsnet/ipv4/route.c+1 -11 replyApplied

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGuillaume NaultFlorian WestphalDavid Ahern
SeriesA-b R-b
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH net-next 00/12] Unmask upper DSCP bits - part 1

tl;dr - This patchset starts to unmask the upper DSCP bits in the IPv4 flow key in preparation for allowing IPv4 FIB rules to match on DSCP. No functional changes are expected.

The TOS field in the IPv4 flow key ('flowi4_tos') is used during FIB lookup to match against the TOS selector in FIB rules and routes.

It is currently impossible for user space to configure FIB rules that match on the DSCP value as the upper DSCP bits are either masked in the various call sites that initialize the IPv4 flow key or along the path to the FIB core.

In preparation for adding a DSCP selector to IPv4 and IPv6 FIB rules, we need to make sure the entire DSCP value is present in the IPv4 flow key. This patchset starts to unmask the upper DSCP bits in the various places that invoke the core FIB lookup functions directly (patches #1-#7) and in the input route path (patches #8-#12). Future patchsets will do the same in the output route path.

No functional changes are expected as commit 1fa3314c14c6 ("ipv4:
Centralize TOS matching") moved the masking of the upper DSCP bits to the core where 'flowi4_tos' is matched against the TOS selector.

Ido Schimmel (12):
bpf: Unmask upper DSCP bits in bpf_fib_lookup() helper
ipv4: Unmask upper DSCP bits in NETLINK_FIB_LOOKUP family
ipv4: Unmask upper DSCP bits when constructing the Record Route option
netfilter: rpfilter: Unmask upper DSCP bits
netfilter: nft_fib: Unmask upper DSCP bits
ipv4: ipmr: Unmask upper DSCP bits in ipmr_rt_fib_lookup()
ipv4: Unmask upper DSCP bits in fib_compute_spec_dst()
ipv4: Unmask upper DSCP bits in input route lookup
ipv4: Unmask upper DSCP bits in RTM_GETROUTE input route lookup
ipv4: icmp: Pass full DS field to ip_route_input()
ipv4: udp: Unmask upper DSCP bits during early demux
ipv4: Unmask upper DSCP bits when using hints

 net/core/filter.c                 | 3 ++-
 net/ipv4/fib_frontend.c           | 4 ++--
 net/ipv4/icmp.c                   | 2 +-
 net/ipv4/ipmr.c                   | 3 ++-
 net/ipv4/netfilter/ipt_rpfilter.c | 3 ++-
 net/ipv4/netfilter/nft_fib_ipv4.c | 3 ++-
 net/ipv4/route.c                  | 8 ++++----
 net/ipv4/udp.c                    | 3 ++-
 8 files changed, 17 insertions(+), 12 deletions(-)
Signature · 1 line
2.46.0