lkml.org 
[lkml]   [2023]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next 3/7] ipv4: add new arguments to udp_tunnel_dst_lookup()
From
On 10/9/23 2:20 AM, Beniamino Galvani wrote:
> We want to make the function more generic so that it can be used by
> other UDP tunnel implementations such as geneve and vxlan. To do that,
> add the following arguments:
>
> - source and destination UDP port;
> - ifindex of the output interface, needed by vxlan;
> - the tos, because in some cases it is not taken from struct
> ip_tunnel_info (for example, when it's inherited from the inner
> packet);
> - the dst cache, because not all tunnel types (e.g. vxlan) want to
> use the one from struct ip_tunnel_info.
>
> With these parameters, the function no longer needs the full struct
> ip_tunnel_info as argument and we can pass only the relevant part of
> it (struct ip_tunnel_key).
>
> Suggested-by: Guillaume Nault <gnault@redhat.com>
> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
> ---
> drivers/net/bareudp.c | 11 +++++++----
> include/net/udp_tunnel.h | 8 +++++---
> net/ipv4/udp_tunnel_core.c | 26 +++++++++++++-------------
> 3 files changed, 25 insertions(+), 20 deletions(-)
>

Reviewed-by: David Ahern <dsahern@kernel.org>


\
 
 \ /
  Last update: 2023-10-11 20:52    [W:0.563 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site