mlxsw: spectrum_span: Extract mlxsw_sp_span_entry_{de, }configure()
authorPetr Machata <petrm@mellanox.com>
Tue, 27 Feb 2018 13:53:43 +0000 (14:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Feb 2018 19:46:27 +0000 (14:46 -0500)
commit7b2ef81fd2bd4d01fc4890fb22c4dcfe76dd8c77
treec333776569223a4fa2bcd53adf2eca1c0bc872dd
parent3546b03ffcdb0a70b0d7302d7e139f096a613e9f
mlxsw: spectrum_span: Extract mlxsw_sp_span_entry_{de, }configure()

Configuring the hardware for encapsulated SPAN involves more code than
the simple mirroring case. Extract the related code to a separate
function to separate it from the rest of SPAN entry creation. Extract
deconfigure as well for symmetry, even though disablement is the same
regardless of SPAN type.

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_span.c