summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2017-10-16 17:26:39 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-16 23:30:33 +0300
commit4cccb737d2fd0d78b939a97b5ac1831b9a27d4c0 (patch)
tree4f7749c335088775eb90ff3a7451121a72740559 /drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
parentf63ce4e54a424d9f99bad2ba099c972a07eab517 (diff)
downloadlinux-4cccb737d2fd0d78b939a97b5ac1831b9a27d4c0.tar.xz
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
index 1c2db831d83b..6fb49129ce87 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h
@@ -47,7 +47,6 @@ struct mlxsw_sp_ipip_entry {
enum mlxsw_sp_ipip_type ipipt;
struct net_device *ol_dev; /* Overlay. */
struct mlxsw_sp_rif_ipip_lb *ol_lb;
- unsigned int ref_count; /* Number of next hops using the tunnel. */
struct mlxsw_sp_fib_entry *decap_fib_entry;
struct list_head ipip_list_node;
};