[12/13] net/mlx5/hws: extending tag saving for match and jumbo

Message ID 20240314114220.203241-12-igozlan@nvidia.com (mailing list archive)
State Superseded
Delegated to: Raslan Darawsheh
Headers
Series [01/13] net/mlx5/hws: move warn into debug level when needed |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Itamar Gozlan March 14, 2024, 11:42 a.m. UTC
  From: Erez Shitrit <erezsh@nvidia.com>

Save the exact tag when matching over jumbo masking.

Fixes: 348cdeec6472 ("net/mlx5/hws: add FW WQE rule creation logic")

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_rule.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr_rule.c b/drivers/net/mlx5/hws/mlx5dr_rule.c
index 3e8e90ba76..d56677a1a5 100644
--- a/drivers/net/mlx5/hws/mlx5dr_rule.c
+++ b/drivers/net/mlx5/hws/mlx5dr_rule.c
@@ -195,8 +195,13 @@  mlx5dr_rule_save_delete_info(struct mlx5dr_rule *rule,
 		rule->tag_ptr = simple_calloc(2, sizeof(*rule->tag_ptr));
 		assert(rule->tag_ptr);
 
-		src_tag = (uint8_t *)ste_attr->wqe_data->tag;
-		memcpy(rule->tag_ptr[0].match, src_tag, MLX5DR_MATCH_TAG_SZ);
+		if (is_jumbo)
+			memcpy(rule->tag_ptr[0].jumbo, ste_attr->wqe_data->action,
+			       MLX5DR_JUMBO_TAG_SZ);
+		else
+			memcpy(rule->tag_ptr[0].match, ste_attr->wqe_data->tag,
+			       MLX5DR_MATCH_TAG_SZ);
+
 		rule->tag_ptr[1].reserved[0] = ste_attr->send_attr.match_definer_id;
 
 		/* Save range definer id and tag for delete */