net/mlx5e: Split offloaded eswitch TC rules for port mirroring
authorChris Mi <chrism@mellanox.com>
Wed, 16 May 2018 08:54:38 +0000 (17:54 +0900)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 25 May 2018 21:11:00 +0000 (14:11 -0700)
commite4ad91f23f10a9e7e7775f854584f4d54fe7f299
tree1f937a4bea23005933427fa51c996872d2d18401
parent592d3651596924b0b1e9030634c48d262451eeaf
net/mlx5e: Split offloaded eswitch TC rules for port mirroring

If a TC rule needs to be split for mirroring, create two HW rules,
in the first level and the second level flow tables accordingly.

In the first level flow table, forward the packet to the mirror
port and forward the packet to the second level flow table for
further processing, eg. encap, vlan push or header re-write.

Currently the matching is repeated in both stages.

While here, simplify the setup of the vhca id valid indicator also
in the existing code.

Signed-off-by: Chris Mi <chrism@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@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.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c