From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <jia.guo@intel.com>
Received: from mga02.intel.com (mga02.intel.com [134.134.136.20])
 by dpdk.org (Postfix) with ESMTP id EA08A1B0F9
 for <dev@dpdk.org>; Sat, 29 Sep 2018 07:52:43 +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 orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 28 Sep 2018 22:52:42 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.54,318,1534834800"; d="scan'208";a="266972369"
Received: from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.112])
 ([10.67.68.112])
 by fmsmga005.fm.intel.com with ESMTP; 28 Sep 2018 22:51:40 -0700
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>,
 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>
 <5ee29fb1-3e92-1555-e1ae-77d5d137c26d@intel.com>
From: Jeff Guo <jia.guo@intel.com>
Message-ID: <980bc22f-760e-623d-b985-876d93604f6e@intel.com>
Date: Sat, 29 Sep 2018 13:51:39 +0800
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.0
MIME-Version: 1.0
In-Reply-To: <5ee29fb1-3e92-1555-e1ae-77d5d137c26d@intel.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Sep 2018 05:52:44 -0000

Anatoly, thanks for your review, please see comment as below.

On 9/26/2018 8:28 PM, Burakov, Anatoly wrote:
> 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 <jia.guo@intel.com>
>> ---
>
> <snip>
>
>> +     * 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
>

yes, will modify it.