From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B6D9A034F; Mon, 19 Jul 2021 17:25:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E39464014E; Mon, 19 Jul 2021 17:25:24 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id AF4494003E for ; Mon, 19 Jul 2021 17:25:23 +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 16JF9ngn009832; Mon, 19 Jul 2021 08:25:22 -0700 Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2170.outbound.protection.outlook.com [104.47.55.170]) by mx0a-0016f401.pphosted.com with ESMTP id 39wa688fjg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 19 Jul 2021 08:25:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NL75BlhWLtCz6mgwLq8n/e3Juw2qtpG6EBMKqZzrCMs3Z17GFlD6FH9FMpS/no7hJ8iRk8u5oW8icQ3MxNl73aWF1loM1Za+Fu7rCbGXKFn7TRW3qNJSBBCh7crFK+L9FqugVKfl/Oj48Y5fJGLz8vY8djsP6dT1e778DF8oC8vPSXuwjNkUensccjf9/KcektD4mABrcfNSTymmbyVHBHi/tt/YHdxpLr8eWdWBWw2BJffkaqWw7XUv0cuR3nckXWGJclJsBCQBt3DAVMGmImatQoTSB6Ziso+bpBLRoEOrGI8uxeW4c2AveUe3/BrjcOPcR3PJDq3qO4ftL1XisQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QkojmhNfIaAYPzxT2dI/HoyqxkM2gGemMhAm9hkB1Ec=; b=LdGNVGX5GxsAcL7dO7pLRuFeJgDF0SnUkYtURhJOVOhF4ratIxHnmLjh4f/Zt7QWTq9lhk/VZpCNfsPPtGqXKZkFUr8WF5+3Qx9v/RRuOHzTuCJpyYZVsGEHV/M/rhXY3uyhHr7VAf1r4KIpU1P7nKE1QXtz8jMiVQ9CuYVC1tdXbTcZHWxWvkMV4WRd6Mn8D9OC9tElBu97Z32Nh3OQeUcWYspx7/m2PxhXGaCNChOg9ClQu8SPfQq2+bpRZe9K8ZHyiU7fVd94DejwIWDcqkYYLCEfcas6mTnqvhFlqO/KAtHc+ub+BoT8cZe26EHiCKyZwcASTKYfc5+NTIcLtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QkojmhNfIaAYPzxT2dI/HoyqxkM2gGemMhAm9hkB1Ec=; b=CuvJ0uzyGk2aQhdvNfeJUNNKlEgudtyub5OaBy50fs96fAPgNiXYK13ySkxFcu0HUr9KfdzsAQyyRCXpH2U/74woRtXQ76OLfn2l56rdU+cZu46xZiAQcvoECnBhOJKLslobGDexDf6ei84U99Z0zeEvemLgrJBx+AtAIflGGJk= Received: from CO6PR18MB4484.namprd18.prod.outlook.com (2603:10b6:5:359::9) by CO1PR18MB4731.namprd18.prod.outlook.com (2603:10b6:303:ea::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.21; Mon, 19 Jul 2021 15:25:20 +0000 Received: from CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557]) by CO6PR18MB4484.namprd18.prod.outlook.com ([fe80::1455:9a67:a6e7:e557%6]) with mapi id 15.20.4331.033; Mon, 19 Jul 2021 15:25:20 +0000 From: Akhil Goyal To: Adam Dybkowski , "dev@dpdk.org" , "roy.fan.zhang@intel.com" Thread-Topic: [EXT] [PATCH v3] test/crypto: check if RAW API is supported Thread-Index: AQHXfJrDWJwU5LsUAUeG07H5GMAml6tKafFQ Date: Mon, 19 Jul 2021 15:25:20 +0000 Message-ID: References: <20210719123718.15960-1-adamx.dybkowski@intel.com> In-Reply-To: <20210719123718.15960-1-adamx.dybkowski@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=marvell.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e50aa041-3130-4a78-8de7-08d94ac96be2 x-ms-traffictypediagnostic: CO1PR18MB4731: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PPZGBZI3HQVANHJtjo9Dx4Y6SwrCn40p7ksQdaGgqIVlEE5aVgADYJjhSNOavmioiy/urMnf5+i1DODhV7xJc9Ro3AFtewZ4gk97JThJgrZoYbvTBm4HXZZui2Q+gdMuhWnSeFegRZZqrEydKUr0GXOUBiKgKNK0Y6wrHcRcE6up/+ti/vIopXghCrRI9SeNsTbLH01Ij9ScI4ta629JtrkZzEVqNfmSnZ42vcWbRS3XKZO16hJTx34fUHwm9RtdJqbANfyMZYf45eQkgPGlNeNccVe8hCRkHNtg9XQD/8iSSjB9nasaslYJEp9tzDc2AvcL2ljfVu9QsFgti2pDjP/pRozog9bJ75MZz2QJS3N3FXptHc0df+ZXA4Ez4X2EI9hA7wHA6hgeNtkddXoWMeekZPMur9DpJkolcmhePNdcH46Hjy1uegTxGbPLI4tMhuAUPp2WTFGQTbIJNqZZBT9t8dImleMunnGt3DwCs4DYN7QnkmtCF78AJI19HGf1r826WvVUs2NSX5CY4El+m4a+nVdkK6EwnMCPiVSjOcOUaqHNbss3hVzBwxwJ//ZvwCKBFa4OVvoInow6aJade/pD8oGgmpF7WNVE6Q5lrvC0/slzBDPVVeOUyHhObNTuMYrEJdFe/9Np6CbOCxhjVahAMsaq0hcxvVAaeF/taWgJCPOOUgaSuxDrTSR5v6s/F3Nc05dTVqAC0rPwbjCMWg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR18MB4484.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(136003)(396003)(366004)(39860400002)(52536014)(76116006)(83380400001)(110136005)(66476007)(66556008)(66946007)(316002)(64756008)(66446008)(5660300002)(478600001)(8936002)(55236004)(26005)(8676002)(7696005)(86362001)(6506007)(2906002)(33656002)(122000001)(55016002)(71200400001)(38100700002)(9686003)(186003)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3A2x+FWCy/AMximaeWu7MBfr/Gl37xq4ecEXxAE+iqGsT0ldmbgPy0yH+uWw?= =?us-ascii?Q?IYr7F2XhqA1ulAlFMPjVjHcvoefkoVLU/X0qDIeP/d42Jp003Z/83ieI2d3M?= =?us-ascii?Q?6aqjdduCDyTsGA0RWfsmzUgiDzfDzsDsk/squOZirQvrqGHG2M8Txbmonx7p?= =?us-ascii?Q?t8hP86kTiRx0Pru1lR2C1WwZsGGPuiLbWc9n5DxUgKYXXCPFb8p//HYgx8zg?= =?us-ascii?Q?EHhdOKI46ojYUpowCHwlhBae+RbtH81xUD5qhLzemmKAbSRbyG3ZZ/kxQa5F?= =?us-ascii?Q?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ZqkUQtMECkw?= =?us-ascii?Q?rSXmRO1m39hUak9ulFNN/QsiCmPP2h1hOprpWtz38KVjKPr/htW/DjnsugaH?= =?us-ascii?Q?x+AHP7sKt91CvCboDCbhMhTGKcu+r3QW8tl6n93YEYsJrfmKAKHt33z9re8a?= =?us-ascii?Q?0U0cmFxdrCuLyX3wc+fxOJYD?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO6PR18MB4484.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e50aa041-3130-4a78-8de7-08d94ac96be2 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2021 15:25:20.8039 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: JWEAjzoo3wXKvWrlv5IGuf3GRJcpGqm8Fo11sDstOTOV72HKsTThXeAfrJaajeKmeDfWiRLf7ZgjOD7rvhvbrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR18MB4731 X-Proofpoint-GUID: kD6G92R4iUcaqXhY54jL1SHMtNhIOfzX X-Proofpoint-ORIG-GUID: kD6G92R4iUcaqXhY54jL1SHMtNhIOfzX X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-19_05:2021-07-19, 2021-07-19 signatures=0 Subject: Re: [dpdk-dev] [EXT] [PATCH v3] test/crypto: check if RAW API is supported 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" > This patch adds checking if RAW API is supported at the start > of the test command "cryptodev_qat_raw_api_autotest". >=20 > Signed-off-by: Adam Dybkowski > Acked-by: Fan Zhang > --- > app/test/test_cryptodev.c | 34 +++++++++++++++++++++++++++++++++- > 1 file changed, 33 insertions(+), 1 deletion(-) >=20 > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c > index 31201d93e1..43c05ed3d8 100644 > --- a/app/test/test_cryptodev.c > +++ b/app/test/test_cryptodev.c > @@ -14766,7 +14766,39 @@ test_cryptodev_bcmfs(void) > static int > test_cryptodev_qat_raw_api(void) > { > - int ret; > + static const char *pmd_name =3D > RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD); > + struct rte_cryptodev_info dev_info; > + uint8_t i, nb_devs, found =3D 0; > + int driver_id, ret; > + > + driver_id =3D rte_cryptodev_driver_id_get(pmd_name); > + if (driver_id =3D=3D -1) { > + RTE_LOG(WARNING, USER1, "%s PMD must be loaded.\n", > pmd_name); > + return TEST_SKIPPED; > + } > + > + nb_devs =3D rte_cryptodev_count(); > + if (nb_devs < 1) { > + RTE_LOG(WARNING, USER1, "No crypto devices found?\n"); > + return TEST_SKIPPED; > + } > + > + for (i =3D 0; i < nb_devs; i++) { > + rte_cryptodev_info_get(i, &dev_info); > + if (dev_info.driver_id =3D=3D driver_id) { > + if (!(dev_info.feature_flags & > + RTE_CRYPTODEV_FF_SYM_RAW_DP)) > { > + RTE_LOG(INFO, USER1, "RAW API not > supported\n"); > + return TEST_SKIPPED; > + } > + found =3D 1; > + break; > + } > + } > + if (!found) { > + RTE_LOG(INFO, USER1, "RAW API not supported\n"); > + return TEST_SKIPPED; > + } >=20 Can we make it a generic function which may be used by other PMDs as well to check if feature flag is set or not. You can call the function from test_cryptodev_qat_raw_api(). The function can take pmd_name as input similar to run_cryptodev_testsuite. > global_api_test_type =3D CRYPTODEV_RAW_API_TEST; > ret =3D > run_cryptodev_testsuite(RTE_STR(CRYPTODEV_NAME_QAT_SYM_PMD)); > -- > 2.25.1