DPDK patches and discussions
 help / color / mirror / Atom feed
From: 17826875952@163.com
To: "Xia, Chenbo" <chenbo.xia@intel.com>
Cc: "maxime.coquelin@redhat.com" <maxime.coquelin@redhat.com>,
	 "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: fix error run close(0)
Date: Sat, 12 Dec 2020 05:35:01 +0800 (GMT+08:00)	[thread overview]
Message-ID: <ca3a3c7.b03e.17653ba8725.Coremail.17826875952@163.com> (raw)
In-Reply-To: <MN2PR11MB4063A97957439114534D18F19CCA0@MN2PR11MB4063.namprd11.prod.outlook.com>

Hi Chenbo,
Thanks for your advices!
But When I use 'git send-email --to dev@dpdk.org --in-reply-to 1607703293-6121-1-git-send-email-17826875952@163.com --suppress-cc=all 0001-net-virtio-user-fix-run-close-0-and-close-callfd.patch', it still send new same one in patchwork.😭.Please help me delete the other,Tks!
And the new version patch is:


https://patches.dpdk.org/patch/85019/

If this patch is ok, please give me a reply!


Thanks!
Jiawei




| |
zhujw
邮箱:zhujw@zju.edu.cn
|
On 12/11/2020 09:58, Xia, Chenbo wrote:
Hi Jiawei,

>From: 17826875952 <17826875952@163.com>
>Sent: Friday, December 11, 2020 1:31 AM
>To: Xia, Chenbo <chenbo.xia@intel.com>
>Cc: maxime.coquelin@redhat.com
>Subject: Re:RE: [PATCH] net/virtio-user: fix error run close(0)
>
>
>Hi Chenbo,
>Thanks for you comment!
>
>At 2020-12-09 19:31:19, "Xia, Chenbo" <mailto:chenbo.xia@intel.com> wrote:
>>Hi Jiawei,
>>
>>Thanks for catching this!
>>Comments inline.
>>
>>> -----Original Message-----
>>> From: Jiawei Zhu <mailto:17826875952@163.com>
>>> Sent: Saturday, November 28, 2020 10:50 PM
>>> To: mailto:dev@dpdk.org
>>> Cc: mailto:liweifeng2@huawei.com; mailto:zhujiawei12@huawei.com; mailto:maxime.coquelin@redhat.com;
>>> Xia, Chenbo <mailto:chenbo.xia@intel.com>
>>> Subject: [PATCH] net/virtio-user: fix error run close(0)
>>>
>>> From: Jiawei Zhu <mailto:zhujiawei12@huawei.com>
>>>
>>> When i < VIRTIO_MAX_VIRTQUEUES and j == i,
>>> dev->callfds[i] and dev->kickfds[i] are default 0.
>>> So it will close(0), close the standard input (stdin).
>>>
>>> Fixes: e6e7ad8b3024 ("net/virtio-user: move eventfd open/close into
>>> init/uninit")
>>> Cc: mailto:stable@dpdk.org
>>>
>>> Signed-off-by: Jiawei Zhu <mailto:zhujiawei12@huawei.com>
>>> ---
>>>  drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c
>>> b/drivers/net/virtio/virtio_user/virtio_user_dev.c
>>> index 053f026..1bfd223 100644
>>> --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
>>> +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
>>> @@ -284,7 +284,7 @@ int virtio_user_stop_device(struct virtio_user_dev *dev)
>>>      }
>>>
>>>      if (i < VIRTIO_MAX_VIRTQUEUES) {
>>> -        for (j = 0; j <= i; ++j) {
>>> +        for (j = 0; j < i; ++j) {
>>
>>With the help of your patch, I notice another defect that if the code fails in kickfd
>>creation, we will leave one callfd not closed. Since you are here, could you help solve
>>this too? A potential solution could be doing 'dev->callfds[i] = callfd' just after callfd
>>creation, keeping 'j <= i' and adding checks before close(). What do you think?
>
>This solution is ok to solve this,but I think the checks ars superfluous for  'j < i'.
>So I think adding ‘close(callfd)’ before break when fails in kickfd creation and keeping 'j < i'.
>What do you think?

Yes, that's also a viable solution. Please go ahead with this 😊.

Btw, next time you reply to patch email, please:
1. Better use plain text rather than HTML.
2. cc to dev@dpdk.org to make our discussion open to community.

And since you will send new version now, please add v2 as patch prefix. Otherwise maintainers will
be confused.

Thanks!
Chenbo

>
>>
>>Btw, I noticed that you have sent multiple patches that have same content. If you want to
>>send new version. Please --in-reply-to this patch as this is the one that shows in patchwork.
>>(http://patchwork.dpdk.org/patch/84626/)
>>
>>Thanks!
>>Chenbo
>>
>>>              close(dev->callfds[j]);
>>>              close(dev->kickfds[j]);
>>>          }
>>> --
>>> 1.8.3.1
>>
>Thanks!
>Jiawei

  reply	other threads:[~2020-12-11 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-28 14:50 Jiawei Zhu
2020-12-09 11:31 ` Xia, Chenbo
2020-12-09 11:33   ` Maxime Coquelin
     [not found]   ` <4a6e80c5.31.1764db4afc6.Coremail.17826875952@163.com>
2020-12-11  1:58     ` Xia, Chenbo
2020-12-11 21:35       ` 17826875952 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-12-09  7:34 17826875952
2020-11-27 19:38 Jiawei Zhu

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=ca3a3c7.b03e.17653ba8725.Coremail.17826875952@163.com \
    --to=17826875952@163.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.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).