All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ori Kam <orika@nvidia.com>
To: thomas@monjalon.net
Cc: orika@mellanox.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 4/5] regex/mlx5: add support for priority match
Date: Thu,  7 Jan 2021 18:57:10 +0200	[thread overview]
Message-ID: <20210107165711.1782-5-orika@nvidia.com> (raw)
In-Reply-To: <20210107165711.1782-1-orika@nvidia.com>

The high priority match request flags means that the
RegEx engine should stop on the first match.

This commit add this flag check to the RegEx engine.

Signed-off-by: Ori Kam <orika@nvidia.com>
---
 drivers/regex/mlx5/mlx5_regex_fastpath.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c
index 8d134ac98e..ee72f89c99 100644
--- a/drivers/regex/mlx5/mlx5_regex_fastpath.c
+++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c
@@ -113,6 +113,8 @@ prep_one(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp,
 				op->group_id2 : 0;
 	uint16_t group3 = op->req_flags & RTE_REGEX_OPS_REQ_GROUP_ID3_VALID_F ?
 				op->group_id3 : 0;
+	uint8_t control = op->req_flags &
+				RTE_REGEX_OPS_REQ_MATCH_HIGH_PRIORITY_F ? 1 : 0;
 
 	/* For backward compatibility. */
 	if (!(op->req_flags & (RTE_REGEX_OPS_REQ_GROUP_ID0_VALID_F |
@@ -131,7 +133,7 @@ prep_one(struct mlx5_regex_priv *priv, struct mlx5_regex_qp *qp,
 			 MLX5_OPCODE_MMO, MLX5_OPC_MOD_MMO_REGEX, sq->obj->id,
 			 0, ds, 0, 0);
 	set_regex_ctrl_seg(wqe + 12, 0, group0, group1, group2, group3,
-			   0);
+			   control);
 	struct mlx5_wqe_data_seg *input_seg =
 		(struct mlx5_wqe_data_seg *)(wqe +
 					     MLX5_REGEX_WQE_GATHER_OFFSET);
-- 
2.25.1


  parent reply	other threads:[~2021-01-07 16:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  8:51 [dpdk-dev] [PATCH 0/4] regex/mlx5: pmd improvements Ori Kam
2020-12-17  8:51 ` [dpdk-dev] [PATCH 1/4] regex/mlx5: fix memory rule alignment Ori Kam
2020-12-17  8:51 ` [dpdk-dev] [PATCH 2/4] regex/mlx5: add support for combined rule file Ori Kam
2020-12-17  8:51 ` [dpdk-dev] [PATCH 3/4] regex/mlx5: fix support for group id Ori Kam
2020-12-17  8:51 ` [dpdk-dev] [PATCH 4/4] regex/mlx5: add support for priority match Ori Kam
2021-01-07 16:57 ` [dpdk-dev] [PATCH v2 0/5] regex/mlx5: pmd improvements Ori Kam
2021-01-07 16:57   ` [dpdk-dev] [PATCH v2 1/5] regex/mlx5: fix memory rule alignment Ori Kam
2021-01-07 16:57   ` [dpdk-dev] [PATCH v2 2/5] regex/mlx5: add support for combined rule file Ori Kam
2021-01-07 16:57   ` [dpdk-dev] [PATCH v2 3/5] regex/mlx5: fix support for group id Ori Kam
2021-01-07 16:57   ` Ori Kam [this message]
2021-01-07 16:57   ` [dpdk-dev] [PATCH v2 5/5] regex/mlx5: fix num of supported queues Ori Kam
2021-01-19 17:08   ` [dpdk-dev] [PATCH v2 0/5] regex/mlx5: pmd improvements Thomas Monjalon

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=20210107165711.1782-5-orika@nvidia.com \
    --to=orika@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=orika@mellanox.com \
    --cc=thomas@monjalon.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.