From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5060B4F9A for ; Mon, 9 Jul 2018 10:12:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 01:12:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,329,1526367600"; d="scan'208";a="70713791" Received: from jguo15x-mobl3.ccr.corp.intel.com (HELO [10.67.68.84]) ([10.67.68.84]) by fmsmga001.fm.intel.com with ESMTP; 09 Jul 2018 01:12:00 -0700 To: =?UTF-8?Q?Ga=c3=abtan_Rivet?= References: <1498711073-42917-1-git-send-email-jia.guo@intel.com> <1531119082-17022-1-git-send-email-jia.guo@intel.com> <1531119082-17022-7-git-send-email-jia.guo@intel.com> <20180709074240.e6c3axsvwepfwu3p@bidouze.vm.6wind.com> Cc: stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, jingjing.wu@intel.com, thomas@monjalon.net, motih@mellanox.com, matan@mellanox.com, harry.van.haaren@intel.com, qi.z.zhang@intel.com, shaopeng.he@intel.com, bernard.iremonger@intel.com, arybchenko@solarflare.com, jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com From: Jeff Guo Message-ID: Date: Mon, 9 Jul 2018 16:12:00 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20180709074240.e6c3axsvwepfwu3p@bidouze.vm.6wind.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v6 6/7] eal: add failure handle mechanism for hotplug 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: , X-List-Received-Date: Mon, 09 Jul 2018 08:12:04 -0000 hi, gaetan On 7/9/2018 3:42 PM, Gaëtan Rivet wrote: > Hi Jeff, > > On Mon, Jul 09, 2018 at 02:51:21PM +0800, Jeff Guo wrote: >> This patch introduces a failure handle mechanism to handle device >> hotplug removal event. >> >> First it can register sigbus handler when enable device event monitor. Once >> sigbus error be captured, it will check the failure address and accordingly >> remap the invalid memory for the corresponding device. Besed on this >> mechanism, it could guaranty the application not crash when the device be >> hotplug out. >> >> Signed-off-by: Jeff Guo >> Acked-by: Shaopeng He >> --- >> v6->v5: >> refine some doc and coding style >> --- >> lib/librte_eal/linuxapp/eal/eal_dev.c | 114 +++++++++++++++++++++++++++++++++- >> 1 file changed, 113 insertions(+), 1 deletion(-) >> >> diff --git a/lib/librte_eal/linuxapp/eal/eal_dev.c b/lib/librte_eal/linuxapp/eal/eal_dev.c >> index 1cf6aeb..cb30729 100644 >> --- a/lib/librte_eal/linuxapp/eal/eal_dev.c >> +++ b/lib/librte_eal/linuxapp/eal/eal_dev.c >> @@ -4,6 +4,8 @@ >> >> #include >> #include >> +#include >> +#include >> #include >> #include >> >> @@ -14,15 +16,31 @@ >> #include >> #include >> #include >> +#include >> +#include >> +#include >> +#include >> >> #include "eal_private.h" >> >> static struct rte_intr_handle intr_handle = {.fd = -1 }; >> static bool monitor_started; >> >> +extern struct rte_bus_list rte_bus_list; >> + > Where do you use the rte_bus_list? It seems the reference is a remnant > from a previous version. > > You do not seem to need a direct access on rte_bus_list, > as you call rte_bus_find instead. > > Why do you need this extern? I think its absence is motivated: to keep the > bus list private and force users to access it through standard exposed ways. > > Regards, i think that is my missing here. Will delete it. Thanks for your info.