From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=trwwnex7eBmA8SKknJuLRxVkb8Hgp/onmc04JOjrLxM=; b=xaOExPytJL7j8NMJlQ1/AM1WvwtOutT5UTzFIW6EzRaI6tnOH96Z4MuhPWVIWeGc9p 989A7HIbIDBMFKMJZ1e5kO6KYoPhUJ3JFKAKtD91vFb+ZCwoui8ZSqK8l2odQxGb/FkX Ivmgjl/vKYLahqaYdrDWov7/g0ta+wetgvATfWe6/mN6J8AJCyyd/pnebAu8nGI3JX02 ygvPDNDSSdCAM7UOOxF45qAA189UWaQMP0WnGWaHRwsQA2aANYImkxOKDiE/2540NStK ggaxTooJ0YdIbgSL8d76903UKtrb7QmQOpuZCR3sMRm9ZU1O961yiEVpuGvz3q8s5VP9 u4yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=trwwnex7eBmA8SKknJuLRxVkb8Hgp/onmc04JOjrLxM=; b=NqD1gTmelBZOt98Jct/67G2yuFanyym3F917+P3eofjzPIwxq615/S4HWNKI8/Mlkh KQT7oOTtXTt7v4oHLWEjakzIa2qIGRfG8Ro5TlRDuPaSQoeV0pBdcMUu0nPX7Jpk29hv nYvGCO9vEiq9ci1FnjksMIWVoj2Gz5hTkuHluRrEfRykBg8LSIsb7L4q1qcpDFEsyRNH B8qHG3zqOwUw0w2bes3JAR7RsxQHXGDnsUC7+9K3c89vdjuczmcItT66v0kGRp2s7u6O eyfuofnadaWUkJRMk7/6exQ06pXpz2+BG1SDAosq1GOxNZLDKDF/cNvJw/a9+v4YSisK wNSQ== X-Gm-Message-State: APt69E1sAry27beLa0lrMnLHw92XJAPl+09rvwAxD3HtVmmX00U9dhC6 Cg4TllWL9FuNORdud1tRwz4Zmg== X-Google-Smtp-Source: AAOMgpcJXPgHX1IhvfekUH6sVSHShhwJM4HYUzCW4G0UA4Dj/+TjyVkWXvRX1cC++1ILtKyjwHz2dg== X-Received: by 2002:a5d:67c6:: with SMTP id n6-v6mr13286891wrw.39.1531122184216; Mon, 09 Jul 2018 00:43:04 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id h40-v6sm20018054wrf.40.2018.07.09.00.43.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Jul 2018 00:43:03 -0700 (PDT) Date: Mon, 9 Jul 2018 09:42:40 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Jeff Guo 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 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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1531119082-17022-7-git-send-email-jia.guo@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) 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 07:43:05 -0000 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