DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support
@ 2015-12-11  8:26 Pavel Fedin
  2015-12-11  9:49 ` Yuanhan Liu
  0 siblings, 1 reply; 42+ messages in thread
From: Pavel Fedin @ 2015-12-11  8:26 UTC (permalink / raw)
  To: dev

 Hello!

 I am currently testing this patchset with qemu and have problems.

 The guest migrates correctly, but after the migration it cries in the log:

Vhost user backend fails to broadcast fake RARP

 and pinging the (new) host doesn't work. When i migrate it back to the old host, the network resumes working.

 I have analyzed the code, and this problem happens because we support neither VHOST_USER_PROTOCOL_F_RARP, nor
VIRTIO_NET_F_GUEST_ANNOUNCE. Since the latter seems to be related only to guest, i simply enabled it in qemu by force, and after
this the network doesn't work at all.
 Can anybody help me and explain how the thing works? I expected that gratuitous ARP packets are harmless, but they seem to break
things somehow. And what was used for testing the implementation?

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

^ permalink raw reply	[flat|nested] 42+ messages in thread
* [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support
@ 2015-12-02  3:43 Yuanhan Liu
  2015-12-02 14:10 ` Victor Kaplansky
  2015-12-09  3:41 ` Xie, Huawei
  0 siblings, 2 replies; 42+ messages in thread
From: Yuanhan Liu @ 2015-12-02  3:43 UTC (permalink / raw)
  To: dev; +Cc: Victor Kaplansky, Michael S. Tsirkin

This patch set adds the initial vhost-user live migration support.

The major task behind that is to log pages we touched during
live migration. So, this patch is basically about adding vhost
log support, and using it.

Patchset
========
- Patch 1 handles VHOST_USER_SET_LOG_BASE, which tells us where
  the dirty memory bitmap is.
    
- Patch 2 introduces a vhost_log_write() helper function to log
  pages we are gonna change.

- Patch 3 logs changes we made to used vring.

- Patch 4 sets log_fhmfd protocol feature bit, which actually
  enables the vhost-user live migration support.

A simple test guide (on same host)
==================================

The following test is based on OVS + DPDK. And here is guide
to setup OVS + DPDK:

    http://wiki.qemu.org/Features/vhost-user-ovs-dpdk

1. start ovs-vswitchd

2. Add two ovs vhost-user port, say vhost0 and vhost1

3. Start a VM1 to connect to vhost0. Here is my example:

   $QEMU -enable-kvm -m 1024 -smp 4 \
       -chardev socket,id=char0,path=/var/run/openvswitch/vhost0  \
       -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
       -device virtio-net-pci,netdev=mynet1,mac=52:54:00:12:34:58 \
       -object memory-backend-file,id=mem,size=1024M,mem-path=$HOME/hugetlbfs,share=on \
       -numa node,memdev=mem -mem-prealloc \
       -kernel $HOME/iso/vmlinuz -append "root=/dev/sda1" \
       -hda fc-19-i386.img \
       -monitor telnet::3333,server,nowait -curses

4. run "ping $host" inside VM1

5. Start VM2 to connect to vhost0, and marking it as the target
   of live migration (by adding -incoming tcp:0:4444 option)

   $QEMU -enable-kvm -m 1024 -smp 4 \
       -chardev socket,id=char0,path=/var/run/openvswitch/vhost1  \
       -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \
       -device virtio-net-pci,netdev=mynet1,mac=52:54:00:12:34:58 \
       -object memory-backend-file,id=mem,size=1024M,mem-path=$HOME/hugetlbfs,share=on \
       -numa node,memdev=mem -mem-prealloc \
       -kernel $HOME/iso/vmlinuz -append "root=/dev/sda1" \
       -hda fc-19-i386.img \
       -monitor telnet::3334,server,nowait -curses \
       -incoming tcp:0:4444 

6. connect to VM1 monitor, and start migration:

   > migrate tcp:0:4444

7. After a while, you will find that VM1 has been migrated to VM2,
   and the "ping" command continues running, perfectly.


Note: this patch set has mostly been based on Victor Kaplansk's demo
work (vhost-user-bridge) at QEMU project. I was thinking to add Victor
as the co-author. Victor, what do you think of that? :)

Comments are welcome!

---
Yuanhan Liu (4):
  vhost: handle VHOST_USER_SET_LOG_BASE request
  vhost: introduce vhost_log_write
  vhost: log vring changes
  vhost: enable log_shmfd protocol feature

 lib/librte_vhost/rte_virtio_net.h             | 35 ++++++++++++++
 lib/librte_vhost/vhost_rxtx.c                 | 70 ++++++++++++++++++---------
 lib/librte_vhost/vhost_user/vhost-net-user.c  |  7 ++-
 lib/librte_vhost/vhost_user/vhost-net-user.h  |  6 +++
 lib/librte_vhost/vhost_user/virtio-net-user.c | 44 +++++++++++++++++
 lib/librte_vhost/vhost_user/virtio-net-user.h |  5 +-
 lib/librte_vhost/virtio-net.c                 |  4 ++
 7 files changed, 145 insertions(+), 26 deletions(-)

-- 
1.9.0

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2015-12-16 13:00 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11  8:26 [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support Pavel Fedin
2015-12-11  9:49 ` Yuanhan Liu
2015-12-11 10:22   ` Pavel Fedin
2015-12-14  3:58     ` Peter Xu
2015-12-14  7:30       ` Pavel Fedin
2015-12-14  9:04         ` Peter Xu
2015-12-14  9:46           ` Pavel Fedin
2015-12-14 10:09             ` Peter Xu
2015-12-14 12:09             ` Yuanhan Liu
2015-12-14 13:00               ` Peter Xu
2015-12-14 13:21                 ` Yuanhan Liu
2015-12-14 13:28                   ` Peter Xu
2015-12-14 13:51                     ` Yuanhan Liu
2015-12-14 14:54                   ` Pavel Fedin
2015-12-15  8:23       ` Yuanhan Liu
2015-12-15  8:45         ` Pavel Fedin
2015-12-15  8:56           ` Yuanhan Liu
2015-12-15  9:04             ` Pavel Fedin
2015-12-15 10:05           ` Peter Xu
2015-12-15 11:43             ` Thibaut Collet
2015-12-15 11:47               ` Thibaut Collet
2015-12-15 12:24                 ` Pavel Fedin
2015-12-15 13:36                   ` Yuanhan Liu
2015-12-15 13:48                     ` Pavel Fedin
2015-12-15 13:59                       ` Yuanhan Liu
2015-12-15 14:58                         ` Pavel Fedin
2015-12-16  7:28                           ` Yuanhan Liu
2015-12-16 11:57                             ` Pavel Fedin
2015-12-16 12:08                               ` Yuanhan Liu
2015-12-16 12:43                                 ` Pavel Fedin
2015-12-16 13:00                                   ` Yuanhan Liu
2015-12-15 13:18                 ` Yuanhan Liu
2015-12-15 15:07                   ` Thibaut Collet
2015-12-15 15:36                     ` Pavel Fedin
2015-12-16  2:38                     ` Peter Xu
2015-12-16  2:50                       ` Yuanhan Liu
2015-12-16  7:05                       ` Pavel Fedin
2015-12-15  9:42         ` Peter Xu
  -- strict thread matches above, loose matches on Subject: below --
2015-12-02  3:43 Yuanhan Liu
2015-12-02 14:10 ` Victor Kaplansky
2015-12-02 14:33   ` Yuanhan Liu
2015-12-09  3:41 ` Xie, Huawei

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).