[1/2] regexdev: add resource limit reached rsp flag

Message ID 20201217103731.24074-2-orika@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series regexdev: add new response flag |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Ori Kam Dec. 17, 2020, 10:37 a.m. UTC
  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(+)
  

Comments

Ori Kam Jan. 7, 2021, 3:16 p.m. UTC | #1
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
  

Patch

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.