From patchwork Tue Aug 22 13:16:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aakash Sasidharan X-Patchwork-Id: 130637 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 82435430D0; Tue, 22 Aug 2023 15:17:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A11840EE3; Tue, 22 Aug 2023 15:17:04 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id F1B2040041 for ; Tue, 22 Aug 2023 15:17:02 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37M8ZlIX016117; Tue, 22 Aug 2023 06:17:02 -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=aybvrMGasenvKWHNT8FSuXn18JP0v4IeTrpbkuqxdwc=; b=cS13GN3ydjQc8yvynrChX6iLKSfZdx1V+Gv71fwdoYnMLMOeGjfCTaI4ci8QOLCRIBdK qjBCEQliz6g2GGQOqjSvaC+UZtzJhirGj1P/BCr/6XhZN0MUTfd2BWyR37QsIRH5Vx+n 3whs1HjBRfT79J/6fFrqoqXCDZhRV23m8uFZ1Y2qogN3QDCjZIAhXbYjGPG4RXccn8fd 7l8s8s/1bb7B6V/5GgLd2O8q8XL7eqh4wv6MlllhBN84UhuBBFdQLE1W+Zp0cd7Cl6XZ JP5TtNHBMEUpG53j80k/yCMCLOpW5le1KH2hxSF8+R9pBTz7zkHkgQf3G/p/dDGe2/up VA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3smdthatpx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 22 Aug 2023 06:17:01 -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.48; Tue, 22 Aug 2023 06:16:59 -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.48 via Frontend Transport; Tue, 22 Aug 2023 06:16:59 -0700 Received: from localhost.localdomain (unknown [10.28.36.177]) by maili.marvell.com (Postfix) with ESMTP id CB4603F70AC; Tue, 22 Aug 2023 06:16:56 -0700 (PDT) From: Aakash Sasidharan To: Abhinandan Gujjar , Akhil Goyal CC: , , , , Subject: [PATCH 3/3] test/event_crypto_adapter: fix crypto null dev creation Date: Tue, 22 Aug 2023 18:46:49 +0530 Message-ID: <20230822131649.3509986-3-asasidharan@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230822131649.3509986-1-asasidharan@marvell.com> References: <20230822131649.3509986-1-asasidharan@marvell.com> MIME-Version: 1.0 X-Proofpoint-GUID: j8EkDTsRoM5oRMofWACO_9oYl8qYlk7N X-Proofpoint-ORIG-GUID: j8EkDTsRoM5oRMofWACO_9oYl8qYlk7N X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-22_13,2023-08-22_01,2023-05-22_02 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 Create crypto null device only if no other crypto devices were found. Fixes: 3c2c535ecfc0 ("test: add event crypto adapter auto-test") Cc: abhinandan.gujjar@intel.com Signed-off-by: Aakash Sasidharan Acked-by: Anoob Joseph Acked-by: Abhinandan Gujjar --- app/test/test_event_crypto_adapter.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c index 00b20fa443..0c56744ba0 100644 --- a/app/test/test_event_crypto_adapter.c +++ b/app/test/test_event_crypto_adapter.c @@ -1072,11 +1072,10 @@ configure_cryptodev(void) return TEST_FAILED; } - /* Create a NULL crypto device */ - nb_devs = rte_cryptodev_device_count_by_driver( - rte_cryptodev_driver_id_get( - RTE_STR(CRYPTODEV_NAME_NULL_PMD))); + + nb_devs = rte_cryptodev_count(); if (!nb_devs) { + /* Create a NULL crypto device */ ret = rte_vdev_init( RTE_STR(CRYPTODEV_NAME_NULL_PMD), NULL);