From: Maayan Kashani <mkashani@nvidia.com>
To: <dev@dpdk.org>
Cc: <mkashani@nvidia.com>, <rasland@nvidia.com>,
Itamar Gozlan <igozlan@nvidia.com>, <stable@dpdk.org>,
Bing Zhao <bingz@nvidia.com>,
Dariusz Sosnowski <dsosnowski@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>
Subject: [PATCH] net/mlx5/hws: fix cap check for hash calc
Date: Sun, 16 Nov 2025 13:59:25 +0200 [thread overview]
Message-ID: <20251116115925.158944-1-mkashani@nvidia.com> (raw)
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
reply other threads:[~2025-11-16 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251116115925.158944-1-mkashani@nvidia.com \
--to=mkashani@nvidia.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=igozlan@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).