OSDN Git Service

net/mlx5e: Eswitch, Use per vport tables for mirroring
authorEli Cohen <eli@mellanox.com>
Tue, 14 Jan 2020 15:30:41 +0000 (17:30 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 28 Feb 2020 00:40:05 +0000 (16:40 -0800)
commit96e326878fa5e2727d14e9a23644119374619010
tree29479cf051c89e63ae21517e2f7ea054541417c5
parent1708dd54687db4fd5baa3b6169aa116505c1e2ef
net/mlx5e: Eswitch, Use per vport tables for mirroring

When using port mirroring, we forward the traffic to another table and
use that table to forward to the mirrored vport. Since the hardware
loses the values of reg c, and in particular reg c0, we fail the match
on the input vport which previously existed in reg c0. To overcome this
situation, we use a set of per vport tables, positioned at the lowest
priority, and forward traffic to those tables. Since these tables are
per vport, we can avoid matching on reg c0.

Fixes: c01cfd0f1115 ("net/mlx5: E-Switch, Add match on vport metadata for rule in fast path")
Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
include/linux/mlx5/fs.h