diff options
author | Petr Machata <petrm@mellanox.com> | 2018-02-27 14:53:48 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-27 14:46:28 -0500 |
commit | 27cf76fe60ec6fbe2ba8844261b90a6aecbc42f0 (patch) | |
tree | cb61d1bbc15a19e807226bc7d89ee5e91673fea9 /drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | |
parent | 52a6444cda7d1b6fc6f6ff84e2d23cdb71c84102 (diff) | |
download | linux-stable-27cf76fe60ec6fbe2ba8844261b90a6aecbc42f0.tar.gz linux-stable-27cf76fe60ec6fbe2ba8844261b90a6aecbc42f0.tar.bz2 linux-stable-27cf76fe60ec6fbe2ba8844261b90a6aecbc42f0.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h index b6dcd7d7277c..948aceb512c5 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.h @@ -35,6 +35,9 @@ #define _MLXSW_SPECTRUM_SPAN_H #include <linux/types.h> +#include <linux/if_ether.h> + +#include "spectrum_router.h" struct mlxsw_sp; struct mlxsw_sp_port; @@ -52,6 +55,11 @@ struct mlxsw_sp_span_inspected_port { struct mlxsw_sp_span_parms { struct mlxsw_sp_port *dest_port; /* NULL for unoffloaded SPAN. */ + unsigned int ttl; + unsigned char dmac[ETH_ALEN]; + unsigned char smac[ETH_ALEN]; + union mlxsw_sp_l3addr daddr; + union mlxsw_sp_l3addr saddr; }; struct mlxsw_sp_span_entry_ops; |