From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C1FBA04B1; Thu, 24 Sep 2020 13:39:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5A671DB0B; Thu, 24 Sep 2020 13:39:42 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 149BF1D969 for ; Thu, 24 Sep 2020 13:39:40 +0200 (CEST) IronPort-SDR: yhQGCFVywJ/ftb6Rj/bZ26c6erDDGk036HwVPILgWANCTPlaasOk1Y0LkOY7gpf8eS+29PaVKj c9Vr6UdiKLfA== X-IronPort-AV: E=McAfee;i="6000,8403,9753"; a="162087051" X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="162087051" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 04:39:40 -0700 IronPort-SDR: iLZ4/yN1cA/NbDrpxgrPlc5SHno5mjKtNlG+gKRej+SKcs/2ROF5HekR1WJRhSYP6zO+gm1jIF gEgdmSkN7ftQ== X-IronPort-AV: E=Sophos;i="5.77,297,1596524400"; d="scan'208";a="512126302" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.251.85.112]) ([10.251.85.112]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2020 04:39:38 -0700 To: rohit.raj@nxp.com, Ray Kinsella , Neil Horman Cc: dev@dpdk.org References: <20200824082414.30535-1-rohit.raj@nxp.com> <20200826055233.26075-1-rohit.raj@nxp.com> From: Ferruh Yigit Message-ID: <7f565b31-f631-f3fa-4149-046e7748e475@intel.com> Date: Thu, 24 Sep 2020 12:39:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 In-Reply-To: <20200826055233.26075-1-rohit.raj@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 1/3] eal: add API for bus close 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" On 8/26/2020 6:52 AM, rohit.raj@nxp.com wrote: > From: Rohit Raj > > As per the current code we have API for bus probe, but the > bus close API is missing. This breaks the multi process > scenarios as objects are not cleaned while terminating the > secondary processes. > > This patch adds a new API rte_bus_close() for cleanup of > bus objects which were acquired during probe. > > Signed-off-by: Rohit Raj <...> > @@ -67,6 +67,18 @@ typedef int (*rte_bus_scan_t)(void); > */ > typedef int (*rte_bus_probe_t)(void); > > +/** > + * Implementation specific close function which is responsible for closing > + * devices on that bus. > + * > + * This is called while iterating over each registered bus. > + * > + * @return > + * 0 for successful close > + * !0 for any error while closing > + */ > +typedef int (*rte_bus_close_t)(void); > + Can you please put more comments to clarify what does "closing devices on bus" mean, what is the responsibility of that function, what is the expected state after that function, etc ? Since 'pci' & 'vdev' bus implementations are missing, this comment should help them to clarify what exactly needs to be implemented for those buses.