net/mlx5e: Support header rewrite actions with remote port mirroring
authorEli Britstein <elibr@mellanox.com>
Mon, 26 Nov 2018 05:24:08 +0000 (07:24 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 11 Dec 2018 22:52:19 +0000 (14:52 -0800)
commit1cc26d74bb98bd9693f0e630ee1cac87d5ba9f20
treeea522c3030d16e7c62666bdaf2cb58cd8488e2ff
parent38c9d2697b9c0d928875ea45b5e2fd706df7ad7e
net/mlx5e: Support header rewrite actions with remote port mirroring

A rule with the following actions is split to a two level FDB:
1. Forward to local mirror vport
2. Header rewrite
3. Forward to local vport
In the first level flow table, forward the packet to the local port and
forward the packet to the second level flow table for header rewrite and
local port forwarding. This configuration fails when mirroring to a
remote encapsulated destination because currently an FTE cannot support
encap and table destinations.

Use the extended destination capabilities to configure the first level
flow table with a multi-destination FTE to the uplink and second level
table and the second level flow table for the header rewrite and local
port forwarding.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c