• Petr Machata's avatar
    mlxsw: spectrum: Distinguish between IPv4/6 tunnels · e437f3b6
    Petr Machata authored
    struct ip_tunnel_parm, where GRE and several other tunnel types hold
    information, is IPv4-specific. The current router / ipip code in mlxsw
    however uses it as if it were generic.
    
    Make it clear that it's not. Rename many functions from _params_ to
    _params4_. mlxsw_sp_ipip_parms_saddr() and _daddr() take a proto
    argument to dispatch on it. Move the dispatch logic to
    mlxsw_sp_ipip_netdev_saddr() and _daddr(), and replace with
    single-protocol functions.
    
    In struct mlxsw_sp_ipip_entry, move the "parms" field to a (for the time
    being, singleton) union. Update users throughout.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e437f3b6
spectrum_ipip.h 3.4 KB