From patchwork Mon Apr 12 08:53:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shijith Thotton X-Patchwork-Id: 91107 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 3D06EA0C44; Mon, 12 Apr 2021 10:54:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE504141007; Mon, 12 Apr 2021 10:54:11 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id D9914141003 for ; Mon, 12 Apr 2021 10:54:10 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13C8iikp019015; Mon, 12 Apr 2021 01:54:10 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=6QkX2OHhvigidSXkjyTPNYwQE3xs41gOTd/P9vyTujQ=; b=It0uNm2vtPsyhR5725S2NQOHVkptYmdtEvS0LjUqjOXeIhA0MNoGAULwgzES9P5BQLdv cnCSGOPR2YczKpRiN/hk0w5BuqXa0U6F3l0yo417R9C4xrdR3f05h/aPyUlQAA+faCtF v3H5iPCB4lN0au3NhdyYdAce+1S6ErcqOfsUp/e2WWgrpy2Rn6pYLDRUVWsAmqF2Sem/ uaZoD7ah0QvCaOSHK8wj1wWZdcr2BY59s3toaw0d+s59ttxJNpNgz6zVh50v5214Y1vZ 34osN75y9qk7CK9f9Sc+cFxbOFnAfKLxiWWpWFHJnR3v5nSv9QQXOfTGKqH2IW+XL9BR gQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 37ubhqkur6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 12 Apr 2021 01:54:10 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 12 Apr 2021 01:54:08 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 12 Apr 2021 01:54:08 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 73DA83F703F; Mon, 12 Apr 2021 01:54:06 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , Abhinandan Gujjar , Jerin Jacob , Akhil Goyal , Anoob Joseph Date: Mon, 12 Apr 2021 14:23:39 +0530 Message-ID: <8d73cf4b565f5f66badaca26ec3a9f26cedf2304.1618217424.git.sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210409070809.456444-1-sthotton@marvell.com> References: <20210409070809.456444-1-sthotton@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: duTaJa1yel7Zy2Ohtv_n_fdzyGQNAQXd X-Proofpoint-GUID: duTaJa1yel7Zy2Ohtv_n_fdzyGQNAQXd X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-12_07:2021-04-12, 2021-04-12 signatures=0 Subject: [dpdk-dev] [PATCH v2] 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. In OP_FORWARD mode, software service is not required to enqueue events if OP_FORWARD capability is supported by the PMD. Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation") Signed-off-by: Shijith Thotton Acked-by: Abhinandan.gujjar@intel.com --- v2: - Reworded commit message. 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) &&