net/mlx5/hws: fix cap check for hash calc
PATCH 1/1 net/mlx5/hws: fix cap check for hash calc
From: Itamar Gozlan <[email protected]>
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.
--- drivers/net/mlx5/hws/mlx5dr_rule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/hws/mlx5dr_rule.c +1 -1
@@ -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 ;
Signature · 1 line
2.21.0
Hi,
Quoted 8 lines · Maayan Kashani
From: Itamar Gozlan <[email protected]>
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.
Quoted 5 lines
Fixes 7f5e6de53aae ("net/mlx5/hws: query flow rule hash")Signed-off-by Itamar Gozlan <[email protected]>Acked-by Bing Zhao <[email protected]>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh