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 5F7E6A0561; Mon, 8 Mar 2021 13:57:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4679122A377; Mon, 8 Mar 2021 13:57:23 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 620C222A388 for ; Mon, 8 Mar 2021 13:57:21 +0100 (CET) IronPort-SDR: /2Ujeyd1LU3cX7mQAv5UDTK6sPD8GYC2TrHRRgUvtu5xI5NbI1z5/qKd36YEJKLKa/0L4Y3+Rb tTWMlvOVGAhA== X-IronPort-AV: E=McAfee;i="6000,8403,9916"; a="207786721" X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="207786721" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Mar 2021 04:57:20 -0800 IronPort-SDR: fSG806Dh+MyHHQsgoeJZ0EapAG3nDYymsjQKs9N924M49jPwHLUefPz3fRh+T7+I/YnQs3UhKC vI2EzCP5vQLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="408214639" Received: from silpixa00400308.ir.intel.com ([10.237.214.143]) by orsmga007.jf.intel.com with ESMTP; 08 Mar 2021 04:57:19 -0800 From: Adam Dybkowski To: dev@dpdk.org, declan.doherty@intel.com, arkadiuszx.kusztal@intel.com Cc: Adam Dybkowski Date: Mon, 8 Mar 2021 12:57:07 +0000 Message-Id: <20210308125708.31525-2-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210308125708.31525-1-adamx.dybkowski@intel.com> References: <20210301122110.2586-1-adamx.dybkowski@intel.com> <20210308125708.31525-1-adamx.dybkowski@intel.com> Subject: [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" 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 = &testsuite_params; struct crypto_unittest_params *ut_params = &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 = rte_cryptodev_close(ts_params->valid_devs[0]); + if (res) + RTE_LOG(ERR, USER1, "Crypto device close error %d\n", res); } static int -- 2.25.1