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 8581EA0579; Fri, 9 Apr 2021 10:56:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6AC48141416; Fri, 9 Apr 2021 10:56:57 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 7802B141411 for ; Fri, 9 Apr 2021 10:56:55 +0200 (CEST) IronPort-SDR: RxLRbFhZSVK205atV7sM7a2efOxadKg8N7cg1tkhvT7ky4fS6CiZyiEpVo0jn1t1ISAiZ3qDAs auBoq8t2AxSQ== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="181255345" X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="181255345" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 01:56:54 -0700 IronPort-SDR: d06Q17AH4/+v+QjrljzAo8KTXI/XCZ5M535drqjEXEH+ee1H9PSepPwW1M2yw6j0glpgjU4yRI fpoWpzHImTzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="613655281" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga005.fm.intel.com with ESMTP; 09 Apr 2021 01:56:54 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 9 Apr 2021 01:56:53 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 9 Apr 2021 01:56:53 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Fri, 9 Apr 2021 01:56:53 -0700 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.54) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Fri, 9 Apr 2021 01:56:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JTfZ1xfOdm756ra7+ShsGTeJQvggLoMczsYaEW5VwF6AcZPJHBQB+P9mKXSqh6pm3I0eOq1/Qdfk4jZ7Y3H/dXz/w3fYk0MjQ22A63hyBfsvtIgBRVlDRTe+JA7vmBbbmLqglLK/gCVd+KXCMHUDZLrPZ/qm2OGG1XGGRafInoBds1NtXd0wJf6pVfBqd/Y2d0S00CzqWTw+LsjSxDyAlQ2IJkh6w2JKRdUMjO3FJ7pDohEkcCyjpoxKGOsk0ZQ8bVkxB/5xZYkOkraBfIbecEKowqPMF2SLXOOQP3CByHzOCfxQRer8b0KVY7E8KSIOndzJHcAzcbNoYdJjOdv6MA== 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=PwFPS6hcIcS9M714RpDjxyvOZaMROBghB8PH7MQXfUs=; b=MD/ClBY5HMO9wCZt5noV8IJ4wQXiUOMLiMO41BvDQkAHRAQFwPqYvSMs2z7QJ1bLeGOKHKeWlDJeZAFj0PZi2FbuJb7tSSAo4TlZYhtIcFpg2fMJcHUhhnCQaYGaRa1+oxvK1ylNw9Tr2UAH35TRhh3X4KQJDkw+fsLTG2O9d5hNldgJItQT54FmVEstMTlSk627p/DzFIcfu9j0I545QLXnzwj8zFPKwMzofBt4vo97WljRyk9fm9aTGZqxXmbwTOo+f3PxZ8XE/Dz9Z56/anHoYbvskue7jEcHOsCjUqJT+yAEAjWdu6lhjXKOEl7I6kOvUHAw+u7GLfp+UWd+iA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PwFPS6hcIcS9M714RpDjxyvOZaMROBghB8PH7MQXfUs=; b=I5R35aodoJuUjnOXepJurXJ0WfljTexEE4WG5cGTX+SMpD/PQM83RnPN1ud6WDQMdFtlgFXNVCW7VAXqDyKL5VOitK/uY0SxyCQb2D+mnSeH/9HwOfVwt+rx25kaGvtv6VSCgZeGXJZP0AvVxEUpfDfHFMq3eAgmNFZXoBX5HG4= Received: from SN6PR11MB2575.namprd11.prod.outlook.com (2603:10b6:805:57::20) by SA2PR11MB5161.namprd11.prod.outlook.com (2603:10b6:806:fa::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.21; Fri, 9 Apr 2021 08:56:50 +0000 Received: from SN6PR11MB2575.namprd11.prod.outlook.com ([fe80::450e:b087:eeaa:2b8f]) by SN6PR11MB2575.namprd11.prod.outlook.com ([fe80::450e:b087:eeaa:2b8f%5]) with mapi id 15.20.3999.034; Fri, 9 Apr 2021 08:56:50 +0000 From: "Dybkowski, AdamX" To: Akhil Goyal , "dev@dpdk.org" , "Doherty, Declan" , "Kusztal, ArkadiuszX" Thread-Topic: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests Thread-Index: AdcgGdZT1LyyXAMxQtWE+7ZgU76dDgKM7OcwAB25ymAAattncAArjV2w Date: Fri, 9 Apr 2021 08:56:50 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.0.76 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.151.56] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: dcb793db-dc78-4155-4ac7-08d8fb356a2c x-ms-traffictypediagnostic: SA2PR11MB5161: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aW84jIaBn7Dyzuhmjw8gjzPBBrEQoP9FF0rdfOYZvIWJXg5r4FArPBHwhVC18J1FQ42th93jVOyoZ+PeANI0LMp8xTj2/YvEIF9JND7z43Z8tuwBMPdmYiNAihjcFCtW/F4LHs1DflrYWyptbYhgagI/6IY+NbCRIhwG6so7N+toeET6Um/Iv8vCzWXTmofF7oROpa5XjBQv36dAjkFnZfC1T8cioWPa9q9GL9weEIfjM/C14t7zBhI2PKu4CcuGYR5xi4nZDUh7CFY1j/FiZ0CEJcMfnv9tEVx83GEB5n0K9aW23AQU3mFcsEOH09PUs7QCjwWknHueSWNl5Df861aZ1lLMmsPDMnxaMupt9P1dqZSoqaTqgiSBY3eE5AVVQsOhEEZ+0ggqWPi7FMbGLES2peQBz+3ZYiEM3RDRvh+WuSsOecIYpwKV6V3sLWhffaDcc/FD3OljmXzP26SBOgqYPBLvCD7NusWDB3uOnAh1X8myStGT1Pej5YxomE9Mr2TtO/bHuL3qrgYatTjM2GSvZl5mzZVrdbZGE06bTh1c6IINFrMcpenZxyofZwsgk5rA59c7AG0dIwUvJ4AiB0t/2E3ODnsbAGJ7A5V3Oa5WHY5D00OPR7qblmcUtapZ5oI5HzqSO80sg8JBNoPZAIk0r0DkEUoclSj6BSrpeiw= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2575.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(366004)(376002)(39860400002)(346002)(136003)(2906002)(26005)(38100700001)(7696005)(55016002)(53546011)(9686003)(186003)(6506007)(71200400001)(66946007)(33656002)(76116006)(110136005)(6636002)(8936002)(316002)(478600001)(8676002)(83380400001)(52536014)(66556008)(66476007)(66446008)(64756008)(5660300002)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?6RgsXb0UMJ8s1rPRRHBKT0EtpF546VAEL1TLFWJskrjAHFV5xC+3S1kzahAo?= =?us-ascii?Q?OLcXy8ACLQJbxvxLSoU50H6QTkY7c3+h2SZs0jSauV9McD2afBKm9XhgllmI?= =?us-ascii?Q?Sk9o+c/pO7YGmXZKj8TZeF35GZkUV3Gn6G67xWQlBI3vTa8qTLaobFyD0/Su?= =?us-ascii?Q?iZtOR+tW5BdRe1GannbaWMjWHAaL1jQ0elltlS4xslNuFCx06Ql4I8QW/6ep?= =?us-ascii?Q?1f0VHAB0MG+YWGIeJqv01spGUQYf6bTN4LoCDbJ0StnMAOtKI6t8vQlo3IQp?= =?us-ascii?Q?45oCniKB5D9N/HzFqSA07A7Zzg/JiYTKi+MOzVasITs28HmEUYLhE9W+6gY1?= =?us-ascii?Q?8/KSEKlqgP9f0rVAvA2EmCPvHLDQSPoZz6EX9lgcwpnL9M7umjy28NiFiw1u?= =?us-ascii?Q?4WncG31rBFQkojMPF5nf57sQecCjOrTHd02AyCo2fschToAKntVlVDfCe2mK?= =?us-ascii?Q?zhFaEB0abITiS3PqvFiyU295lBJWNaIjHwp/maKTOQmRdItpDTiytzWZcF6t?= =?us-ascii?Q?8IPCqT56/t2HC3aFVid7c16QZXzkFQH+VpDhOHccYCk7lDwnmYwZZN4XpZPH?= =?us-ascii?Q?e6x81zsTNds7nuBaS2oExL/RFGN6RizVF8iu4CekjdmnZXTdFiWutcFo2e3Z?= =?us-ascii?Q?piK+4vxw6CdhKZVEPdoIbWBgO1lOmWGdJRPmo1MvCp2RmraMzwSGzl74Cd7F?= =?us-ascii?Q?qVK4mBFQs436fxAoUD3L7qxEK7JKTktxc9bVbhlqCy8hN8HY3NQ5bcrYC7/T?= =?us-ascii?Q?BsjTuurWxLoTCPs9dZwFymnfSW+hB/bJPBk/hvg7f+BSfiOAbybghw4pGzSl?= =?us-ascii?Q?sgQ1Z/91eOYwbHbSYly6OQ2BBKWWNOl/3Axum/H6Ktqsrgkb/clXWRMVLuQN?= =?us-ascii?Q?6JfGmb5+KsC/Gdfi2sbOLkJ9S1RCd3VhsWUJziwOTMdyTU5NtkP9VKVg8Nz2?= =?us-ascii?Q?dpm99pr3s0hHJg51YWmSbi22qxF29h0Q4rp7n8ViDPp5RZZ50IgsVY2PTGWe?= =?us-ascii?Q?Gt8yrgWj1DF1uxoyCmpo/xxqBNEEToHKV91aUAg6La7+w0Y5d4g0hueyg9zj?= =?us-ascii?Q?OQ/BnnLBVGLB2LWoukyEggPqMxXatKYcdvTh+As8aVGlkRgaw/bsQRXVsUNP?= =?us-ascii?Q?IrZ/+OiZmLbIGWISkCEVMXxPwo8V5bVhhcILVAuqEgp6jo+Y3aGpassJ2feL?= =?us-ascii?Q?4r4qwuUwg5qD12q+NyFbrBc4mGPDIP8TcFTuv0L4rnkpew1DujZuP+lBn5Yh?= =?us-ascii?Q?8bFMR+/n4Gk6PNm+TM6UDQB/elISGxcUlVWCrlOLrIj4lY/iOcD7L8vzgkYM?= =?us-ascii?Q?baznatK2vzzVf6C4B8g8zjLc?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2575.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dcb793db-dc78-4155-4ac7-08d8fb356a2c X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2021 08:56:50.5331 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: hmZB4Vsg0ZJHpyWdBltA4hpVoz4v3hPrcmIcHq03A5vE1Gp6+rVegTGz/Ny/0dPghQ1sGoHJEkhxkPVDEodC6KBIY3mdy+2ohE43gbqI3Po= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB5161 X-OriginatorOrg: intel.com 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" Thanks for spotting this. I'll move the call to rte_cryptodev_close into the function testsuite_teard= own and send v3. Adam > -----Original Message----- > From: Akhil Goyal > Sent: Thursday, 8 April, 2021 14:16 > To: Dybkowski, AdamX ; dev@dpdk.org; > Doherty, Declan ; Kusztal, ArkadiuszX > > Subject: RE: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests >=20 > > 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. > > > > I don't see any sense of calling the stop function inside the setup, > > in my 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_s= etup. > Hence corresponding reverse function should be in testsuite_teardown(). >=20 > -akhil > > > > > -----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 > > > tests > > > > > > 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_setu= p(). > > > > > > > > Should we also call rte_cryptodev_queue_pair_release from > > > ut_teardown? > > > > > > > > Regards, > > > > Akhil