From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 77CA5A09F0;
	Thu, 17 Dec 2020 11:37:56 +0100 (CET)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 73CDCCA10;
	Thu, 17 Dec 2020 11:37:44 +0100 (CET)
Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])
 by dpdk.org (Postfix) with ESMTP id B70B2C9D2
 for <dev@dpdk.org>; Thu, 17 Dec 2020 11:37:41 +0100 (CET)
Received: from Internal Mail-Server by MTLPINE1 (envelope-from
 orika@nvidia.com) with SMTP; 17 Dec 2020 12:37:38 +0200
Received: from MTL-ORIKA.mtl.com ([172.27.14.211])
 by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BHAbaVl029627;
 Thu, 17 Dec 2020 12:37:37 +0200
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>
Date: Thu, 17 Dec 2020 12:37:30 +0200
Message-Id: <20201217103731.24074-2-orika@nvidia.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20201217103731.24074-1-orika@nvidia.com>
References: <20201217103731.24074-1-orika@nvidia.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [dpdk-dev] [PATCH 1/2] regexdev: add resource limit reached rsp flag
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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