DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ori Kam <orika@nvidia.com>
To: jerinj@marvell.com
Cc: guyk@marvell.com, dev@dpdk.org, thomas@monjalon.net,
	orika@nvidia.com, Francis Kelly <fkelly@nvidia.com>
Subject: [dpdk-dev] [PATCH 2/2] regex/mlx5: add regex response flags
Date: Thu, 17 Dec 2020 12:37:31 +0200
Message-ID: <20201217103731.24074-3-orika@nvidia.com> (raw)
In-Reply-To: <20201217103731.24074-1-orika@nvidia.com>

This commit propagate the response flags from the regex engine.

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

diff --git a/drivers/regex/mlx5/mlx5_regex_fastpath.c b/drivers/regex/mlx5/mlx5_regex_fastpath.c
index ee72f89c99..593b7d183a 100644
--- a/drivers/regex/mlx5/mlx5_regex_fastpath.c
+++ b/drivers/regex/mlx5/mlx5_regex_fastpath.c
@@ -209,7 +209,10 @@ mlx5_regexdev_enqueue(struct rte_regexdev *dev, uint16_t qp_id,
 static inline void
 extract_result(struct rte_regex_ops *op, struct mlx5_regex_job *job)
 {
-	size_t j, offset;
+	size_t j;
+	size_t offset;
+	uint16_t status;
+
 	op->user_id = job->user_id;
 	op->nb_matches = MLX5_GET_VOLATILE(regexp_metadata, job->metadata +
 					   MLX5_REGEX_METADATA_OFF,
@@ -230,6 +233,24 @@ extract_result(struct rte_regex_ops *op, struct mlx5_regex_job *job)
 			MLX5_GET_VOLATILE(regexp_match_tuple,
 					  (job->output +  offset), length);
 	}
+	status = MLX5_GET_VOLATILE(regexp_metadata, job->metadata +
+				   MLX5_REGEX_METADATA_OFF,
+				   status);
+	op->rsp_flags = 0;
+	if (status & MLX5_RXP_RESP_STATUS_PMI_SOJ)
+		op->rsp_flags |= RTE_REGEX_OPS_RSP_PMI_SOJ_F;
+	if (status & MLX5_RXP_RESP_STATUS_PMI_EOJ)
+		op->rsp_flags |= RTE_REGEX_OPS_RSP_PMI_EOJ_F;
+	if (status & MLX5_RXP_RESP_STATUS_MAX_LATENCY)
+		op->rsp_flags |= RTE_REGEX_OPS_RSP_MAX_SCAN_TIMEOUT_F;
+	if (status & MLX5_RXP_RESP_STATUS_MAX_MATCH)
+		op->rsp_flags |= RTE_REGEX_OPS_RSP_MAX_MATCH_F;
+	if (status & MLX5_RXP_RESP_STATUS_MAX_PREFIX)
+		op->rsp_flags |= RTE_REGEX_OPS_RSP_MAX_PREFIX_F;
+	if (status & MLX5_RXP_RESP_STATUS_MAX_PRI_THREADS)
+		op->rsp_flags |= RTE_REGEX_OPS_RSP_RESOURCE_LIMIT_REACHED_F;
+	if (status & MLX5_RXP_RESP_STATUS_MAX_SEC_THREADS)
+		op->rsp_flags |= RTE_REGEX_OPS_RSP_RESOURCE_LIMIT_REACHED_F;
 }
 
 static inline volatile struct mlx5_cqe *
-- 
2.25.1


  parent reply	other threads:[~2020-12-17 10:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 10:37 [dpdk-dev] [PATCH 0/2] regexdev: add new response flag Ori Kam
2020-12-17 10:37 ` [dpdk-dev] [PATCH 1/2] regexdev: add resource limit reached rsp flag Ori Kam
2021-01-07 15:16   ` Ori Kam
2020-12-17 10:37 ` Ori Kam [this message]
2021-01-12 22:33 ` [dpdk-dev] [PATCH 0/2] regexdev: add new response flag 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=20201217103731.24074-3-orika@nvidia.com \
    --to=orika@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=fkelly@nvidia.com \
    --cc=guyk@marvell.com \
    --cc=jerinj@marvell.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git