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 DF9B6A0561; Mon, 8 Mar 2021 13:57:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0184B22A3A4; Mon, 8 Mar 2021 13:57:26 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 0F26B22A396 for ; Mon, 8 Mar 2021 13:57:23 +0100 (CET) IronPort-SDR: 1Ggd7u6WskpMzWahYOfSze4y1Z3eLLibxQaAiKrdr/l5TmFkb+pUS8thNcNVuYN4/XjEarkDlA bMjyB4gHd2KA== X-IronPort-AV: E=McAfee;i="6000,8403,9916"; a="207786728" X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="207786728" 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:23 -0800 IronPort-SDR: vOGH42WhfhAp/yxxtThlPD67oB4J5rzLJ9+xVG241ePhYyFLe+UfPrUhxwQZT0TvOFCAGqnDnS 2siaMhSerx9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,232,1610438400"; d="scan'208";a="408214650" Received: from silpixa00400308.ir.intel.com ([10.237.214.143]) by orsmga007.jf.intel.com with ESMTP; 08 Mar 2021 04:57:21 -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:08 +0000 Message-Id: <20210308125708.31525-3-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 2/2] app/crypto-perf: close PMD after benchmark run 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 benchmark. Signed-off-by: Adam Dybkowski --- app/test-crypto-perf/main.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 49af812d8..70cb04a21 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -738,8 +738,13 @@ main(int argc, char **argv) } for (i = 0; i < nb_cryptodevs && - i < RTE_CRYPTO_MAX_DEVS; i++) + i < RTE_CRYPTO_MAX_DEVS; i++) { rte_cryptodev_stop(enabled_cdevs[i]); + ret = rte_cryptodev_close(enabled_cdevs[i]); + if (ret) + RTE_LOG(ERR, USER1, + "Crypto device close error %d\n", ret); + } free_test_vector(t_vec, &opts); @@ -758,8 +763,14 @@ main(int argc, char **argv) } for (i = 0; i < nb_cryptodevs && - i < RTE_CRYPTO_MAX_DEVS; i++) + i < RTE_CRYPTO_MAX_DEVS; i++) { rte_cryptodev_stop(enabled_cdevs[i]); + ret = rte_cryptodev_close(enabled_cdevs[i]); + if (ret) + RTE_LOG(ERR, USER1, + "Crypto device close error %d\n", ret); + + } rte_free(opts.imix_buffer_sizes); free_test_vector(t_vec, &opts); -- 2.25.1