netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/7] net: consolidate IPv4 route lookup for UDP tunnels
@ 2023-10-09  8:20 Beniamino Galvani
  2023-10-09  8:20 ` [PATCH net-next 1/7] ipv4: rename and move ip_route_output_tunnel() Beniamino Galvani
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Beniamino Galvani @ 2023-10-09  8:20 UTC (permalink / raw)
  To: netdev
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, David Ahern,
	Guillaume Nault, linux-kernel

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.

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 | 103 +++++++++++-------------------
 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, 141 insertions(+), 195 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-10-11 18:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-09  8:20 [PATCH net-next 0/7] net: consolidate IPv4 route lookup for UDP tunnels Beniamino Galvani
2023-10-09  8:20 ` [PATCH net-next 1/7] ipv4: rename and move ip_route_output_tunnel() Beniamino Galvani
2023-10-11 18:50   ` David Ahern
2023-10-09  8:20 ` [PATCH net-next 2/7] ipv4: remove "proto" argument from udp_tunnel_dst_lookup() Beniamino Galvani
2023-10-11 18:51   ` David Ahern
2023-10-09  8:20 ` [PATCH net-next 3/7] ipv4: add new arguments to udp_tunnel_dst_lookup() Beniamino Galvani
2023-10-11 18:51   ` David Ahern
2023-10-09  8:20 ` [PATCH net-next 4/7] ipv4: use tunnel flow flags for tunnel route lookups Beniamino Galvani
2023-10-11 18:52   ` David Ahern
2023-10-09  8:20 ` [PATCH net-next 5/7] geneve: add dsfield helper function Beniamino Galvani
2023-10-09  8:20 ` [PATCH net-next 6/7] geneve: use generic function for tunnel IPv4 route lookup Beniamino Galvani
2023-10-09  8:20 ` [PATCH net-next 7/7] vxlan: " Beniamino Galvani
2023-10-09 10:22   ` kernel test robot
2023-10-09 16:12   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).