DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tetsuya Mukawa <mukawa@igel.co.jp>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org, Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [dpdk-dev] [PATCH] vchost: Notify application of ownership change
Date: Mon, 26 Oct 2015 17:33:24 +0900	[thread overview]
Message-ID: <562DE554.2090109@igel.co.jp> (raw)
In-Reply-To: <20151026063007.GZ3115@yliu-dev.sh.intel.com>

On 2015/10/26 15:30, Yuanhan Liu wrote:
> On Mon, Oct 26, 2015 at 02:54:07PM +0900, Tetsuya Mukawa wrote:
>> On 2015/10/25 2:16, Thomas Monjalon wrote:
>>> 2015-08-12 03:34, Xie, Huawei:
>>>> On 8/8/2015 1:21 AM, Jan Kiszka wrote:
>>>>> On VHOST_*_RESET_OWNER, we reinitialize the device but without telling
>>>>> the application. That will cause crashes when it continues to invoke
>>>>> vhost services on the device. Fix it by calling the destruction hook if
>>>>> the device is still in use.
>>> [...]
>>>>> --- a/lib/librte_vhost/virtio-net.c
>>>>> +++ b/lib/librte_vhost/virtio-net.c
>>>>> @@ -402,6 +402,9 @@ reset_owner(struct vhost_device_ctx ctx)
>>>>>
>>>>>  	ll_dev = get_config_ll_entry(ctx);
>>>>>
>>>>> +	if ((ll_dev->dev.flags & VIRTIO_DEV_RUNNING))
>>>>> +		notify_ops->destroy_device(&ll_dev->dev);
>>>> To me this patch makes sense here.
>>>> Whether RESET_OWNER is really needed is another question. Whenever the
>>>> vhost itself needs to process the vhost device, we need to notify the
>>>> switch application to remove it from data plane.
>>> Huawei,
>>> some patches have been accepted for RESET_OWNER management.
>>> Is this patch obsolete?
> I think it's still appliable, at least so far.
>
>> Hi Yuanhan and Huawei,
>>
>> I also have the same question. Do we have a patch for this issue?
>>
>> Today, I've download Yuanhan's multiple queues patches and applied it on
>> latest dpdk tree.
>> Then, tried to apply my vhost PMD patch on it.
>>
>> When I check the patch, it seems I've faced this issue.
>> Here are steps to reproduce.
> Above patch should fix your issue, right? If so, we need it.

Yes, the patch will fix the issue.

>> 1. Start vhost-user backend application.
>>      (In my case, testpmd using vhost PMD is the application)
>> 2. Start a VM with vhost-user.
>>      You can see below message from the backend application.
>>       VHOST_CONFIG: read message VHOST_USER_SET_VRING_ENABLE
>>       VHOST_CONFIG: set queue enable: 1 to qp idx: 0
>>       (snip)
>>       VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK
>> 3. After booting Linux on guest, bind the virtio-net device to igb_uio.
>>     Then below messages are shown.
>>     VHOST_CONFIG: read message VHOST_USER_RESET_OWNER
>>     VHOST_CONFIG: read message VHOST_USER_RESET_OWNER
>>     VHOST_CONFIG: read message VHOST_USER_GET_VRING_BASE
>>
>> The point is we will have VHOST_USER_RESET_OWNER before
>> VHOST_USER_GET_VRING_BASE.
> Note that there is an ongoing work at QEMU community (from me) to
> handle RESET_OWNER correctly: it will be moved to somewhere else
> instead of before VHOST_USER_GET_VRING_BASE.
>
> 	--yliu

Sounds great! Thanks for handling it.

Tetsuya

  reply	other threads:[~2015-10-26  8:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 17:20 Jan Kiszka
2015-08-08  0:25 ` Ouyang, Changchun
2015-08-08  6:43   ` Jan Kiszka
2015-08-10  1:20     ` Ouyang, Changchun
2015-08-10  8:07       ` Jan Kiszka
2015-08-12  3:34 ` Xie, Huawei
2015-08-12  5:35   ` Jan Kiszka
2015-10-24 17:16   ` Thomas Monjalon
2015-10-26  5:54     ` Tetsuya Mukawa
2015-10-26  6:30       ` Yuanhan Liu
2015-10-26  8:33         ` Tetsuya Mukawa [this message]
2016-03-17 14:42 ` Thomas Monjalon
2016-03-17 14:53   ` Jan Kiszka

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=562DE554.2090109@igel.co.jp \
    --to=mukawa@igel.co.jp \
    --cc=dev@dpdk.org \
    --cc=jan.kiszka@siemens.com \
    --cc=yuanhan.liu@linux.intel.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).