net/mlx5e: Introduce post action infrastructure
authorChris Mi <cmi@nvidia.com>
Mon, 16 Aug 2021 14:00:30 +0000 (22:00 +0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 20 Aug 2021 04:50:37 +0000 (21:50 -0700)
commit6f0b692a5aa96b4fd0f14a2ac54b590cd9b9f192
tree304d9cd2cc56c7b8e9b50e6b9ec5884eeb961c89
parent2799797845dba609db61a20a443025d59f4edf0f
net/mlx5e: Introduce post action infrastructure

Some tc actions are modeled in hardware using multiple tables
causing a tc action list split. For example, CT action is modeled
by jumping to a ct table which is controlled by nf flowtable.
sFlow jumps in hardware to a sample table, which continues to a
"default table" where it should continue processing the action list.

Multi table actions are modeled in hardware using a unique fte_id.
The fte_id is set before jumping to a table. Split actions continue
to a post-action table where the matched fte_id value continues the
execution the tc action list.

Currently the post-action design is implemented only by the ct
action. Introduce post action infrastructure as a pre-step for
reusing it with the sFlow offload feature. Init and destroy the
common post action table. Refactor the ct offload to use the
common post table infrastructure in the next patch.

Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.h [new file with mode: 0644]