Skip to content

Commit efb877c

Browse files
kliteynkuba-moo
authored andcommitted
net/mlx5: HWS, ignore flow level for multi-dest table
When HWS creates multi-dest FW table and adds rules to forward to other tables, ignore the flow level enforcement in FW, because HWS is responsible for table levels. This fixes the following error: mlx5_core 0000:08:00.0: mlx5_cmd_out_err:818:(pid 192306): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x6ae84c), err(-22) Fixes: 504e536 ("net/mlx5: HWS, added actions handling") Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/1758525094-816583-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6043819 commit efb877c

3 files changed

Lines changed: 6 additions & 12 deletions

File tree

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ mlx5hws_action_create_modify_header(struct mlx5hws_context *ctx,
13601360
struct mlx5hws_action *
13611361
mlx5hws_action_create_dest_array(struct mlx5hws_context *ctx, size_t num_dest,
13621362
struct mlx5hws_action_dest_attr *dests,
1363-
bool ignore_flow_level, u32 flags)
1363+
u32 flags)
13641364
{
13651365
struct mlx5hws_cmd_set_fte_dest *dest_list = NULL;
13661366
struct mlx5hws_cmd_ft_create_attr ft_attr = {0};
@@ -1397,7 +1397,7 @@ mlx5hws_action_create_dest_array(struct mlx5hws_context *ctx, size_t num_dest,
13971397
MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE;
13981398
dest_list[i].destination_id = dests[i].dest->dest_obj.obj_id;
13991399
fte_attr.action_flags |= MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
1400-
fte_attr.ignore_flow_level = ignore_flow_level;
1400+
fte_attr.ignore_flow_level = 1;
14011401
if (dests[i].is_wire_ft)
14021402
last_dest_idx = i;
14031403
break;

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/fs_hws.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,12 @@ static void mlx5_fs_put_dest_action_sampler(struct mlx5_fs_hws_context *fs_ctx,
572572
static struct mlx5hws_action *
573573
mlx5_fs_create_action_dest_array(struct mlx5hws_context *ctx,
574574
struct mlx5hws_action_dest_attr *dests,
575-
u32 num_of_dests, bool ignore_flow_level)
575+
u32 num_of_dests)
576576
{
577577
u32 flags = MLX5HWS_ACTION_FLAG_HWS_FDB | MLX5HWS_ACTION_FLAG_SHARED;
578578

579579
return mlx5hws_action_create_dest_array(ctx, num_of_dests, dests,
580-
ignore_flow_level, flags);
580+
flags);
581581
}
582582

583583
static struct mlx5hws_action *
@@ -1014,19 +1014,14 @@ static int mlx5_fs_fte_get_hws_actions(struct mlx5_flow_root_namespace *ns,
10141014
}
10151015
(*ractions)[num_actions++].action = dest_actions->dest;
10161016
} else if (num_dest_actions > 1) {
1017-
bool ignore_flow_level;
1018-
10191017
if (num_actions == MLX5_FLOW_CONTEXT_ACTION_MAX ||
10201018
num_fs_actions == MLX5_FLOW_CONTEXT_ACTION_MAX) {
10211019
err = -EOPNOTSUPP;
10221020
goto free_actions;
10231021
}
1024-
ignore_flow_level =
1025-
!!(fte_action->flags & FLOW_ACT_IGNORE_FLOW_LEVEL);
10261022
tmp_action =
10271023
mlx5_fs_create_action_dest_array(ctx, dest_actions,
1028-
num_dest_actions,
1029-
ignore_flow_level);
1024+
num_dest_actions);
10301025
if (!tmp_action) {
10311026
err = -EOPNOTSUPP;
10321027
goto free_actions;

drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,15 +735,14 @@ mlx5hws_action_create_push_vlan(struct mlx5hws_context *ctx, u32 flags);
735735
* @num_dest: The number of dests attributes.
736736
* @dests: The destination array. Each contains a destination action and can
737737
* have additional actions.
738-
* @ignore_flow_level: Whether to turn on 'ignore_flow_level' for this dest.
739738
* @flags: Action creation flags (enum mlx5hws_action_flags).
740739
*
741740
* Return: pointer to mlx5hws_action on success NULL otherwise.
742741
*/
743742
struct mlx5hws_action *
744743
mlx5hws_action_create_dest_array(struct mlx5hws_context *ctx, size_t num_dest,
745744
struct mlx5hws_action_dest_attr *dests,
746-
bool ignore_flow_level, u32 flags);
745+
u32 flags);
747746

748747
/**
749748
* mlx5hws_action_create_insert_header - Create insert header action.

0 commit comments

Comments
 (0)