Skip to content

Unmask upper DSCP bits - part 4 (last)

Ido Schimmel bpf bridge linux-sctp 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 17 repliesApplied 12/12

Patches in v1 All 12 applied

#Subject and filesSizeRepliesApplied
1/12netfilter: br_netfilter: Unmask upper DSCP bits in br_nf_pre_routing_finish()net/bridge/br_netfilter_hooks.c+2 -11 replyApplied
2/12ipv4: ip_gre: Unmask upper DSCP bits in ipgre_open()net/ipv4/ip_gre.c+2 -11 replyApplied
3/12bpf: lwtunnel: Unmask upper DSCP bits in bpf_lwt_xmit_reroute()net/core/lwt_bpf.c+2 -11 replyApplied
4/12ipv4: icmp: Unmask upper DSCP bits in icmp_reply()net/ipv4/icmp.c+1 -11 replyApplied
5/12ipv4: ip_tunnel: Unmask upper DSCP bits in ip_tunnel_bind_dev()net/ipv4/ip_tunnel.c+1 -14 repliesApplied
6/12ipv4: ip_tunnel: Unmask upper DSCP bits in ip_md_tunnel_xmit()net/ipv4/ip_tunnel.c+4 -31 replyApplied
7/12ipv4: ip_tunnel: Unmask upper DSCP bits in ip_tunnel_xmit()net/ipv4/ip_tunnel.c+1 -11 replyApplied
8/12ipv4: netfilter: Unmask upper DSCP bits in ip_route_me_harder()net/ipv4/netfilter.c+2 -11 replyApplied
9/12netfilter: nft_flow_offload: Unmask upper DSCP bits in nft_flow_route()net/netfilter/nft_flow_offload.c+2 -11 replyApplied
10/12netfilter: nf_dup4: Unmask upper DSCP bits in nf_dup_ipv4_route()net/ipv4/netfilter/nf_dup_ipv4.c+2 -11 replyApplied
11/12ipv4: udp_tunnel: Unmask upper DSCP bits in udp_tunnel_dst_lookup()net/ipv4/udp_tunnel_core.c+2 -11 replyApplied
12/12sctp: Unmask upper DSCP bits in sctp_v4_get_dst()net/sctp/protocol.c+2 -12 repliesApplied

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 NaultXin LongDavid Ahern
SeriesR-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 R-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 4 (last)

tl;dr - This patchset finishes 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 finishes to unmask the upper DSCP bits by adjusting all the callers of ip_route_output_key() to properly initialize the full DSCP value in the IPv4 flow key.

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):
netfilter: br_netfilter: Unmask upper DSCP bits in
br_nf_pre_routing_finish()
ipv4: ip_gre: Unmask upper DSCP bits in ipgre_open()
bpf: lwtunnel: Unmask upper DSCP bits in bpf_lwt_xmit_reroute()
ipv4: icmp: Unmask upper DSCP bits in icmp_reply()
ipv4: ip_tunnel: Unmask upper DSCP bits in ip_tunnel_bind_dev()
ipv4: ip_tunnel: Unmask upper DSCP bits in ip_md_tunnel_xmit()
ipv4: ip_tunnel: Unmask upper DSCP bits in ip_tunnel_xmit()
ipv4: netfilter: Unmask upper DSCP bits in ip_route_me_harder()
netfilter: nft_flow_offload: Unmask upper DSCP bits in
nft_flow_route()
netfilter: nf_dup4: Unmask upper DSCP bits in nf_dup_ipv4_route()
ipv4: udp_tunnel: Unmask upper DSCP bits in udp_tunnel_dst_lookup()
sctp: Unmask upper DSCP bits in sctp_v4_get_dst()

 net/bridge/br_netfilter_hooks.c  |  3 ++-
 net/core/lwt_bpf.c               |  3 ++-
 net/ipv4/icmp.c                  |  2 +-
 net/ipv4/ip_gre.c                |  3 ++-
 net/ipv4/ip_tunnel.c             | 11 ++++++-----
 net/ipv4/netfilter.c             |  3 ++-
 net/ipv4/netfilter/nf_dup_ipv4.c |  3 ++-
 net/ipv4/udp_tunnel_core.c       |  3 ++-
 net/netfilter/nft_flow_offload.c |  3 ++-
 net/sctp/protocol.c              |  3 ++-
 10 files changed, 23 insertions(+), 14 deletions(-)
Signature · 1 line
2.46.0