From patchwork Wed Sep 30 12:06:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 79331 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17787A04B5; Wed, 30 Sep 2020 14:06:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A3901B70A; Wed, 30 Sep 2020 14:06:47 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 1022C1B708 for ; Wed, 30 Sep 2020 14:06:45 +0200 (CEST) IronPort-SDR: 7kSWBikaQm+yfhIWm8yqEpcGINwvrOfjbUYEnDz+saPzt0MRXrii3gPj/b+IU09RIYgrBNuOH8 w24sWgL0lFNg== X-IronPort-AV: E=McAfee;i="6000,8403,9759"; a="247158262" X-IronPort-AV: E=Sophos;i="5.77,322,1596524400"; d="scan'208";a="247158262" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2020 05:06:42 -0700 IronPort-SDR: nyr/Dxo4OmyaNUEtroBdFAwnF/kQm44MtI0pvfYVQDKEt2o0QZ3O7jdANZWg0HipCwYsOWKCTB vCUfvnSWiYyg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,322,1596524400"; d="scan'208";a="497241982" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by orsmga005.jf.intel.com with ESMTP; 30 Sep 2020 05:06:40 -0700 From: Ferruh Yigit To: Maryam Tahhan , Reshma Pattan Cc: dev@dpdk.org, Ferruh Yigit , Thomas Monjalon Date: Wed, 30 Sep 2020 13:06:37 +0100 Message-Id: <20200930120637.2350208-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] app/procinfo: close devices before exit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" As well as this is correct thing to close devices before exit, it is also useful to test the closing devices from secondary process. Signed-off-by: Ferruh Yigit --- Cc: Thomas Monjalon --- app/proc-info/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 64fb83b38d..b0de39489a 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1349,6 +1349,9 @@ main(int argc, char **argv) if (enable_iter_mempool) iter_mempool(mempool_iter_name); + RTE_ETH_FOREACH_DEV(i) + rte_eth_dev_close(i); + ret = rte_eal_cleanup(); if (ret) printf("Error from rte_eal_cleanup(), %d\n", ret);