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 [thread overview]
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
next prev 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
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).