• Beniamino Galvani's avatar
    ipv6: add new arguments to udp_tunnel6_dst_lookup() · 946fcfdb
    Beniamino Galvani authored
    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).
    
    This is similar to what already done for IPv4 in commit 72fc68c6
    ("ipv4: add new arguments to udp_tunnel_dst_lookup()").
    Suggested-by: default avatarGuillaume Nault <gnault@redhat.com>
    Signed-off-by: default avatarBeniamino Galvani <b.galvani@gmail.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    946fcfdb
udp_tunnel.h 12.5 KB