mlxsw: span: Remove span_entry by span_id
authorPetr Machata <petrm@mellanox.com>
Tue, 27 Feb 2018 13:53:41 +0000 (14:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Feb 2018 19:46:26 +0000 (14:46 -0500)
commit98977089d8eef337608272699f4197c631d447b8
tree2bc657bb6e07303d9a52542ebd525d99b7541298
parent1da93eb466dc6f8a92e0316fd983ee8a3338db4c
mlxsw: span: Remove span_entry by span_id

Instead of removing span_entry by the port number, allow removing by
SPAN id. That simplifies some code right here, and for mirroring to soft
netdevices, avoids problems with netdevice pointer invalidation and
reuse.

Rename mlxsw_sp_span_entry_find() to mlxsw_sp_span_entry_find_by_port()
and keep it--follow-up patches will make use of it.

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/core_acl_flex_actions.c
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_actions.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h