* [PATCH net-next 0/3] net/mlx5: HW Steering cleanups
@ 2025-03-12 11:49 Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 1/3] net/mlx5: HWS, remove unused code for alias flow tables Tariq Toukan
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Tariq Toukan @ 2025-03-12 11:49 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn
Cc: Gal Pressman, Mark Bloch, Moshe Shemesh, Saeed Mahameed,
Leon Romanovsky, Tariq Toukan, netdev, linux-rdma, linux-kernel
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
Regards,
Tariq
Yevgeny Kliteynik (3):
net/mlx5: HWS, remove unused code for alias flow tables
net/mlx5: HWS, use list_move() instead of del/add
net/mlx5: HWS, log the unsupported mask in definer
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 6 ------
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h | 3 ---
.../net/ethernet/mellanox/mlx5/core/steering/hws/definer.c | 6 +++---
.../net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c | 3 +--
4 files changed, 4 insertions(+), 14 deletions(-)
base-commit: 0ea09cbf8350b70ad44d67a1dcb379008a356034
--
2.31.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net-next 1/3] net/mlx5: HWS, remove unused code for alias flow tables
2025-03-12 11:49 [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Tariq Toukan
@ 2025-03-12 11:49 ` Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 2/3] net/mlx5: HWS, use list_move() instead of del/add Tariq Toukan
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Tariq Toukan @ 2025-03-12 11:49 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn
Cc: Gal Pressman, Mark Bloch, Moshe Shemesh, Saeed Mahameed,
Leon Romanovsky, Tariq Toukan, netdev, linux-rdma, linux-kernel,
Yevgeny Kliteynik
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Alias flow tables are not in use by HWS - remove the unused code.
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 6 ------
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h | 3 ---
2 files changed, 9 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c
index 487e75476b0a..e8f98c109b99 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c
@@ -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)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h
index 610c63d81ad9..51d9e0291ac1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h
@@ -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);
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 2/3] net/mlx5: HWS, use list_move() instead of del/add
2025-03-12 11:49 [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 1/3] net/mlx5: HWS, remove unused code for alias flow tables Tariq Toukan
@ 2025-03-12 11:49 ` Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 3/3] net/mlx5: HWS, log the unsupported mask in definer Tariq Toukan
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Tariq Toukan @ 2025-03-12 11:49 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn
Cc: Gal Pressman, Mark Bloch, Moshe Shemesh, Saeed Mahameed,
Leon Romanovsky, Tariq Toukan, netdev, linux-rdma, linux-kernel,
Yevgeny Kliteynik
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
Wherever applicable, use list_move function instead of list_del + list_add.
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c | 3 +--
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c
index 10ece7df1cfa..c4851d5584b7 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c
@@ -1985,8 +1985,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;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c
index d9dc4f2d0dc6..f51ed24526b9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c
@@ -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++;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 3/3] net/mlx5: HWS, log the unsupported mask in definer
2025-03-12 11:49 [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 1/3] net/mlx5: HWS, remove unused code for alias flow tables Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 2/3] net/mlx5: HWS, use list_move() instead of del/add Tariq Toukan
@ 2025-03-12 11:49 ` Tariq Toukan
2025-03-12 12:32 ` [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Dawid Osuchowski
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Tariq Toukan @ 2025-03-12 11:49 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn
Cc: Gal Pressman, Mark Bloch, Moshe Shemesh, Saeed Mahameed,
Leon Romanovsky, Tariq Toukan, netdev, linux-rdma, linux-kernel,
Yevgeny Kliteynik
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
If a user requested to match on an unsupported combination of fields,
print the unsupported combination in the error message.
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Vlad Dogaru <vdogaru@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c
index c4851d5584b7..c8cc0c8115f5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/definer.c
@@ -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;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/3] net/mlx5: HW Steering cleanups
2025-03-12 11:49 [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Tariq Toukan
` (2 preceding siblings ...)
2025-03-12 11:49 ` [PATCH net-next 3/3] net/mlx5: HWS, log the unsupported mask in definer Tariq Toukan
@ 2025-03-12 12:32 ` Dawid Osuchowski
2025-03-12 12:40 ` Michal Kubiak
2025-03-19 17:30 ` patchwork-bot+netdevbpf
5 siblings, 0 replies; 7+ messages in thread
From: Dawid Osuchowski @ 2025-03-12 12:32 UTC (permalink / raw)
To: Tariq Toukan, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Andrew Lunn
Cc: Gal Pressman, Mark Bloch, Moshe Shemesh, Saeed Mahameed,
Leon Romanovsky, netdev, linux-rdma, linux-kernel
On 2025-03-12 12:49 PM, Tariq Toukan wrote:
> 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
>
> Regards,
> Tariq
>
> Yevgeny Kliteynik (3):
> net/mlx5: HWS, remove unused code for alias flow tables
> net/mlx5: HWS, use list_move() instead of del/add
> net/mlx5: HWS, log the unsupported mask in definer
>
> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 6 ------
> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h | 3 ---
> .../net/ethernet/mellanox/mlx5/core/steering/hws/definer.c | 6 +++---
> .../net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c | 3 +--
> 4 files changed, 4 insertions(+), 14 deletions(-)
>
>
> base-commit: 0ea09cbf8350b70ad44d67a1dcb379008a356034
Hi, thanks for the submission!
Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
for the whole series
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/3] net/mlx5: HW Steering cleanups
2025-03-12 11:49 [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Tariq Toukan
` (3 preceding siblings ...)
2025-03-12 12:32 ` [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Dawid Osuchowski
@ 2025-03-12 12:40 ` Michal Kubiak
2025-03-19 17:30 ` patchwork-bot+netdevbpf
5 siblings, 0 replies; 7+ messages in thread
From: Michal Kubiak @ 2025-03-12 12:40 UTC (permalink / raw)
To: Tariq Toukan
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, Gal Pressman, Mark Bloch, Moshe Shemesh,
Saeed Mahameed, Leon Romanovsky, netdev, linux-rdma, linux-kernel
On Wed, Mar 12, 2025 at 01:49:51PM +0200, Tariq Toukan wrote:
> 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
>
> Regards,
> Tariq
>
> Yevgeny Kliteynik (3):
> net/mlx5: HWS, remove unused code for alias flow tables
> net/mlx5: HWS, use list_move() instead of del/add
> net/mlx5: HWS, log the unsupported mask in definer
>
> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.c | 6 ------
> drivers/net/ethernet/mellanox/mlx5/core/steering/hws/cmd.h | 3 ---
> .../net/ethernet/mellanox/mlx5/core/steering/hws/definer.c | 6 +++---
> .../net/ethernet/mellanox/mlx5/core/steering/hws/pat_arg.c | 3 +--
> 4 files changed, 4 insertions(+), 14 deletions(-)
>
>
> base-commit: 0ea09cbf8350b70ad44d67a1dcb379008a356034
> --
> 2.31.1
>
>
The series looks OK.
Thanks,
Michal
For the series:
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 0/3] net/mlx5: HW Steering cleanups
2025-03-12 11:49 [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Tariq Toukan
` (4 preceding siblings ...)
2025-03-12 12:40 ` Michal Kubiak
@ 2025-03-19 17:30 ` patchwork-bot+netdevbpf
5 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-19 17:30 UTC (permalink / raw)
To: Tariq Toukan
Cc: davem, edumazet, kuba, pabeni, andrew+netdev, gal, mbloch, moshe,
saeedm, leon, netdev, linux-rdma, linux-kernel
Hello:
This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Wed, 12 Mar 2025 13:49:51 +0200 you wrote:
> 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
>
> Regards,
> Tariq
>
> [...]
Here is the summary with links:
- [net-next,1/3] net/mlx5: HWS, remove unused code for alias flow tables
https://git.kernel.org/netdev/net-next/c/eae1389ab2f5
- [net-next,2/3] net/mlx5: HWS, use list_move() instead of del/add
https://git.kernel.org/netdev/net-next/c/1a403ad383ab
- [net-next,3/3] net/mlx5: HWS, log the unsupported mask in definer
https://git.kernel.org/netdev/net-next/c/8389f2de903c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-03-19 17:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-12 11:49 [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 1/3] net/mlx5: HWS, remove unused code for alias flow tables Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 2/3] net/mlx5: HWS, use list_move() instead of del/add Tariq Toukan
2025-03-12 11:49 ` [PATCH net-next 3/3] net/mlx5: HWS, log the unsupported mask in definer Tariq Toukan
2025-03-12 12:32 ` [PATCH net-next 0/3] net/mlx5: HW Steering cleanups Dawid Osuchowski
2025-03-12 12:40 ` Michal Kubiak
2025-03-19 17:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).