From: Alex Vesker <va...@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 <va...@nvidia.com>
Acked-by: Matan Azrad <ma...@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_matcher.c | 7 +++++++
 1 file changed, 7 insertions(+)

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];
 
-- 
2.39.3

Reply via email to