From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41108A09F0; Thu, 17 Dec 2020 11:38:15 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F4E8CA1C; Thu, 17 Dec 2020 11:37:47 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 0F1C4CA1A for ; Thu, 17 Dec 2020 11:37:45 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from orika@nvidia.com) with SMTP; 17 Dec 2020 12:37:39 +0200 Received: from MTL-ORIKA.mtl.com ([172.27.14.211]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BHAbaVm029627; Thu, 17 Dec 2020 12:37:39 +0200 From: Ori Kam To: jerinj@marvell.com Cc: guyk@marvell.com, dev@dpdk.org, thomas@monjalon.net, orika@nvidia.com, Francis Kelly Date: Thu, 17 Dec 2020 12:37:31 +0200 Message-Id: <20201217103731.24074-3-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 2/2] regex/mlx5: add regex response flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This commit propagate the response flags from the regex engine. Signed-off-by: Francis Kelly Signed-off-by: Ori Kam --- 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