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 B733DA034F; Wed, 11 Aug 2021 08:56:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A6A940042; Wed, 11 Aug 2021 08:56:57 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2060.outbound.protection.outlook.com [40.107.244.60]) by mails.dpdk.org (Postfix) with ESMTP id A268A40040 for ; Wed, 11 Aug 2021 08:56:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G6Skx++7+mubMmj/W0LniRCfdI+y9QHog3kD1wyIqRkVUm/KkRj4UE80oC+PeiXuTfnMFLrDDGHTgMOwe06bWx9t9JhH3ESjShznzmuF0hC1msBe6O3ZIPhPijQryRQDP4kfpy7HEVQSUD5F3HrF0gsRV/rM8JIv4CfqGnrYXuPke/uovsLnglTFoCdzlgsBS0pOADNHB9D5DEruc/7y0rcDHDiI1S5p1QpBxzGp2FeyrrcNReptWPpr6jQiCDPS74Z9vDacluDWnfO5OZWDK0O0po7LDcovkSN0YmP7jFmg7s82Ofqo6nfLZzbunaEKocggqNDboocd9+BFw6Wq2w== 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=HFD1rZYDD0SW8hkICwk55udGYVmav1Sy2pER+5QZ2N8=; b=PSeuMHmhlWgYzfW1Fm2eHrODoU7YdhlJgnjzIO+0qFZYJvQT5gFnlTKA+q2CKXLql3aaq0opbOHTJF//Z03S7JRRNXGMTV9oMTnec/puPTKfXNsKZ/lD/MMHhYtgyhNbyhMbKm5kfUT51wQRGgxW29MI1OKld0SyhKTA30dzQoYkFC3yvWS/XEjVFSsWxmpGYj2STE7yH7YzWb8EmxsBtRuwm+/iALz2NYPhAgqCglF0R5inMhartb3vXC/uABcpbfFCRoI11W0i72Sn1c7wOzyXw2U3Ak9GDYKvNUOGBfXhSVAZVKbfHpd+YJ6lzdue6MflcLLEUnQG4+EKZyetAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HFD1rZYDD0SW8hkICwk55udGYVmav1Sy2pER+5QZ2N8=; b=GSqc6OGXiMxRjWL+MU575fTNrdq5z9MEojkKauwzBZANKwbTBi/9LHF+FJ4dce292+l1z9H7MBCAhyuvMZdQcqKO8VXcSDYP2SQZS+cdAm34gbvp/emdyv7nGlHy0ExbmlBSOd0YYI3CdSJtBdZKJZFy2mGSfAKBlwM4sqGkT5lQ6uoDDGdvPiQo9q4WR2FPEjAYR3PdFrTiGc8UIjfu5F4wyHiKyXD0EmB9hSqDfIFmHzOrLG6AHiLYfRkLkHromdBRzq4iIsVKICZ3g6qvMC662X6xVhy2tjhe6VlyzyiB7ljdLum7om3Dje72aw/xDwqaaUEUBCNwyhQfxaP4Fw== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM6PR12MB5536.namprd12.prod.outlook.com (2603:10b6:5:1ba::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Wed, 11 Aug 2021 06:56:54 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::6823:63cc:f7d6:dd00%9]) with mapi id 15.20.4394.023; Wed, 11 Aug 2021 06:56:54 +0000 From: Matan Azrad To: Akhil Goyal , "dev@dpdk.org" CC: "anoobj@marvell.com" , "radu.nicolau@intel.com" , "declan.doherty@intel.com" , "hemant.agrawal@nxp.com" , "konstantin.ananyev@intel.com" , NBU-Contact-Thomas Monjalon , "roy.fan.zhang@intel.com" , "asomalap@amd.com" , "ruifeng.wang@arm.com" , "ajit.khaparde@broadcom.com" , "pablo.de.lara.guarch@intel.com" , "fiona.trahe@intel.com" , "adwivedi@marvell.com" , "michaelsh@marvell.com" , "rnagadheeraj@marvell.com" , "jianjay.zhou@huawei.com" Thread-Topic: [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs Thread-Index: AQHXjiEQndclj5Pxck2AEQBPKRjZC6tt30wQ Date: Wed, 11 Aug 2021 06:56:54 +0000 Message-ID: References: <20210805200236.1180289-1-gakhil@marvell.com> <20210810195020.1423013-1-gakhil@marvell.com> <20210810195020.1423013-4-gakhil@marvell.com> In-Reply-To: <20210810195020.1423013-4-gakhil@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ee493812-319e-434c-cf20-08d95c9533f5 x-ms-traffictypediagnostic: DM6PR12MB5536: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2449; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XL8YY8BYvA7986cq/PKQSnce8zPfQe/g2wSZ03dNQ9yiWt3cUBsNpnHxEmV3BY/xdwGoqZy7QVAvie0tvFyhtQgJRYxqXFUy4vUUDFzl82urhjJV+M/viJYm6yvy6TdXTo4owNF6ZD3mMoFfihv/+GmBins0MSio97ucUFA479dWUCwYhyiBlHSM5+y43xKunGkOkdL7vX2gQuOWQKJcQAaCW+p0sUZ0wOINbAVQDEKWfpgkcrhUMjFGz2VgtqM2U1jkI53LmKznR5BZpPVv/gwkPaFqfJJYGGxvVFPn5paZF1LET32L5Zgeg2T+K7Ld4bS0cNKAwLBGBqnXOTkBa418lJ8CAAiou8AGB8RpjsyS95PoVWklNfdawcaBE6cInsVBBcOLuAEj71J06Mq/wFOHfVuyVUzkPmBa7nMsqO5kMfOxhlAw74iHXXyT/aSocqSq2YfCfT92HKHRILyTbWioKz7h7xveuEa9YoThjyI6Oq9gdkh4i3LbO4ZvBzJZwPgsPiFolAbGMZ5GpwMqn8r4CfSfjXvk0m4Uxl0Qo4Ra4N17AMf4nuwOwDdA9FQ0KesfUsIXAprmG04Yxp119qrmIEKtpTXjvcjTyaAnNkpN3vr1cY3PJv8xW3FhFdu0GXhXzU66CaGY2v/sIoGZtkS8+U6mJe8ohsvPehwTnmLJ3WU3RAEAFloTiNhn20e4HQ0TuLmPebQ5YLQOKoTLMQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(366004)(346002)(39860400002)(376002)(136003)(26005)(66446008)(55016002)(76116006)(66476007)(66946007)(66556008)(8676002)(33656002)(2906002)(64756008)(478600001)(86362001)(186003)(5660300002)(7416002)(54906003)(6506007)(110136005)(7696005)(38100700002)(52536014)(8936002)(122000001)(83380400001)(9686003)(4326008)(316002)(38070700005)(71200400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?IQi3X2VBDkSnT36lvrWPabpQ8mSGEcYyt3im+LgEZ3/06mI120dEGvJgvniW?= =?us-ascii?Q?O3nlgDu4IkXuWic2SQIRtlF3oVa1NSx+Px3s4O60YK/0vXjATJmshowmqRrx?= =?us-ascii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yYksDvnZD056dq0UuwucOznYU/yI+Wb+?= =?us-ascii?Q?4Wn45FbGc6jF5LtKHuMPzQAoA6HZwfLg+k/nRpBcvtv2UYHL9hmWhIT7zBqV?= =?us-ascii?Q?UjtS6TZtO35knOG0OV07BA/d7uGU3kOeVNCzlJtv/Br3QykQ04bn4kSyx/k1?= =?us-ascii?Q?trpM3lLttjsjKGvqPoRdqZY2sq5GD9/vYf6/nNsZeTSWQd4D290JD4QPgV4g?= =?us-ascii?Q?eVo87xhUq1YK+Y+klhwU0FOdOPxE3Obo6sAsPiQjghlRVpefdn3Va+/Up/GP?= =?us-ascii?Q?Hx/LCf5bjPS2SOqxXqW4LuqVh1egUTg1hzfrIuxlyFIKUXcFfiYXY3ZRVWpw?= =?us-ascii?Q?nPA=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee493812-319e-434c-cf20-08d95c9533f5 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2021 06:56:54.0190 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SfYs5Q29SMIweRIpXFUi4458Zvs0NIk31uevIgKQ9my3dHDmt9orRIDySmEIuxs2ndoj9A4lLPmC/19SJXyK+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB5536 Subject: Re: [dpdk-dev] [PATCH v2 3/4] examples/fips_validation: remove illegal usage of APIs 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" From: Akhil Goyal > Some of the cryptodev APIs are not allowed to be used by application > directly. Hence removing the usage of 1. queue_pair_release: it is not > required, as configure > of queue pair release the previous queue pairs and the > dev is not directly exposed to application, hence cannot > use its ops from app. > 2. rte_cryptodev_stop: it can be used directly without > checking if the device is started or not. > 3. rte_cryptodev_pmd_destroy: application should use > rte_cryptodev_close instead. >=20 > Signed-off-by: Akhil Goyal Look's like it should be backported to stable releases with a Fixes referen= ce. What do you think? Besides, Acked-by: Matan Azrad > --- > examples/fips_validation/fips_dev_self_test.c | 19 ++----------------- > examples/fips_validation/main.c | 7 ++----- > 2 files changed, 4 insertions(+), 22 deletions(-) >=20 > diff --git a/examples/fips_validation/fips_dev_self_test.c > b/examples/fips_validation/fips_dev_self_test.c > index 17e85973c0..b4eab05a98 100644 > --- a/examples/fips_validation/fips_dev_self_test.c > +++ b/examples/fips_validation/fips_dev_self_test.c > @@ -3,7 +3,7 @@ > */ >=20 > #include > -#include > +#include >=20 > #include "fips_dev_self_test.h" >=20 > @@ -1523,12 +1523,6 @@ static void > fips_dev_auto_test_uninit(uint8_t dev_id, > struct fips_dev_auto_test_env *env) { > - struct rte_cryptodev *dev =3D rte_cryptodev_pmd_get_dev(dev_id); > - uint32_t i; > - > - if (!dev) > - return; > - > if (env->mbuf) > rte_pktmbuf_free(env->mbuf); > if (env->op) > @@ -1542,16 +1536,7 @@ fips_dev_auto_test_uninit(uint8_t dev_id, > if (env->sess_priv_pool) > rte_mempool_free(env->sess_priv_pool); >=20 > - if (dev->data->dev_started) > - rte_cryptodev_stop(dev_id); > - > - if (dev->data->nb_queue_pairs) { > - for (i =3D 0; i < dev->data->nb_queue_pairs; i++) > - (*dev->dev_ops->queue_pair_release)(dev, i); > - dev->data->nb_queue_pairs =3D 0; > - rte_free(dev->data->queue_pairs); > - dev->data->queue_pairs =3D NULL; > - } > + rte_cryptodev_stop(dev_id); > } >=20 > static int > diff --git a/examples/fips_validation/main.c > b/examples/fips_validation/main.c index e892078f0e..a8daad1f48 100644 > --- a/examples/fips_validation/main.c > +++ b/examples/fips_validation/main.c > @@ -7,7 +7,7 @@ > #include >=20 > #include > -#include > +#include > #include > #include > #include > @@ -73,10 +73,7 @@ cryptodev_fips_validate_app_int(void) > if (env.self_test) { > ret =3D fips_dev_self_test(env.dev_id, env.broken_test_co= nfig); > if (ret < 0) { > - struct rte_cryptodev *cryptodev =3D > - rte_cryptodev_pmd_get_dev(env.dev= _id); > - > - rte_cryptodev_pmd_destroy(cryptodev); > + rte_cryptodev_close(env.dev_id); >=20 > return ret; > } > -- > 2.25.1