Skip to content

Commit 61eab65

Browse files
Chris MiSaeed Mahameed
authored andcommitted
net/mlx5: fs_chains: Fix ft prio if ignore_flow_level is not supported
The cited commit sets ft prio to fs_base_prio. But if ignore_flow_level it not supported, ft prio must be set based on tc filter prio. Otherwise, all the ft prio are the same on the same chain. It is invalid if ignore_flow_level is not supported. Fix it by setting ft prio based on tc filter prio and setting fs_base_prio to 0 for fdb. Fixes: 8e80e56 ("net/mlx5: fs_chains: Refactor to detach chains from tc usage") Signed-off-by: Chris Mi <[email protected]> Reviewed-by: Paul Blakey <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 3e4cf1d commit 61eab65

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,6 @@ esw_chains_create(struct mlx5_eswitch *esw, struct mlx5_flow_table *miss_fdb)
14361436

14371437
esw_init_chains_offload_flags(esw, &attr.flags);
14381438
attr.ns = MLX5_FLOW_NAMESPACE_FDB;
1439-
attr.fs_base_prio = FDB_TC_OFFLOAD;
14401439
attr.max_grp_num = esw->params.large_group_num;
14411440
attr.default_ft = miss_fdb;
14421441
attr.mapping = esw->offloads.reg_c0_obj_pool;

drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ mlx5_chains_create_table(struct mlx5_fs_chains *chains,
178178
if (!mlx5_chains_ignore_flow_level_supported(chains) ||
179179
(chain == 0 && prio == 1 && level == 0)) {
180180
ft_attr.level = chains->fs_base_level;
181-
ft_attr.prio = chains->fs_base_prio;
181+
ft_attr.prio = chains->fs_base_prio + prio - 1;
182182
ns = (chains->ns == MLX5_FLOW_NAMESPACE_FDB) ?
183183
mlx5_get_fdb_sub_ns(chains->dev, chain) :
184184
mlx5_get_flow_namespace(chains->dev, chains->ns);

0 commit comments

Comments
 (0)