From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v1 5/5] vfio: enable vfio hotplug by req notifier handler Date: Wed, 26 Sep 2018 13:28:45 +0100 Message-ID: <5ee29fb1-3e92-1555-e1ae-77d5d137c26d@intel.com> References: <1534503091-31910-1-git-send-email-jia.guo@intel.com> <1534503091-31910-6-git-send-email-jia.guo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com To: Jeff Guo , stephen@networkplumber.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, gaetan.rivet@6wind.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 Return-path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id C87121B182 for ; Wed, 26 Sep 2018 14:30:27 +0200 (CEST) In-Reply-To: <1534503091-31910-6-git-send-email-jia.guo@intel.com> Content-Language: en-US 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 17-Aug-18 11:51 AM, Jeff Guo wrote: > This patch will add req notifier processing to enable hotplug for vfio. > When device is be hotplug-out, the vfio kernel module will sent req > notifier to request user space to release the allocated resources. It > could use the bus failure mechanism to trigger the currently hotplug > procedure of user space. After that, vfio kernel module will detect the > device disappear, and then release the kernel resource of the device. > > Signed-off-by: Jeff Guo > --- > + * resources before resources be released in kernel, so it can directly > + * call the bus failure handler to use the specific mechanism in > + * user space to handle it. > + */ > + ret = bus->memory_failure_handler(device); > + if (ret) { > + RTE_LOG(ERR, EAL, "Can not handle failure for " > + "device (%s)\n", device->name); > + return; Return is not needed here :) Otherwise, LGTM -- Thanks, Anatoly