* [dpdk-dev] [PATCH 0/2] regexdev: add new response flag
@ 2020-12-17 10:37 Ori Kam
2020-12-17 10:37 ` [dpdk-dev] [PATCH 1/2] regexdev: add resource limit reached rsp flag Ori Kam
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ori Kam @ 2020-12-17 10:37 UTC (permalink / raw)
To: jerinj; +Cc: guyk, dev, thomas, orika
The RegEx engine is using HW resources that may reach some limit for
different reasons.
In current API the RegEx can report only on max threads reached.
This commit introduce a new flag to report to the app that some
HW resource limit has been reached.
Ori Kam (2):
regexdev: add resource limit reached rsp flag
regex/mlx5: add regex response flags
drivers/regex/mlx5/mlx5_regex_fastpath.c | 23 ++++++++++++++++++++++-
lib/librte_regexdev/rte_regexdev.h | 5 +++++
2 files changed, 27 insertions(+), 1 deletion(-)
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 1/2] regexdev: add resource limit reached rsp flag
2020-12-17 10:37 [dpdk-dev] [PATCH 0/2] regexdev: add new response flag Ori Kam
@ 2020-12-17 10:37 ` Ori Kam
2021-01-07 15:16 ` Ori Kam
2020-12-17 10:37 ` [dpdk-dev] [PATCH 2/2] regex/mlx5: add regex response flags Ori Kam
2021-01-12 22:33 ` [dpdk-dev] [PATCH 0/2] regexdev: add new response flag Thomas Monjalon
2 siblings, 1 reply; 5+ messages in thread
From: Ori Kam @ 2020-12-17 10:37 UTC (permalink / raw)
To: jerinj; +Cc: guyk, dev, thomas, orika, Francis Kelly
When scanning a buffer it is possible that the scan will abort
due to some internal resource limit.
This commit adds such response flag, so application can handle such cases.
Signed-off-by: Francis Kelly <fkelly@nvidia.com>
Signed-off-by: Ori Kam <orika@nvidia.com>
---
lib/librte_regexdev/rte_regexdev.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/librte_regexdev/rte_regexdev.h b/lib/librte_regexdev/rte_regexdev.h
index 0001658925..86f0b231b0 100644
--- a/lib/librte_regexdev/rte_regexdev.h
+++ b/lib/librte_regexdev/rte_regexdev.h
@@ -1333,6 +1333,11 @@ struct rte_regexdev_match {
* @see RTE_REGEXDEV_ATTR_MAX_PREFIX
*/
+#define RTE_REGEX_OPS_RSP_RESOURCE_LIMIT_REACHED_F (1 << 4)
+/**< Indicates that the RegEx device has reached the max allowed resource
+ * allowed while scanning the given buffer.
+ */
+
/**
* The generic *rte_regex_ops* structure to hold the RegEx attributes
* for enqueue and dequeue operation.
--
2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] regex/mlx5: add regex response flags
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
@ 2020-12-17 10:37 ` Ori Kam
2021-01-12 22:33 ` [dpdk-dev] [PATCH 0/2] regexdev: add new response flag Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Ori Kam @ 2020-12-17 10:37 UTC (permalink / raw)
To: jerinj; +Cc: guyk, dev, thomas, orika, Francis Kelly
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] regexdev: add resource limit reached rsp flag
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
0 siblings, 0 replies; 5+ messages in thread
From: Ori Kam @ 2021-01-07 15:16 UTC (permalink / raw)
To: Ori Kam, jerinj; +Cc: guyk, dev, NBU-Contact-Thomas Monjalon, Francis Kelly
Hi
I would very much like a review for this patch.
Thank you,
Ori
> -----Original Message-----
> From: Ori Kam <orika@nvidia.com>
> Sent: Thursday, December 17, 2020 12:38 PM
> Subject: [PATCH 1/2] regexdev: add resource limit reached rsp flag
>
> When scanning a buffer it is possible that the scan will abort
> due to some internal resource limit.
>
> This commit adds such response flag, so application can handle such cases.
>
> Signed-off-by: Francis Kelly <fkelly@nvidia.com>
> Signed-off-by: Ori Kam <orika@nvidia.com>
> ---
> lib/librte_regexdev/rte_regexdev.h | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/librte_regexdev/rte_regexdev.h
> b/lib/librte_regexdev/rte_regexdev.h
> index 0001658925..86f0b231b0 100644
> --- a/lib/librte_regexdev/rte_regexdev.h
> +++ b/lib/librte_regexdev/rte_regexdev.h
> @@ -1333,6 +1333,11 @@ struct rte_regexdev_match {
> * @see RTE_REGEXDEV_ATTR_MAX_PREFIX
> */
>
> +#define RTE_REGEX_OPS_RSP_RESOURCE_LIMIT_REACHED_F (1 << 4)
> +/**< Indicates that the RegEx device has reached the max allowed resource
> + * allowed while scanning the given buffer.
> + */
> +
> /**
> * The generic *rte_regex_ops* structure to hold the RegEx attributes
> * for enqueue and dequeue operation.
> --
> 2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] regexdev: add new response flag
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
2020-12-17 10:37 ` [dpdk-dev] [PATCH 2/2] regex/mlx5: add regex response flags Ori Kam
@ 2021-01-12 22:33 ` Thomas Monjalon
2 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2021-01-12 22:33 UTC (permalink / raw)
To: Ori Kam; +Cc: jerinj, guyk, dev
17/12/2020 11:37, Ori Kam:
> The RegEx engine is using HW resources that may reach some limit for
> different reasons.
> In current API the RegEx can report only on max threads reached.
>
> This commit introduce a new flag to report to the app that some
> HW resource limit has been reached.
>
>
> Ori Kam (2):
> regexdev: add resource limit reached rsp flag
> regex/mlx5: add regex response flags
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-12 22:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [dpdk-dev] [PATCH 2/2] regex/mlx5: add regex response flags Ori Kam
2021-01-12 22:33 ` [dpdk-dev] [PATCH 0/2] regexdev: add new response flag Thomas Monjalon
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).