]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitac392b5734a6fff0060b64ceb70e05532cf98ee3
treecdeda56665312ac3a7288657f87f52140cb19c8a
parent4cbaad3e94c7d83aa7405bb202af58691ee2735b
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