* [PATCH] net/mlx5/hws: fix cap check for hash calc
@ 2025-11-16 11:59 Maayan Kashani
2025-11-18 11:27 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Maayan Kashani @ 2025-11-16 11:59 UTC (permalink / raw)
To: dev
Cc: mkashani, rasland, Itamar Gozlan, stable, Bing Zhao,
Dariusz Sosnowski, Viacheslav Ovsiienko, Ori Kam, Suanming Mou,
Matan Azrad
From: Itamar Gozlan <igozlan@nvidia.com>
Some cases are not supported for rule hash calculation. For example
when the matcher defined as FW matcher, or is the hash type is different
than CRC32. One case is when the distribute mode is not by hash, the
previous condition checked a wrong capability, while this commit fixes
it to the correct check.
Fixes: 7f5e6de53aae ("net/mlx5/hws: query flow rule hash")
Cc: stable@dpdk.org
Signed-off-by: Itamar Gozlan <igozlan@nvidia.com>
Acked-by: Bing Zhao <bingz@nvidia.com>
---
drivers/net/mlx5/hws/mlx5dr_rule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 878224d8b3f..895ac858eca 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -1084,7 +1084,7 @@ int mlx5dr_rule_hash_calculate(struct mlx5dr_matcher *matcher,
if (mlx5dr_matcher_req_fw_wqe(matcher) ||
mlx5dr_table_is_root(matcher->tbl) ||
- matcher->tbl->ctx->caps->access_index_mode == MLX5DR_MATCHER_INSERT_BY_HASH ||
+ matcher->attr.distribute_mode != MLX5DR_MATCHER_DISTRIBUTE_BY_HASH ||
matcher->tbl->ctx->caps->flow_table_hash_type != MLX5_FLOW_TABLE_HASH_TYPE_CRC32) {
DR_LOG(DEBUG, "Matcher is not supported");
rte_errno = ENOTSUP;
--
2.21.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] net/mlx5/hws: fix cap check for hash calc
2025-11-16 11:59 [PATCH] net/mlx5/hws: fix cap check for hash calc Maayan Kashani
@ 2025-11-18 11:27 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2025-11-18 11:27 UTC (permalink / raw)
To: Maayan Kashani, dev
Cc: Itamar Gozlan, stable, Bing Zhao, Dariusz Sosnowski,
Viacheslav Ovsiienko, Ori Kam, Suanming Mou, Matan Azrad
Hi,
On 16/11/2025 1:59 PM, Maayan Kashani wrote:
> From: Itamar Gozlan <igozlan@nvidia.com>
>
> Some cases are not supported for rule hash calculation. For example
> when the matcher defined as FW matcher, or is the hash type is different
> than CRC32. One case is when the distribute mode is not by hash, the
> previous condition checked a wrong capability, while this commit fixes
> it to the correct check.
>
> Fixes: 7f5e6de53aae ("net/mlx5/hws: query flow rule hash")
> Cc: stable@dpdk.org
>
> Signed-off-by: Itamar Gozlan <igozlan@nvidia.com>
> Acked-by: Bing Zhao <bingz@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-18 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-16 11:59 [PATCH] net/mlx5/hws: fix cap check for hash calc Maayan Kashani
2025-11-18 11:27 ` Raslan Darawsheh
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).