[11/13] net/mlx5/hws: drop at attach number of actions

Message ID 20240314114220.203241-11-igozlan@nvidia.com (mailing list archive)
State New
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: Alex Vesker <valex@nvidia.com>

Requesting the user for number of action resources is
not defined well enough, instead the user should provide
an initial action template which should contain the
future attached action templates.

Signed-off-by: Alex Vesker <valex@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_matcher.c | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index 1213e7f0ad..78d525e578 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -785,6 +785,13 @@  static int mlx5dr_matcher_bind_at(struct mlx5dr_matcher *matcher)
 	if (matcher->flags & MLX5DR_MATCHER_FLAGS_COLLISION)
 		return 0;
 
+	if (matcher->attr.max_num_of_at_attach &&
+	    mlx5dr_matcher_req_fw_wqe(matcher)) {
+		DR_LOG(ERR, "FW extended matcher doesn't support additional at");
+		rte_errno = ENOTSUP;
+		return rte_errno;
+	}
+
 	for (i = 0; i < matcher->num_of_at; i++) {
 		struct mlx5dr_action_template *at = &matcher->at[i];