• Petr Machata's avatar
    mlxsw: spectrum: Drop refcounting of IPIP entries · 4cccb737
    Petr Machata authored
    Formerly, IPIP entries were created lazily by next hops that referenced
    an offloadable IP-in-IP netdevice. However now that they are created
    eagerly as a reaction to events on such netdevices, the reference
    counting is useless. Hence drop it.
    
    The routes whose next hops reference an offloaded IP-in-IP netdevice
    actually linger around a bit after their device is unregistered.
    However, mlxsw_sp_ipip_entry_destroy() also destroys the backing
    loopback, and mlxsw_sp_rif_destroy() transitively (via
    mlxsw_sp_nexthop_rif_gone_sync()) calls mlxsw_sp_nexthop_ipip_fini(),
    which unlinks the IPIP entry from a next hop. Thus no dangling pointers
    are left behind for the brief window after netdevice is gone, but routes
    not yet.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4cccb737
spectrum_ipip.h 3 KB