diff options
author | Roi Dayan <roid@nvidia.com> | 2021-08-08 09:38:03 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2022-02-16 23:55:16 -0800 |
commit | 8300f225268be9ee2c0daf5a3f23929fcdcbf213 (patch) | |
tree | 3c2bf91c57c4b4bcd103e00c66feacbdace81062 /drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h | |
parent | 314e1105831b45a0fe3045411d7fec4997936e86 (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_priv.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h index 9ffba584b982..f76624699a8d 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h @@ -109,6 +109,7 @@ struct mlx5e_tc_flow { struct completion init_done; struct completion del_hw_done; struct mlx5_flow_attr *attr; + struct list_head attrs; }; struct mlx5_flow_handle * @@ -129,6 +130,12 @@ mlx5e_tc_offload_fdb_rules(struct mlx5_eswitch *esw, struct mlx5_flow_spec *spec, struct mlx5_flow_attr *attr); +struct mlx5_flow_attr * +mlx5e_tc_get_encap_attr(struct mlx5e_tc_flow *flow); + +void mlx5e_tc_unoffload_flow_post_acts(struct mlx5e_tc_flow *flow); +int mlx5e_tc_offload_flow_post_acts(struct mlx5e_tc_flow *flow); + bool mlx5e_is_eswitch_flow(struct mlx5e_tc_flow *flow); bool mlx5e_is_ft_flow(struct mlx5e_tc_flow *flow); bool mlx5e_is_offloaded_flow(struct mlx5e_tc_flow *flow); |