DPDK patches and discussions
 help / color / mirror / Atom feed
From: Erez Shitrit <erezsh@nvidia.com>
To: <valex@nvidia.com>, <thomas@monjalon.net>, <suanmingm@nvidia.com>,
	"Matan Azrad" <matan@nvidia.com>,
	Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
	 "Ori Kam" <orika@nvidia.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 4/4] net/mlx5/hws: skip process action-template on coll matcher
Date: Sun, 10 Sep 2023 17:03:19 +0300	[thread overview]
Message-ID: <20230910140319.3064208-4-erezsh@nvidia.com> (raw)
In-Reply-To: <20230910140319.3064208-1-erezsh@nvidia.com>


Collision matcher uses the same action-template and action STE's as its
parent matcher, so ne need to redo it.

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_matcher.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index a02f42a7e8..102e4f19c8 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -714,6 +714,9 @@ static int mlx5dr_matcher_bind_at(struct mlx5dr_matcher *matcher)
 	uint32_t required_stes;
 	int i, ret;
 
+	if (matcher->flags & MLX5DR_MATCHER_FLAGS_COLLISION)
+		return 0;
+
 	for (i = 0; i < matcher->num_of_at; i++) {
 		struct mlx5dr_action_template *at = &matcher->at[i];
 
@@ -786,7 +789,7 @@ static void mlx5dr_matcher_unbind_at(struct mlx5dr_matcher *matcher)
 {
 	struct mlx5dr_table *tbl = matcher->tbl;
 
-	if (!matcher->action_ste.max_stes)
+	if (!matcher->action_ste.max_stes || matcher->flags & MLX5DR_MATCHER_FLAGS_COLLISION)
 		return;
 
 	mlx5dr_action_free_single_stc(tbl->ctx, tbl->type, &matcher->action_ste.stc);
-- 
2.18.2


  parent reply	other threads:[~2023-09-10 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 14:03 [PATCH 1/4] net/mlx5/hws: allow relaxed mode in MPLS matching Erez Shitrit
2023-09-10 14:03 ` [PATCH 2/4] net/mlx5/hws: allow attaching action template to matcher Erez Shitrit
2023-09-10 14:03 ` [PATCH 3/4] net/mlx5/hws: print syndrome value on error Erez Shitrit
2023-09-10 14:03 ` Erez Shitrit [this message]
2023-09-19 12:02 ` [PATCH 1/4] net/mlx5/hws: allow relaxed mode in MPLS matching 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=20230910140319.3064208-4-erezsh@nvidia.com \
    --to=erezsh@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=valex@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).