From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 358E9A034C;
	Fri,  8 Apr 2022 16:55:31 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id CB1444067E;
	Fri,  8 Apr 2022 16:55:30 +0200 (CEST)
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by mails.dpdk.org (Postfix) with ESMTP id 6C10D4003F
 for <dev@dpdk.org>; Fri,  8 Apr 2022 16:55:29 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1649429729; x=1680965729;
 h=date:from:to:cc:subject:message-id:references:
 mime-version:in-reply-to;
 bh=JChrZa4LHjWqzE1loy0zVlvOtAGWW51Jx0fhJlC67Zg=;
 b=HcbSzdUtUaz8tsfG6vA2mo7cPMoblAp5vdWa+Fukvbahcy+V8ApdLo0y
 FKeBQiqLfut7LJrnbnaGV+aLhWIqlrYmcwgwacajzNoddQDIoYuKawuIu
 RFa3G/2/OjY2rwMW3i9v0xQcj7duEiUdXM61zH2EdVbCFhKOBK3+06d15
 lreS7230E+GF7O/OxYkVkDubtw3WuFH5w3tfE1nxwSncclTys6cGz2/co
 JQJ/at8qlO6xJtzvd2ieftHUHkaKRb7xXlWLOI7tFcDc+DKnSCVBo6Lrc
 tlNWPrZCjCDuw30lP1LuiZbKQjCd2A5L659Bk9hjJQkLR8e7MGBLXbIbA g==;
X-IronPort-AV: E=McAfee;i="6400,9594,10310"; a="260448931"
X-IronPort-AV: E=Sophos;i="5.90,245,1643702400"; d="scan'208";a="260448931"
Received: from orsmga006.jf.intel.com ([10.7.209.51])
 by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 08 Apr 2022 07:55:28 -0700
X-IronPort-AV: E=Sophos;i="5.90,245,1643702400"; d="scan'208";a="525401739"
Received: from bricha3-mobl.ger.corp.intel.com ([10.213.224.53])
 by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA;
 08 Apr 2022 07:55:26 -0700
Date: Fri, 8 Apr 2022 15:55:23 +0100
From: Bruce Richardson <bruce.richardson@intel.com>
To: Kevin Laatz <kevin.laatz@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH 3/5] app/test: close dma devices during cleanup
Message-ID: <YlBM2wQCMnbHbPST@bricha3-MOBL.ger.corp.intel.com>
References: <20220408141504.1319913-1-kevin.laatz@intel.com>
 <20220408141504.1319913-4-kevin.laatz@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20220408141504.1319913-4-kevin.laatz@intel.com>
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri, Apr 08, 2022 at 03:15:02PM +0100, Kevin Laatz wrote:
> DMA devices are created during PCI probe of EAL init. These devices need
> to be closed in order to perform necessary cleanup for those devices.
> This patch adds the call to close() for all DMA devices.
> 
> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com> --- app/test/test.c |
> 6 ++++++ 1 file changed, 6 insertions(+)
> 
Just to clarify the situation here - on EAL init, all buses are probed and
all devices initialized. On eal_cleanup/rte_exit the inverse does not
happen, then, i.e. all probed devices on all buses are not closed, right?
This would seem a better option than requiring each application to manually
close all devices even if it never used them. However, it is probably a
bigger and more complex change.

/Bruce