summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
diff options
context:
space:
mode:
authorRoi Dayan <roid@nvidia.com>2021-08-08 09:38:03 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2022-02-16 23:55:16 -0800
commit8300f225268be9ee2c0daf5a3f23929fcdcbf213 (patch)
tree3c2bf91c57c4b4bcd103e00c66feacbdace81062 /drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
parent314e1105831b45a0fe3045411d7fec4997936e86 (diff)
net/mlx5e: Create new flow attr for multi table actions
Some TC actions use post actions for their implementation. For example CT and sample actions. Create a new flow attr after each multi table action and create a post action rule for it. First flow attr being offloaded normally and linked to the next attr (post action rule) with setting an id on reg_c. Post action rules match the id on reg_c and continue to the next one. The flow counter is allocated on the last rule. Signed-off-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
index 0f4d3b9dd979..228ebb19fcab 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
@@ -1823,6 +1823,9 @@ __mlx5_tc_ct_flow_offload(struct mlx5_tc_ct_priv *ct_priv,
ct_dbg("Failed to allocate post action handle");
goto err_post_act_handle;
}
+ err = mlx5e_tc_post_act_offload(ct_priv->post_act, handle);
+ if (err)
+ goto err_alloc_pre;
ct_flow->post_act_handle = handle;
/* Base flow attributes of both rules on original rule attribute */