From: "Burakov, Anatoly" <anatoly.burakov@intel.com>
To: wangyunjian <wangyunjian@huawei.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "hemant.agrawal@nxp.com" <hemant.agrawal@nxp.com>,
"sachin.saxena@nxp.com" <sachin.saxena@nxp.com>,
"Lilijun (Jerry)" <jerry.lilijun@huawei.com>,
xudingke <xudingke@huawei.com>,
"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH 2/2] bus/fslmc: fix check for vfio_group_fd
Date: Thu, 17 Sep 2020 15:41:14 +0100 [thread overview]
Message-ID: <0fe98b51-11b4-ec67-3474-544ea783687e@intel.com> (raw)
In-Reply-To: <34EFBCA9F01B0748BEB6B629CE643AE60DA5153C@DGGEMM533-MBX.china.huawei.com>
On 17-Sep-20 2:34 PM, wangyunjian wrote:
>> -----Original Message-----
>> From: Burakov, Anatoly [mailto:anatoly.burakov@intel.com]
>> Sent: Thursday, September 17, 2020 8:56 PM
>> To: wangyunjian <wangyunjian@huawei.com>; dev@dpdk.org
>> Cc: hemant.agrawal@nxp.com; sachin.saxena@nxp.com; Lilijun (Jerry)
>> <jerry.lilijun@huawei.com>; xudingke <xudingke@huawei.com>;
>> stable@dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH 2/2] bus/fslmc: fix check for vfio_group_fd
>>
>> On 19-May-20 4:42 AM, wangyunjian wrote:
>>> From: Yunjian Wang <wangyunjian@huawei.com>
>>>
>>> The issue is that a file descriptor at 0 is a valid one. Currently the
>>> file not found, the return value will be set to 0. As a result, it is
>>> impossible to distinguish between a correct descriptor and a failed
>>> return value. Fix it to return -ENOENT instead of 0.
>>>
>>> Fixes: a69f79300262 ("bus/fslmc: support multi VFIO group")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
>>> ---
>>
>> I am unfamiliar with bus/fslmc code but i've taken a quick look, and i've noticed
>> that there's another instance of get_group_fd() usage that you're not
>> modifying - is that intentional?
>
> Thank you for your review. The another instance of get_group_fd(), is this it?
> int
> fslmc_vfio_setup_group(void) {
> ...
> /* Get the actual group fd */
> ret = rte_vfio_get_group_fd(groupid);
> if (ret < 0)
> return ret;
> vfio_group.fd = ret;
> ...
> }
> I don't think this's necessary. Because it must be a valid descriptor before it can be used.
>
> Yunjian
>
>>
>> --
>> Thanks,
>> Anatoly
OK. I'll leave this for fslmc bus maintainers to review, but the patch
looks fine to me.
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
--
Thanks,
Anatoly
next prev parent reply other threads:[~2020-09-17 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 3:42 wangyunjian
2020-09-17 12:43 ` wangyunjian
2020-09-17 12:56 ` Burakov, Anatoly
2020-09-17 13:34 ` wangyunjian
2020-09-17 14:41 ` Burakov, Anatoly [this message]
2020-09-17 15:38 ` Hemant Agrawal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0fe98b51-11b4-ec67-3474-544ea783687e@intel.com \
--to=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=hemant.agrawal@nxp.com \
--cc=jerry.lilijun@huawei.com \
--cc=sachin.saxena@nxp.com \
--cc=stable@dpdk.org \
--cc=wangyunjian@huawei.com \
--cc=xudingke@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).