54 lines
2.3 KiB
Diff
54 lines
2.3 KiB
Diff
From 83591e87d75f1fbe1bad278c3b590cc83e85c276 Mon Sep 17 00:00:00 2001
|
|
From: Kamal Heib <kheib@redhat.com>
|
|
Date: Thu, 16 Apr 2026 17:41:59 -0400
|
|
Subject: [PATCH] net/mlx5: HWS, Fix pool size optimization
|
|
|
|
JIRA: https://redhat.atlassian.net/browse/RHEL-169055
|
|
|
|
commit a68334f9750f41fc36990840090ef9dbee1e2c7e
|
|
Author: Vlad Dogaru <vdogaru@nvidia.com>
|
|
Date: Thu Apr 10 22:17:37 2025 +0300
|
|
|
|
net/mlx5: HWS, Fix pool size optimization
|
|
|
|
The optimization to create a size-one STE range for the unused direction
|
|
was broken. The hardware prevents us from creating RTCs over unallocated
|
|
STE space, so the only reason this has worked so far is because the
|
|
optimization was never used.
|
|
|
|
Signed-off-by: Vlad Dogaru <vdogaru@nvidia.com>
|
|
Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
|
|
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
|
|
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
|
|
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
|
|
Link: https://patch.msgid.link/1744312662-356571-8-git-send-email-tariqt@nvidia.com
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
|
|
Signed-off-by: Kamal Heib <kheib@redhat.com>
|
|
|
|
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.c
|
|
index 26d85fe3c417..7e37d6e9eb83 100644
|
|
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.c
|
|
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/pool.c
|
|
@@ -80,7 +80,7 @@ static int hws_pool_resource_alloc(struct mlx5hws_pool *pool)
|
|
u32 fw_ft_type, opt_log_range;
|
|
|
|
fw_ft_type = mlx5hws_table_get_res_fw_ft_type(pool->tbl_type, false);
|
|
- opt_log_range = pool->opt_type == MLX5HWS_POOL_OPTIMIZE_ORIG ?
|
|
+ opt_log_range = pool->opt_type == MLX5HWS_POOL_OPTIMIZE_MIRROR ?
|
|
0 : pool->alloc_log_sz;
|
|
resource = hws_pool_create_one_resource(pool, opt_log_range, fw_ft_type);
|
|
if (!resource) {
|
|
@@ -94,7 +94,7 @@ static int hws_pool_resource_alloc(struct mlx5hws_pool *pool)
|
|
struct mlx5hws_pool_resource *mirror_resource;
|
|
|
|
fw_ft_type = mlx5hws_table_get_res_fw_ft_type(pool->tbl_type, true);
|
|
- opt_log_range = pool->opt_type == MLX5HWS_POOL_OPTIMIZE_MIRROR ?
|
|
+ opt_log_range = pool->opt_type == MLX5HWS_POOL_OPTIMIZE_ORIG ?
|
|
0 : pool->alloc_log_sz;
|
|
mirror_resource = hws_pool_create_one_resource(pool, opt_log_range, fw_ft_type);
|
|
if (!mirror_resource) {
|
|
--
|
|
2.50.1 (Apple Git-155)
|
|
|