DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yevgeny Kliteynik <kliteyn@nvidia.com>
To: <kliteyn@nvidia.com>, <viacheslavo@nvidia.com>,
	<thomas@monjalon.net>, <suanmingm@nvidia.com>,
	Matan Azrad <matan@nvidia.com>
Cc: <dev@dpdk.org>, <orika@nvidia.com>
Subject: [PATCH 4/4] net/mlx5/hws: handle collision matcher for linear RTC
Date: Thu, 12 Jan 2023 15:49:12 +0200	[thread overview]
Message-ID: <20230112134913.2632849-4-kliteyn@nvidia.com> (raw)
In-Reply-To: <20230112134913.2632849-1-kliteyn@nvidia.com>

No need to create/destroy collision matcher for linear RTC,
because it has a constant depth of 1 STE - packets reaching
any STE in the array will always match and perform the specified
actions.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_matcher.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_matcher.c b/drivers/net/mlx5/hws/mlx5dr_matcher.c
index 60865bf562..d509a2f0e1 100644
--- a/drivers/net/mlx5/hws/mlx5dr_matcher.c
+++ b/drivers/net/mlx5/hws/mlx5dr_matcher.c
@@ -925,7 +925,8 @@ mlx5dr_matcher_create_col_matcher(struct mlx5dr_matcher *matcher)
 	struct mlx5dr_matcher *col_matcher;
 	int ret;
 
-	if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE)
+	if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE ||
+	    matcher->attr.insert_mode == MLX5DR_MATCHER_INSERT_BY_INDEX)
 		return 0;
 
 	if (!mlx5dr_matcher_requires_col_tbl(matcher->attr.rule.num_log))
@@ -972,7 +973,8 @@ mlx5dr_matcher_create_col_matcher(struct mlx5dr_matcher *matcher)
 static void
 mlx5dr_matcher_destroy_col_matcher(struct mlx5dr_matcher *matcher)
 {
-	if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE)
+	if (matcher->attr.mode != MLX5DR_MATCHER_RESOURCE_MODE_RULE ||
+	    matcher->attr.insert_mode == MLX5DR_MATCHER_INSERT_BY_INDEX)
 		return;
 
 	if (matcher->col_matcher) {
-- 
2.27.0


  parent reply	other threads:[~2023-01-12 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 13:49 [PATCH 1/4] net/mlx5/hws: definitions for Hash Split/Linear Lookup tbls Yevgeny Kliteynik
2023-01-12 13:49 ` [PATCH 2/4] net/mlx5/hws: read capabilities for Split/Linear tables Yevgeny Kliteynik
2023-01-23 14:07   ` Slava Ovsiienko
2023-01-12 13:49 ` [PATCH 3/4] net/mlx5/hws: support insert/distribute RTC properties Yevgeny Kliteynik
2023-01-23 14:07   ` Slava Ovsiienko
2023-01-12 13:49 ` Yevgeny Kliteynik [this message]
2023-01-23 14:07   ` [PATCH 4/4] net/mlx5/hws: handle collision matcher for linear RTC Slava Ovsiienko
2023-01-19 12:58 ` [PATCH 1/4] net/mlx5/hws: definitions for Hash Split/Linear Lookup tbls Ali Alnubani
2023-01-23 14:06 ` Slava Ovsiienko
2023-01-25 17:19 ` 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=20230112134913.2632849-4-kliteyn@nvidia.com \
    --to=kliteyn@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=suanmingm@nvidia.com \
    --cc=thomas@monjalon.net \
    --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).