[v4] net/mlx5/hws: fix saving of jumbo tag for deletion

Message ID 20230322144413.656047-1-erezsh@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series [v4] net/mlx5/hws: fix saving of jumbo tag for deletion |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Erez Shitrit March 22, 2023, 2:44 p.m. UTC
  In cases with more than one STE we didn't update the whole tag
of the match jumbo STE, Instead of 11B we kept only 8B like in
regular STE.
The ste_attr that keeps that indication was not updated at the
last iteration.
Now we indicate it is a jumbo frame before saving the tag for
future deletion of it.

Fixes: 405242c52dd5 ("net/mlx5/hws: add rule object")
Cc: stable@dpdk.org

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_rule.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Raslan Darawsheh March 23, 2023, 7:20 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Erez Shitrit <erezsh@nvidia.com>
> Sent: Wednesday, March 22, 2023 4:44 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>
> Subject: [PATCH v4] net/mlx5/hws: fix saving of jumbo tag for deletion
> 
> 
> In cases with more than one STE we didn't update the whole tag
> of the match jumbo STE, Instead of 11B we kept only 8B like in
> regular STE.
> The ste_attr that keeps that indication was not updated at the
> last iteration.
> Now we indicate it is a jumbo frame before saving the tag for
> future deletion of it.
> 
> Fixes: 405242c52dd5 ("net/mlx5/hws: add rule object")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
> Reviewed-by: Alex Vesker <valex@nvidia.com>
> Acked-by: Matan Azrad <matan@nvidia.com>

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 9d5e5b11a5..2418ca0b26 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -116,6 +116,9 @@  static void
 mlx5dr_rule_save_delete_info(struct mlx5dr_rule *rule,
 			     struct mlx5dr_send_ste_attr *ste_attr)
 {
+	struct mlx5dr_match_template *mt = rule->matcher->mt;
+	bool is_jumbo = mlx5dr_matcher_mt_is_jumbo(mt);
+
 	if (unlikely(mlx5dr_matcher_req_fw_wqe(rule->matcher))) {
 		uint8_t *src_tag;
 
@@ -136,7 +139,7 @@  mlx5dr_rule_save_delete_info(struct mlx5dr_rule *rule,
 		return;
 	}
 
-	if (ste_attr->wqe_tag_is_jumbo)
+	if (is_jumbo)
 		memcpy(rule->tag.jumbo, ste_attr->wqe_data->jumbo, MLX5DR_JUMBO_TAG_SZ);
 	else
 		memcpy(rule->tag.match, ste_attr->wqe_data->tag, MLX5DR_MATCH_TAG_SZ);