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 3AFA3A0579; Fri, 9 Apr 2021 14:13:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 725F3140F39; Fri, 9 Apr 2021 14:13:26 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 9ED05140F36 for ; Fri, 9 Apr 2021 14:13:24 +0200 (CEST) IronPort-SDR: zWs4Du9pJXtdaHoDjbpOBtguJmmKpS1JAKwQG+jhFqgZ0n/yEc8Lo/YKTlDBKY+7XJsOeQGQeA kvy1yyItjy3A== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="173832432" X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="173832432" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Apr 2021 05:13:24 -0700 IronPort-SDR: k7yB/NHvVbZZqTex7NaeagdfQzI5DB37GN4AFqPvZnHW9Pymd9WDSWqko/T1ycHWMP97T0dcH2 PFnDBLDvBOng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,209,1613462400"; d="scan'208";a="450204249" Received: from silpixa00399302.ir.intel.com ([10.237.214.136]) by fmsmga002.fm.intel.com with ESMTP; 09 Apr 2021 05:13:22 -0700 From: Adam Dybkowski To: dev@dpdk.org, declan.doherty@intel.com, arkadiuszx.kusztal@intel.com, gakhil@marvell.com Cc: Adam Dybkowski Date: Fri, 9 Apr 2021 13:13:01 +0100 Message-Id: <20210409121301.57789-3-adamx.dybkowski@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20210409121301.57789-1-adamx.dybkowski@intel.com> References: <20210308125708.31525-1-adamx.dybkowski@intel.com> <20210409121301.57789-1-adamx.dybkowski@intel.com> Subject: [dpdk-dev] [PATCH v3 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 49af812d8b..70cb04a214 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