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 848B8A0579; Thu, 8 Apr 2021 14:15:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2202C40698; Thu, 8 Apr 2021 14:15:51 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 007AE40138 for ; Thu, 8 Apr 2021 14:15:49 +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 138CCeWF029702; Thu, 8 Apr 2021 05:15:49 -0700 Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam08lp2041.outbound.protection.outlook.com [104.47.73.41]) by mx0b-0016f401.pphosted.com with ESMTP id 37swewguad-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Apr 2021 05:15:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I2MzP2RFBNJPkULTw/SiAAJydGqStUMLP6UtOIusRQsuXciepiqAuzRzGr57w3ex3md9N928nHIdCoSqMe9gqXWBtOdEkfv5kmkHlpYTlz1Ccuyi7300X2JuwOaLwbzvtf0D/kimUieK9p8voa/cOdlk2rPbTu9KCySUcj0BWPpGruYVilC6kmh4hdr1mZQhad15pXsnypBATk+u5sP4QyqNOiD/S4nGE3mzpsq3kxtZiWqfaD+AUFJeC8eMuinzm1IwM2AlIYDTsG3ffbyRiTAH+G3hZhqb/hiQhLdhxXJj089pqZu3FamdYL3ciwi4fo7Ofv5DVJqcrChzoL+IAA== 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=ix66W7Y8AzxmK/gW+FwLs7jVLwdFNwYaltVHz+aPyb4=; b=Pcet3NLaSREcQa+T7GS1evLlBmjmG0nUfDeqz5q1l/vb9eoPANuUu/aWzNBrH6KSeqHGVydaJQ4UVwCL/eTrcLBm40VvcIpu8AJJqSPlaeht0hntBrSke6hw2Zh8WTCU9jZMBGX4ox08AI9lbGqUhXufoFgtW4UDnBV68ra0DSvmZrW6fkU4WeuVUF0manMzsU2KLMsdRvt1CzmjiobNjm9OIKZWCCNSacnb9L+RE7PHXVurhMxCsYv1OGyLJ2Z6IYJEHHd1OUlJicYStTa1iKuBWDMLJqr+cb/yUrOnC6X4tme+MfFnSKCNWs/tRYB+xiS4ymnXsos4mZwRRE9KPA== 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=ix66W7Y8AzxmK/gW+FwLs7jVLwdFNwYaltVHz+aPyb4=; b=nf0TlQKtsu+JTTj4Z0PlQGJPm6ii1VRdH/QgVH7l1B5av+qZFJ6ZpOOoYPgcSh0F9yN1ni/YXTF2w5BG4nN8G/dO/dFudDsYc1qdCvhLuDXgSloITxALkIByZcNvsaA7kYTXpWRNWT7FW7bduVASokVSBZ7NJl3KWFi5NqzGglo= Received: from MW2PR18MB2284.namprd18.prod.outlook.com (2603:10b6:907:10::16) by MW3PR18MB3498.namprd18.prod.outlook.com (2603:10b6:303:5f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Thu, 8 Apr 2021 12:15:46 +0000 Received: from MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f]) by MW2PR18MB2284.namprd18.prod.outlook.com ([fe80::3168:cb00:6607:743f%7]) with mapi id 15.20.3999.035; Thu, 8 Apr 2021 12:15:46 +0000 From: Akhil Goyal To: "Dybkowski, AdamX" , "dev@dpdk.org" , "Doherty, Declan" , "Kusztal, ArkadiuszX" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests Thread-Index: AdcgGdZT1LyyXAMxQtWE+7ZgU76dDgKM7OcwAB25ymAAattncA== Date: Thu, 8 Apr 2021 12:15:46 +0000 Message-ID: References: In-Reply-To: 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-originating-ip: [182.69.47.6] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b8dd560b-d623-4646-caec-08d8fa880a50 x-ms-traffictypediagnostic: MW3PR18MB3498: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bcRo/yfkIXeLA9bq14lgKwH+K2gCSczmarSjJunqlv4P6vQZQrOZ+DKkbtaC5aL2MP3EUUDrilZPwf1RvP8FKwE8RNSPbqhGNkdeaT4dIwAZKksK8Rrhp1O5Oky78ox8rZkAfjpHLpfgarztEFnzOr7AyfDpIX6jB6cCiEIWKeP6/oTTalXhGk5YjNF3RXdShZYmmyuNqFOT/0ZTAr4I4qtgAJYietmWI3UROKaR+LT2nzbduuJy+qOud+yn0FlZvaJhNBDbcFPFCurZ7LOQpLiz/VUh2z1i4osl7Rzu4ce8f2Y/VyP/t2hfoQFBTH+XOA/zCMMO7zQ0jPBredRqB9UnO4VTRGcs804EKVI/RLzxrPhBGSBA1VYNeFBK97SGzL2qIUpPpCovFLnxU/G513zLjpM5ZLxw/SOAKYTD+NxtXkh87GFAymsrdDFB3I98nkSYX80yJnsN6sxvvt0STEJ1l9p30BVPcq2bqUpV2DVG9kqgC/pymRtF8GR4EZMtXM6maGAaFXlt8A0yAVd4N8tGWPvzP1mm/ruSenrpaOucL5GfVpOIiqpLYsaZi0KZTDnvogZm36573iN6zjWdWIpkwhJOYk5EHb45oygpB3thuYEcfx55Gl3vsazM/RIkDvLlFHzmrVs45nxjaHNApDg1zvtGTfhC2hZOHcxnGpM= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR18MB2284.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(366004)(346002)(39860400002)(376002)(186003)(71200400001)(9686003)(86362001)(38100700001)(66946007)(66556008)(76116006)(2906002)(66446008)(8936002)(66476007)(110136005)(64756008)(52536014)(316002)(33656002)(8676002)(478600001)(5660300002)(83380400001)(6506007)(53546011)(26005)(55016002)(7696005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?WknoHcHgVaz1v574okn/ckPG2zPjYoZHvORZm2nQJzorRmSGeVbxu3/Jcues?= =?us-ascii?Q?DGigB+242/HXVeLLEScIHQky1PLkRY8tnLBmNGayoBaFM8iaK0MgkOWzJYJp?= =?us-ascii?Q?4ImlLJ02CaisKmZHVXcX71BK4Gaz0fhD6Jj0lS099lXILUvlCYpybg6AhjpU?= =?us-ascii?Q?JdxDB4dKnE/RlNBPshaF78sbSVrrysp1WqJrb5RyGEIXM4msafhZa2gSteSF?= =?us-ascii?Q?Jk3wtDlgc6whhWf+e5H0UX08cgdncM6LWDSEq9I8XoI6ofVHiQgNuFaZ+qKt?= =?us-ascii?Q?ClEBnYfwK+ZpaEPN5WQsdzfa93kYFOCSmvw9FXwgaFzdbwxvhuc6YzZKOizV?= =?us-ascii?Q?YShH8M0mfAWV5kxvxKe97DE9C+lFoe0WLXAAsYWm8dqbTFDAHPpuiGFA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AQWQb7HUsWfv3ki7xIB3ZB3tZe0Slcr0Tb7l/u+?= =?us-ascii?Q?AtM=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: marvell.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR18MB2284.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8dd560b-d623-4646-caec-08d8fa880a50 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2021 12:15:46.5260 (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: dVyeyJ7rBIAdUJw4mQwEVurdZI30SP1PMPRPvvyRkPzzOUYh8NCfBrxBz07n0UO4nLrAY7WsirnKTr3ktVExvA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR18MB3498 X-Proofpoint-ORIG-GUID: G62jJYbyXslrujuDuOF8N1X1YZrCm2Dt X-Proofpoint-GUID: G62jJYbyXslrujuDuOF8N1X1YZrCm2Dt X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-08_03:2021-04-08, 2021-04-08 signatures=0 Subject: Re: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests 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" > The pmd is initialized in the setup function. > This patch adds one extra step inside the teardown function: the call to = the > rte_cryptodev_close apart of the call to rte_cryptodev_stop function that > existed before. >=20 > I don't see any sense of calling the stop function inside the setup, in m= y > opinion it's much better to do it during the teardown. >=20 Sorry, I wanted to refer to testsuite_teardown() instead of ut_teardown(). The reason is that, vdevs are initialized in testsuite_setup and not ut_set= up. Hence corresponding reverse function should be in testsuite_teardown(). -akhil >=20 > > -----Original Message----- > > From: Akhil Goyal > > Sent: Monday, 5 April, 2021 20:59 > > To: Akhil Goyal ; Dybkowski, AdamX > > ; dev@dpdk.org; Doherty, Declan > > ; Kusztal, ArkadiuszX > > > > Subject: RE: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tes= ts > > > > Hi Adam/Arek, > > > > Could you please reply to the below query. > > > > > > This patch adds closing of the PMD after running the tests. > > > > > > > > Signed-off-by: Adam Dybkowski > > > > --- > > > > app/test/test_cryptodev.c | 6 +++++- > > > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c > > > > index f91debc16..ea965a64a 100644 > > > > --- a/app/test/test_cryptodev.c > > > > +++ b/app/test/test_cryptodev.c > > > > @@ -928,6 +928,7 @@ ut_teardown(void) > > > > struct crypto_testsuite_params *ts_params =3D &testsuite_params; > > > > struct crypto_unittest_params *ut_params =3D &unittest_params; > > > > struct rte_cryptodev_stats stats; > > > > + int res; > > > > > > > > /* free crypto session structure */ #ifdef RTE_LIB_SECURITY @@ > > > > -976,8 +977,11 @@ ut_teardown(void) > > > > > > > > rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats); > > > > > > > > - /* Stop the device */ > > > > + /* Stop and close the device */ > > > > rte_cryptodev_stop(ts_params->valid_devs[0]); > > > > + res =3D rte_cryptodev_close(ts_params->valid_devs[0]); > > > > + if (res) > > > > + RTE_LOG(ERR, USER1, "Crypto device close error %d\n", > > res); > > > > > > Shouldn't this be part of testsuite_setup() instead of ut_teardown()? > > > In cases of vdev, devices are initialized as part of testsuite_setup(= ). > > > > > > Should we also call rte_cryptodev_queue_pair_release from > > ut_teardown? > > > > > > Regards, > > > Akhil