mlxsw: spectrum_span: Support mirror to gretap
authorPetr Machata <petrm@mellanox.com>
Tue, 27 Feb 2018 13:53:48 +0000 (14:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Feb 2018 19:46:28 +0000 (14:46 -0500)
commit27cf76fe60ec6fbe2ba8844261b90a6aecbc42f0
treecb61d1bbc15a19e807226bc7d89ee5e91673fea9
parent52a6444cda7d1b6fc6f6ff84e2d23cdb71c84102
mlxsw: spectrum_span: Support mirror to gretap

When a user requests mirror from a mlxsw physical port (possibly based
on an ACL match) to a gretap netdevice, the driver needs to resolve the
request to a particular physical port that the mirrored packets will
egress through, and a suite of configuration keys (importantly, IP and
MAC addresses). That means calling into routing and neighbor kernel code
to simulate the decisions made by the system for packets passing through
a gretap netdevice.

Add a new instance of mlxsw_sp_span_entry_ops to support this.

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