DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bing Zhao <bingz@nvidia.com>
To: <dsosnowski@nvidia.com>, <viacheslavo@nvidia.com>, <dev@dpdk.org>,
	<rasland@nvidia.com>
Cc: <orika@nvidia.com>, <suanmingm@nvidia.com>, <matan@nvidia.com>
Subject: [PATCH 3/4] net/mlx5: fix matcher mask translation
Date: Tue, 23 Jul 2024 11:15:21 +0300	[thread overview]
Message-ID: <20240723081522.1087433-4-bingz@nvidia.com> (raw)
In-Reply-To: <20240723081522.1087433-1-bingz@nvidia.com>

In non-template API implementation on HWS, the matcher mask is
translated using DV item translation. This is used to find and
reuse the same matcher in the PMD for rules insertion when possible.

The flags calculated previously for items should not be passed to
avoid incorrectly recognizing the layers. In the meanwhile, unlike
in template API, the group information is also needed for the mask
translation.

Fixes: 27d171b88031 ("net/mlx5: abstract flow action and enable reconfigure")

Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 1 +
 drivers/net/mlx5/mlx5_flow_hw.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 89057edbcf..a51d4dd1a4 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -14538,6 +14538,7 @@ __flow_dv_translate_items_hws(const struct rte_flow_item *items,
 		.next_protocol = 0xff,
 		.attr = &rattr,
 		.rss_desc = &rss_desc,
+		.group = attr->group,
 	};
 	int ret = 0;
 
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 470919fe8a..46f6665846 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -13682,7 +13682,7 @@ flow_hw_create_flow(struct rte_eth_dev *dev, enum mlx5_flow_type type,
 		.rss_level = 0,
 		.act_flags = action_flags,
 		.tbl_type = 0,
-		};
+	};
 
 	memset(&hw_act, 0, sizeof(hw_act));
 	if (attr->transfer)
@@ -13702,7 +13702,7 @@ flow_hw_create_flow(struct rte_eth_dev *dev, enum mlx5_flow_type type,
 	(*flow)->nt_rule = true;
 	(*flow)->nt2hws->matcher = &matcher;
 	ret = flow_dv_translate_items_hws(items, &flow_attr, &matcher.mask.buf,
-					MLX5_SET_MATCHER_HS_M, &item_flags,
+					MLX5_SET_MATCHER_HS_M, NULL,
 					NULL, error);
 
 	if (ret)
-- 
2.34.1


  parent reply	other threads:[~2024-07-23  8:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23  8:15 [PATCH 0/4] non-template fixes set Bing Zhao
2024-07-23  8:15 ` [PATCH 1/4] net/mlx5/hws: fix state detection of queue full in polling Bing Zhao
2024-07-23  8:15 ` [PATCH 2/4] net/mlx5: fix releasing order of compatible matcher Bing Zhao
2024-07-23  8:15 ` Bing Zhao [this message]
2024-07-23  8:15 ` [PATCH 4/4] net/mlx5: fix log error on non-template rule destroy Bing Zhao
2024-08-29  8:59 ` [PATCH 0/4] non-template fixes set Raslan Darawsheh

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=20240723081522.1087433-4-bingz@nvidia.com \
    --to=bingz@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --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).