From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet Subject: Re: [PATCH v6 6/7] eal: add failure handle mechanism for hotplug Date: Mon, 9 Jul 2018 09:42:40 +0200 Message-ID: <20180709074240.e6c3axsvwepfwu3p@bidouze.vm.6wind.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 To: Jeff Guo Return-path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 94CDD3772 for ; Mon, 9 Jul 2018 09:43:05 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id b15-v6so9842369wrv.10 for ; Mon, 09 Jul 2018 00:43:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1531119082-17022-7-git-send-email-jia.guo@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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, -- Gaëtan Rivet 6WIND