From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Sep 2018 05:30:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,306,1534834800"; d="scan'208";a="265869571" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.252.17.84]) ([10.252.17.84]) by fmsmga005.fm.intel.com with ESMTP; 26 Sep 2018 05:28:46 -0700 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 Cc: jblunck@infradead.org, shreyansh.jain@nxp.com, dev@dpdk.org, helin.zhang@intel.com References: <1534503091-31910-1-git-send-email-jia.guo@intel.com> <1534503091-31910-6-git-send-email-jia.guo@intel.com> From: "Burakov, Anatoly" Message-ID: <5ee29fb1-3e92-1555-e1ae-77d5d137c26d@intel.com> Date: Wed, 26 Sep 2018 13:28:45 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1534503091-31910-6-git-send-email-jia.guo@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 5/5] vfio: enable vfio hotplug by req notifier handler 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: Wed, 26 Sep 2018 12:30:28 -0000 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