mbox series

[net-next,0/5] ipv4: Convert ip_route_input_slow() and its callers to dscp_t.

Message ID cover.1727807926.git.gnault@redhat.com (mailing list archive)
Headers show
Series ipv4: Convert ip_route_input_slow() and its callers to dscp_t. | expand

Message

Guillaume Nault Oct. 1, 2024, 7:28 p.m. UTC
Prepare ip_route_input_slow() and its call chain to future conversion
of ->flowi4_tos.

The ->flowi4_tos field of "struct flowi4" is used in many different
places, which makes it hard to convert it from __u8 to dscp_t.

In order to avoid a big patch updating all its users at once, this
patch series gradually converts some users to dscp_t. Those users now
set ->flowi4_tos from a dscp_t variable that is converted to __u8 using
inet_dscp_to_dsfield().

When all users of ->flowi4_tos will use a dscp_t variable, converting
that field to dscp_t will just be a matter of removing all the
inet_dscp_to_dsfield() conversions.

This series concentrates on ip_route_input_slow() and its direct and
indirect callers.

Guillaume Nault (5):
  ipv4: Convert icmp_route_lookup() to dscp_t.
  ipv4: Convert ip_route_input() to dscp_t.
  ipv4: Convert ip_route_input_noref() to dscp_t.
  ipv4: Convert ip_route_input_rcu() to dscp_t.
  ipv4: Convert ip_route_input_slow() to dscp_t.

 drivers/net/ipvlan/ipvlan_l3s.c |  6 ++++--
 include/net/ip.h                |  5 +++++
 include/net/route.h             |  8 ++++----
 net/bridge/br_netfilter_hooks.c |  8 +++++---
 net/core/lwt_bpf.c              |  5 +++--
 net/ipv4/icmp.c                 | 19 +++++++++----------
 net/ipv4/ip_fragment.c          |  4 ++--
 net/ipv4/ip_input.c             |  2 +-
 net/ipv4/ip_options.c           |  3 ++-
 net/ipv4/route.c                | 32 ++++++++++++++++++--------------
 net/ipv4/xfrm4_input.c          |  2 +-
 net/ipv4/xfrm4_protocol.c       |  2 +-
 net/ipv6/ip6_tunnel.c           |  4 ++--
 13 files changed, 57 insertions(+), 43 deletions(-)

Comments

David Ahern Oct. 2, 2024, 2:45 a.m. UTC | #1
On 10/1/24 1:28 PM, Guillaume Nault wrote:
> Prepare ip_route_input_slow() and its call chain to future conversion
> of ->flowi4_tos.
> 
> The ->flowi4_tos field of "struct flowi4" is used in many different
> places, which makes it hard to convert it from __u8 to dscp_t.
> 
> In order to avoid a big patch updating all its users at once, this
> patch series gradually converts some users to dscp_t. Those users now
> set ->flowi4_tos from a dscp_t variable that is converted to __u8 using
> inet_dscp_to_dsfield().
> 
> When all users of ->flowi4_tos will use a dscp_t variable, converting
> that field to dscp_t will just be a matter of removing all the
> inet_dscp_to_dsfield() conversions.
> 
> This series concentrates on ip_route_input_slow() and its direct and
> indirect callers.
> 
> Guillaume Nault (5):
>   ipv4: Convert icmp_route_lookup() to dscp_t.
>   ipv4: Convert ip_route_input() to dscp_t.
>   ipv4: Convert ip_route_input_noref() to dscp_t.
>   ipv4: Convert ip_route_input_rcu() to dscp_t.
>   ipv4: Convert ip_route_input_slow() to dscp_t.
> 

LGTM:

Reviewed-by: David Ahern <dsahern@kernel.org>
patchwork-bot+netdevbpf@kernel.org Oct. 3, 2024, 11:40 p.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 1 Oct 2024 21:28:30 +0200 you wrote:
> Prepare ip_route_input_slow() and its call chain to future conversion
> of ->flowi4_tos.
> 
> The ->flowi4_tos field of "struct flowi4" is used in many different
> places, which makes it hard to convert it from __u8 to dscp_t.
> 
> In order to avoid a big patch updating all its users at once, this
> patch series gradually converts some users to dscp_t. Those users now
> set ->flowi4_tos from a dscp_t variable that is converted to __u8 using
> inet_dscp_to_dsfield().
> 
> [...]

Here is the summary with links:
  - [net-next,1/5] ipv4: Convert icmp_route_lookup() to dscp_t.
    https://git.kernel.org/netdev/net-next/c/913c83a610bb
  - [net-next,2/5] ipv4: Convert ip_route_input() to dscp_t.
    https://git.kernel.org/netdev/net-next/c/7e863e5db618
  - [net-next,3/5] ipv4: Convert ip_route_input_noref() to dscp_t.
    https://git.kernel.org/netdev/net-next/c/66fb6386d358
  - [net-next,4/5] ipv4: Convert ip_route_input_rcu() to dscp_t.
    https://git.kernel.org/netdev/net-next/c/be612f5e99e1
  - [net-next,5/5] ipv4: Convert ip_route_input_slow() to dscp_t.
    https://git.kernel.org/netdev/net-next/c/783946aa0358

You are awesome, thank you!