All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lilijun (Jerry, Cloud Networking)" <jerry.lilijun@huawei.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"Liujinsong (Paul)" <liu.jinsong@huawei.com>,
	"lixiao (H)" <lixiao91@huawei.com>,
	wangyunjian <wangyunjian@huawei.com>,
	"wangxin (U)" <wangxinxin.wang@huawei.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>
Subject: Re: [Qemu-devel] Question about VM virtio device's link down delay when vhost-user reconnect
Date: Wed, 6 Mar 2019 07:36:44 +0000	[thread overview]
Message-ID: <40280F65B1B0B44E8089ED31C01616EBA394A7DF@dggeml529-mbx.china.huawei.com> (raw)
In-Reply-To: <20190304213517-mutt-send-email-mst@kernel.org>

Thanks a lot for your advice.

Maybe there are two methods to add this option:
1) Firstly, add a vhost-user protocol feature to tell Qemu if hide the disconnects from the guest.  Here we just need the backend such as dpdk vhostuser to support this option and the feature.
2) Secondly, add a VM XML vhost-user nic configuration parameters for Qemu.  This method need more modification and other components such as Libvirt and Nova in openstack to configure it.

I'd like to choose the first method,  Do you think so?   

To monitor the status of connection, we can using the command " virsh qemu-monitor-command vm1 --hmp info chardev " to lookup that status. Another one is to add new type event for Qemu to notify libvirt or other upper level components.

Jerry

> -----Original Message-----
> From: Michael S. Tsirkin [mailto:mst@redhat.com]
> Sent: Tuesday, March 05, 2019 10:39 AM
> To: Lilijun (Jerry, Cloud Networking) <jerry.lilijun@huawei.com>
> Cc: qemu-devel@nongnu.org; pbonzini@redhat.com; Liujinsong (Paul)
> <liu.jinsong@huawei.com>; lixiao (H) <lixiao91@huawei.com>; wangyunjian
> <wangyunjian@huawei.com>; wangxin (U)
> <wangxinxin.wang@huawei.com>; Gonglei (Arei)
> <arei.gonglei@huawei.com>
> Subject: Re: Question about VM virtio device's link down delay when vhost-
> user reconnect
> 
> On Mon, Mar 04, 2019 at 11:46:32AM +0000, Lilijun (Jerry, Cloud Networking)
> wrote:
> > Hi all,
> >
> >       I am running my VM using vhost-user NIC with OVS-DPDK.  The steps of
> my question is shown as follows:
> >      1) In the VM, I add one route entry manually on the vNIC eth0 using
> "route add default gw 192.168.1.2".
> >      2) If openvswitch service was restarted, or the process ovs-vswitchd was
> aborted, the new process may be started successfully after long seconds
> such as 40s for the initialization of DPDK huge page memory.
> >      3) And Qemu's vhost-user closed the connection and reconnected
> successfully after 40s.
> >      4) Here VM's vNIC will receive link down and up events, the interval
> between the two events is about 40s.
> >      5) Then I found that route entry disappeared unexpectedly. This will
> cause some network traffic problems.
> >
> >      I have an idea about this problem. We can add a parameter "
> link_down_delay" for all virtio devices that use vhost-user socket such as
> virtio-net and virtio-blk.
> >
> >     If vhost-user socket get a connection closed event when the backend
> process was aborted or restarted, we don't notify VM virtio-net device link
> down right now.
> >    When the vhost-user backend recover this socket's connections before
> the time of "link_down_delay" ms passed, we need not do that link down
> notification to VM.
> >    Or else, if that's timeout, VM can be notified the link down event as
> before.
> >
> >     Is there any other opinions about this solution?  Or some better ideas?
> Thanks.
> >
> > B.R.
> >
> > Jerry
> >
> 
> Rather than hardcode a specific timeout policy, I would go further and start
> with an option to just hide disconnects from guest completely.
> Instead add commands to monitor status of connection and events to report
> changes.  Management tools can then mirror connection status to link if they
> want to.
> 
> --
> MST

  reply	other threads:[~2019-03-06  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 11:46 [Qemu-devel] Question about VM virtio device's link down delay when vhost-user reconnect Lilijun (Jerry, Cloud Networking)
2019-03-05  2:39 ` Michael S. Tsirkin
2019-03-06  7:36   ` Lilijun (Jerry, Cloud Networking) [this message]
2019-03-06 14:09     ` Michael S. Tsirkin
2019-03-08  1:53       ` Lilijun (Jerry, Cloud Networking)
2019-03-08  2:00         ` Michael S. Tsirkin

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=40280F65B1B0B44E8089ED31C01616EBA394A7DF@dggeml529-mbx.china.huawei.com \
    --to=jerry.lilijun@huawei.com \
    --cc=arei.gonglei@huawei.com \
    --cc=liu.jinsong@huawei.com \
    --cc=lixiao91@huawei.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wangxinxin.wang@huawei.com \
    --cc=wangyunjian@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.