[PATCH net-next v2 0/7] net: consolidate IPv4 route lookup for UDP tunnels

Beniamino Galvani posted 7 patches 2 years, 3 months ago
drivers/net/bareudp.c          |  11 ++--
drivers/net/geneve.c           | 111 ++++++++++++--------------------
drivers/net/vxlan/vxlan_core.c | 114 ++++++++++++---------------------
include/net/route.h            |   6 --
include/net/udp_tunnel.h       |   8 +++
net/ipv4/route.c               |  48 --------------
net/ipv4/udp_tunnel_core.c     |  49 ++++++++++++++
7 files changed, 147 insertions(+), 200 deletions(-)
[PATCH net-next v2 0/7] net: consolidate IPv4 route lookup for UDP tunnels
Posted by Beniamino Galvani 2 years, 3 months ago
At the moment different UDP tunnels rely on different functions for
IPv4 route lookup, and those functions all implement the same
logic. Only bareudp uses the generic ip_route_output_tunnel(), while
geneve and vxlan basically duplicate it slightly differently.

This series first extends the generic lookup function so that it is
suitable for all UDP tunnel implementations. Then, bareudp, geneve and
vxlan are adapted to use them.

This results in code with less duplication and hopefully better
maintainability.

After this series is merged, IPv6 will be converted in a similar way.

Changelog:
v2
 - fix compilation with IPv6 disabled

Beniamino Galvani (7):
  ipv4: rename and move ip_route_output_tunnel()
  ipv4: remove "proto" argument from udp_tunnel_dst_lookup()
  ipv4: add new arguments to udp_tunnel_dst_lookup()
  ipv4: use tunnel flow flags for tunnel route lookups
  geneve: add dsfield helper function
  geneve: use generic function for tunnel IPv4 route lookup
  vxlan: use generic function for tunnel IPv4 route lookup

 drivers/net/bareudp.c          |  11 ++--
 drivers/net/geneve.c           | 111 ++++++++++++--------------------
 drivers/net/vxlan/vxlan_core.c | 114 ++++++++++++---------------------
 include/net/route.h            |   6 --
 include/net/udp_tunnel.h       |   8 +++
 net/ipv4/route.c               |  48 --------------
 net/ipv4/udp_tunnel_core.c     |  49 ++++++++++++++
 7 files changed, 147 insertions(+), 200 deletions(-)

-- 
2.40.1
Re: [PATCH net-next v2 0/7] net: consolidate IPv4 route lookup for UDP tunnels
Posted by patchwork-bot+netdevbpf@kernel.org 2 years, 3 months ago
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Mon, 16 Oct 2023 09:15:19 +0200 you wrote:
> At the moment different UDP tunnels rely on different functions for
> IPv4 route lookup, and those functions all implement the same
> logic. Only bareudp uses the generic ip_route_output_tunnel(), while
> geneve and vxlan basically duplicate it slightly differently.
> 
> This series first extends the generic lookup function so that it is
> suitable for all UDP tunnel implementations. Then, bareudp, geneve and
> vxlan are adapted to use them.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/7] ipv4: rename and move ip_route_output_tunnel()
    https://git.kernel.org/netdev/net-next/c/bf3fcbf7e7a0
  - [net-next,v2,2/7] ipv4: remove "proto" argument from udp_tunnel_dst_lookup()
    https://git.kernel.org/netdev/net-next/c/78f3655adcb5
  - [net-next,v2,3/7] ipv4: add new arguments to udp_tunnel_dst_lookup()
    https://git.kernel.org/netdev/net-next/c/72fc68c6356b
  - [net-next,v2,4/7] ipv4: use tunnel flow flags for tunnel route lookups
    https://git.kernel.org/netdev/net-next/c/3ae983a603a4
  - [net-next,v2,5/7] geneve: add dsfield helper function
    https://git.kernel.org/netdev/net-next/c/60a77d11cd5d
  - [net-next,v2,6/7] geneve: use generic function for tunnel IPv4 route lookup
    https://git.kernel.org/netdev/net-next/c/daa2ba7ed1d1
  - [net-next,v2,7/7] vxlan: use generic function for tunnel IPv4 route lookup
    https://git.kernel.org/netdev/net-next/c/6f19b2c136d9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html