Skip to content

Commit

Permalink
Merge branch 'net-mlx5-hw-steering-cleanups'
Browse files Browse the repository at this point in the history
Tariq Toukan says:

====================
net/mlx5: HW Steering cleanups

This short series by Yevgeny contains several small HW Steering cleanups:

- Patch 1: removing unused FW commands
- Patch 2: using list_move() instead of list_del/add
- Patch 3: printing the unsupported combination of match fields
====================

Link: https://patch.msgid.link/1741780194-137519-1-git-send-email-tariqt@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Paolo Abeni committed Mar 19, 2025
2 parents 7602eb8 + 8389f2d commit f749448
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
6 changes: 0 additions & 6 deletions drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@ int mlx5hws_cmd_flow_table_destroy(struct mlx5_core_dev *mdev,
return mlx5_cmd_exec_in(mdev, destroy_flow_table, in);
}

void mlx5hws_cmd_alias_flow_table_destroy(struct mlx5_core_dev *mdev,
u32 table_id)
{
hws_cmd_general_obj_destroy(mdev, MLX5_OBJ_TYPE_FT_ALIAS, table_id);
}

static int hws_cmd_flow_group_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_fg_attr *fg_attr,
u32 *group_id)
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,6 @@ int mlx5hws_cmd_flow_table_query(struct mlx5_core_dev *mdev,
int mlx5hws_cmd_flow_table_destroy(struct mlx5_core_dev *mdev,
u8 fw_ft_type, u32 table_id);

void mlx5hws_cmd_alias_flow_table_destroy(struct mlx5_core_dev *mdev,
u32 table_id);

int mlx5hws_cmd_rtc_create(struct mlx5_core_dev *mdev,
struct mlx5hws_cmd_rtc_create_attr *rtc_attr,
u32 *rtc_id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ hws_definer_check_match_flags(struct mlx5hws_definer_conv_data *cd)
return 0;

err_conflict:
mlx5hws_err(cd->ctx, "Invalid definer fields combination\n");
mlx5hws_err(cd->ctx, "Invalid definer fields combination: match_flags = 0x%08x\n",
cd->match_flags);
return -EINVAL;
}

Expand Down Expand Up @@ -1985,8 +1986,7 @@ int mlx5hws_definer_get_obj(struct mlx5hws_context *ctx,
continue;

/* Reuse definer and set LRU (move to be first in the list) */
list_del_init(&cached_definer->list_node);
list_add(&cached_definer->list_node, &cache->list_head);
list_move(&cached_definer->list_node, &cache->list_head);
cached_definer->refcount++;
return cached_definer->definer.obj_id;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ mlx5hws_pat_get_existing_cached_pattern(struct mlx5hws_pattern_cache *cache,
cached_pattern = mlx5hws_pat_find_cached_pattern(cache, num_of_actions, actions);
if (cached_pattern) {
/* LRU: move it to be first in the list */
list_del_init(&cached_pattern->ptrn_list_node);
list_add(&cached_pattern->ptrn_list_node, &cache->ptrn_list);
list_move(&cached_pattern->ptrn_list_node, &cache->ptrn_list);
cached_pattern->refcount++;
}

Expand Down

0 comments on commit f749448

Please sign in to comment.