From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 60C26E62 for ; Mon, 21 Dec 2015 09:17:17 +0100 (CET) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NZP0060D8CH1110@mailout1.w1.samsung.com> for dev@dpdk.org; Mon, 21 Dec 2015 08:17:05 +0000 (GMT) X-AuditID: cbfec7f5-f79b16d000005389-ed-5677b5816cfa Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 40.17.21385.185B7765; Mon, 21 Dec 2015 08:17:05 +0000 (GMT) Received: from fedinw7x64 ([106.109.131.169]) by eusync3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NZP0089P8CGCN50@eusync3.samsung.com>; Mon, 21 Dec 2015 08:17:05 +0000 (GMT) From: Pavel Fedin To: 'Yuanhan Liu' , dev@dpdk.org References: <1449027793-30975-1-git-send-email-yuanhan.liu@linux.intel.com> <1450321921-27799-1-git-send-email-yuanhan.liu@linux.intel.com> In-reply-to: <1450321921-27799-1-git-send-email-yuanhan.liu@linux.intel.com> Date: Mon, 21 Dec 2015 11:17:03 +0300 Message-id: <000001d13bc7$fa1ab500$ee501f00$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQKk4gwff5b91BWl/5G7CjZG6+2D3wI+GqRznRva5AA= Content-language: ru X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeLIzCtJLcpLzFFi42I5/e/4Vd3GreVhBl//CFhsbhS2ePdpO5NF +8yzTBYr33lY/P/1itViy/5v7BaTPy9ntbg+4QKrxY6O/ywOnB6/Fixl9Vi85yWTx7yTgR7v 911lC2CJ4rJJSc3JLEst0rdL4MqYs/kpY8E/+YobHTdZGhj/SHQxcnJICJhIXJ4xiw3CFpO4 cG89kM3FISSwlFFi3ZQ7jBDOd0aJow2nwKrYBNQlTn/9wAJiiwjYSmyZ+oYJpIhZYAqTxJnZ t5khOnoZJZ5Oe8wKUsUp4COx488CdhBbGKjj+6LTjCA2i4CqxLMZ28FsXgFLiQP/N7ND2IIS PybfA9vALKAlsX7ncSYIW15i85q3zBC3KkjsOPuaEeIKK4lJV04yQtSISEz7d495AqPQLCSj ZiEZNQvJqFlIWhYwsqxiFE0tTS4oTkrPNdIrTswtLs1L10vOz93ECImcrzsYlx6zOsQowMGo xMPr8aosTIg1say4MvcQowQHs5II76oN5WFCvCmJlVWpRfnxRaU5qcWHGKU5WJTEeWfueh8i JJCeWJKanZpakFoEk2Xi4JRqYMw2m/FmTkvIxE6V6x6Hl2S3Sao90o4LXZLcseSE2Tqfa8+M VWoDui/eetUWzXSM+brlIe1wzyAWH2MXsV/6lm9DPtnKVRsvv/3NeMlkyctZmmv4X5rU5yzs NdQT4mbYnqv2JfHwwiytay09ZiVRu6b73v3gn/TI4NoSYxvjDfpzpHuCL/EcUWIpzkg01GIu Kk4EAG/Wiv2YAgAA Cc: "'Michael S. Tsirkin'" , 'Yang Maggie' , 'Victor Kaplansky' Subject: Re: [dpdk-dev] [PATCH v2 0/6] vhost-user live migration support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2015 08:17:17 -0000 Works fine. Tested-by: Pavel Fedin Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Thursday, December 17, 2015 6:12 AM > To: dev@dpdk.org > Cc: huawei.xie@intel.com; Michael S. Tsirkin; Victor Kaplansky; Iremonger Bernard; Pavel > Fedin; Peter Xu; Yuanhan Liu; Chen Zhihui; Yang Maggie > Subject: [PATCH v2 0/6] vhost-user live migration support > > This patch set adds the vhost-user live migration support. > > The major task behind that is to log pages we touched during > live migration, including used vring and desc buffer. So, this > patch set 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 logs changes we made to vring desc buffer. > > - Patch 5 and 6 add some feature bits related to live migration. > > > A simple test guide (on same host) > ================================== > > The following test is based on OVS + DPDK (check [0] for > how to setup OVS + DPDK): > > [0]: http://wiki.qemu.org/Features/vhost-user-ovs-dpdk > > Here is the rough test guide: > > 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. > > > Cc: Chen Zhihui > Cc: Yang Maggie > --- > Yuanhan Liu (6): > vhost: handle VHOST_USER_SET_LOG_BASE request > vhost: introduce vhost_log_write > vhost: log used vring changes > vhost: log vring desc buffer changes > vhost: claim that we support GUEST_ANNOUNCE feature > vhost: enable log_shmfd protocol feature > > lib/librte_vhost/rte_virtio_net.h | 36 ++++++++++- > lib/librte_vhost/vhost_rxtx.c | 88 +++++++++++++++++++-------- > 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 | 48 +++++++++++++++ > lib/librte_vhost/vhost_user/virtio-net-user.h | 5 +- > lib/librte_vhost/virtio-net.c | 5 ++ > 7 files changed, 165 insertions(+), 30 deletions(-) > > -- > 1.9.0