]> asedeno.scripts.mit.edu Git - linux.git/commit
mlxsw: spectrum: Drop refcounting of IPIP entries
authorPetr Machata <petrm@mellanox.com>
Mon, 16 Oct 2017 14:26:39 +0000 (16:26 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2017 20:30:33 +0000 (21:30 +0100)
commit4cccb737d2fd0d78b939a97b5ac1831b9a27d4c0
tree4f7749c335088775eb90ff3a7451121a72740559
parentf63ce4e54a424d9f99bad2ba099c972a07eab517
mlxsw: spectrum: Drop refcounting of IPIP entries

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: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c