From patchwork Fri Apr 9 07:08:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 90947 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 351E6A0579; Fri, 9 Apr 2021 09:08:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B83CF141363; Fri, 9 Apr 2021 09:08:22 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 203AB141360 for ; Fri, 9 Apr 2021 09:08:20 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13970SSi026865; Fri, 9 Apr 2021 00:08:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=Wxn88sSDLd3LJhMiP21zjXmJUa6FRDX2AukrDAAlB/U=; b=NvLznSzkyqzjpwJ/RZuIZ7BRIG1yofMXiv0LUkU6BJYLrH1nm5v8DnE2n/FRUbGIy0ed crBcRgEWMWb/+ftfiwZVY2du0yNiRTTn3mvnJrVg9Yhu8euKLq+1lBhn7jBcWugWTtDp tnrU8onZdpHKq/5La6S7fHlKJCIIPf3pm9QYYCxVAUPFU4qvlwk9T9U6g7/iXWILQjOb f09zTqeBsNkY+hxNQhZs+HF2BzjM4KNLfApUVgTicK4Rg6n18SBzUnGy4JTzCt307KlS qi7was3uqNWLrW9Qz0mUzO4pjqiDgwRk/eQrA1wqWMSlGZbApp+XUz5fURHwn4TYTkJ0 /Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com with ESMTP id 37tftp8bsb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 09 Apr 2021 00:08:20 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 9 Apr 2021 00:08:19 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 9 Apr 2021 00:08:18 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id A51B53F704D; Fri, 9 Apr 2021 00:08:16 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , Abhinandan Gujjar , Jerin Jacob , Akhil Goyal , Anoob Joseph Date: Fri, 9 Apr 2021 12:38:09 +0530 Message-ID: <20210409070809.456444-1-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-GUID: n4tEq7pVWwtZwIJONpm7mrj-I8Ha9LVW X-Proofpoint-ORIG-GUID: n4tEq7pVWwtZwIJONpm7mrj-I8Ha9LVW X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-09_04:2021-04-08, 2021-04-09 signatures=0 Subject: [dpdk-dev] [PATCH v1] eventdev: fix case to initiate crypto adapter service X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Initiate software crypto adapter service, only if hardware capabilities are not reported. Case 1.a. OP_FORWARD mode -> HW Dequeue + SW enqueue, should also check OP_FORWARD capability is not supported by the PMD to initiate service. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Signed-off-by: Shijith Thotton --- lib/librte_eventdev/rte_event_crypto_adapter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c index d903cdd48..e1d38d383 100644 --- a/lib/librte_eventdev/rte_event_crypto_adapter.c +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c @@ -861,6 +861,7 @@ rte_event_crypto_adapter_queue_pair_add(uint8_t id, * b. OP_NEW mode -> SW Dequeue */ if ((cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW && + !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) && adapter->mode == RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) || (!(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW) && !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD) &&