mlxsw: spectrum_span: Add APIs to get / put a SPAN agent
authorIdo Schimmel <idosch@mellanox.com>
Thu, 30 Apr 2020 17:01:08 +0000 (20:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Apr 2020 20:02:32 +0000 (13:02 -0700)
commit466010342e89240c45746f65767c7290b96a4b36
treecdeda56665312ac3a7288657f87f52140cb19c8a
parent07f81727c1a0b8f2acdabc060727eff60bffc048
mlxsw: spectrum_span: Add APIs to get / put a SPAN agent

Given a netdev that packets should be mirrored to, create a SPAN agent
and return its identifier to the caller.

The SPAN agent is reference counted, as multiple tc-mirred actions can
point to the same destination netdev.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h