From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 508FFA00E6 for ; Wed, 10 Jul 2019 07:44:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 46E7D1B974; Wed, 10 Jul 2019 07:44:30 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 040721B95A for ; Wed, 10 Jul 2019 07:44:27 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2019 22:44:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,473,1557212400"; d="scan'208";a="176730497" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 09 Jul 2019 22:44:26 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jul 2019 22:44:08 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 9 Jul 2019 22:44:08 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.109]) with mapi id 14.03.0439.000; Wed, 10 Jul 2019 13:44:06 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v3] test_plans: add test plan for pvp vhost_user reconnect test Thread-Index: AQHVNg8G3yh3Q1Fu7UyUZkr4iALFSKbDWM8w Date: Wed, 10 Jul 2019 05:44:06 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BADE98E@SHSMSX101.ccr.corp.intel.com> References: <20190708212702.78019-1-yinan.wang@intel.com> In-Reply-To: <20190708212702.78019-1-yinan.wang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODlmYTc4YzktOWVjNS00MGRkLTg5YzktMmViNDIxMDBhNzJiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNExOVmtDRVAzNzljc2U1cnFSdnpLMkxJQnpyamdcL3hwUUs2WGpuWEZnS2pmRXQ2eU9mVVd2NzR5SzBWMWFzQWwifQ== x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v3] test_plans: add test plan for pvp vhost_user reconnect test X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied ,thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yinan > Sent: Tuesday, July 9, 2019 5:27 AM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v3] test_plans: add test plan for pvp vhost_user > reconnect test >=20 > From: Wang Yinan >=20 > Signed-off-by: Wang Yinan > --- > .../pvp_vhost_user_reconnect_test_plan.rst | 386 ++++++++++++++++++ > 1 file changed, 386 insertions(+) > create mode 100644 test_plans/pvp_vhost_user_reconnect_test_plan.rst >=20 > diff --git a/test_plans/pvp_vhost_user_reconnect_test_plan.rst > b/test_plans/pvp_vhost_user_reconnect_test_plan.rst > new file mode 100644 > index 0000000..a2ccdb1 > --- /dev/null > +++ b/test_plans/pvp_vhost_user_reconnect_test_plan.rst > @@ -0,0 +1,386 @@ > +.. Copyright (c) <2019>, Intel Corporation > + All rights reserved. > + > + Redistribution and use in source and binary forms, with or without > + modification, are permitted provided that the following conditions > + are met: > + > + - Redistributions of source code must retain the above copyright > + notice, this list of conditions and the following disclaimer. > + > + - Redistributions in binary form must reproduce the above copyright > + notice, this list of conditions and the following disclaimer in > + the documentation and/or other materials provided with the > + distribution. > + > + - Neither the name of Intel Corporation nor the names of its > + contributors may be used to endorse or promote products derived > + from this software without specific prior written permission. > + > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > FITNESS > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > INDIRECT, > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > OR > + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, > + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF > ADVISED > + OF THE POSSIBILITY OF SUCH DAMAGE. > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +vhost-user/virtio pvp reconnect test plan > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Description > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +Vhost-user uses Unix domain sockets for passing messages. This means the > DPDK vhost-user implementation has two options: > + > +* DPDK vhost-user acts as the server: > + DPDK will create a Unix domain socket server file and listen for > connections from the frontend. > + Note, this is the default mode, and the only mode before DPDK v16.07. > + > +* DPDK vhost-user acts as the client: > + Unlike the server mode, this mode doesn't create the socket file;it ju= st > tries to connect to the server (which responses to create the file instea= d). > + When the DPDK vhost-user application restarts, DPDK vhost-user will tr= y to > connect to the server again. This is how the "reconnect" feature works. > + When DPDK vhost-user restarts from an normal or abnormal exit (such > +as a crash), the client mode allows DPDK to establish the connection > +again. Note > + that QEMU version v2.7 or above is required for this reconnect feature= . > + Also, when DPDK vhost-user acts as the client, it will keep trying to > reconnect to the server (QEMU) until it succeeds. This is useful in two c= ases: > + * When QEMU is not started yet. > + * When QEMU restarts (for example due to a guest OS reboot). > + > +Test Case1: vhost-user/virtio-pmd pvp reconnect from vhost-user > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Flow: TG--> NIC --> Vhost --> Virtio --> Vhost--> NIC--> TG > + > +1. Bind one port to igb_uio, then launch vhost with client mode by below > commands:: > + > + ./testpmd -c 0x30 -n 4 --socket-mem 1024,1024 --legacy-mem --vdev > 'eth_vhost0,iface=3Dvhost-net,client=3D1,queues=3D1' -- -i --nb-cores=3D1 > + testpmd>set fwd mac > + testpmd>start > + > +2. Start VM with 1 virtio device, and set the qemu as server mode:: > + > + qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6002-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :10 > + > +3. On VM, bind virtio net to igb_uio and run testpmd:: > + > + ./testpmd -c 0x3 -n 4 -- -i --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +4. Send packets by packet generator, check if packets can be RX/TX with > virtio-pmd:: > + > + testpmd>show port stats all > + > +5. On host, quit vhost-user, then re-launch the vhost-user with below > command:: > + > + testpmd>quit > + ./testpmd -c 0x30 -n 4 --socket-mem 1024,1024 --legacy-mem --vdev > 'eth_vhost0,iface=3Dvhost-net,client=3D1,queues=3D1' -- -i --nb-cores=3D1 > + testpmd>set fwd mac > + testpmd>start > + > +6. Check if the reconnection can work, still send packets by packet > generator, check if packets can be RX/TX with virtio-pmd:: > + > + testpmd>show port stats all > + > +Test Case2: vhost-user/virtio-pmd pvp reconnect from VM > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > +Flow: TG--> NIC --> Vhost --> Virtio --> Vhost--> NIC--> TG > + > +1. Bind one port to igb_uio, then launch vhost with client mode by below > commands:: > + > + ./testpmd -c 0x30 -n 4 --socket-mem 1024,1024 --legacy-mem --vdev > 'eth_vhost0,iface=3Dvhost-net,client=3D1,queues=3D1' -- -i --nb-cores=3D1 > + testpmd>set fwd mac > + testpmd>start > + > +2. Start VM with 1 virtio device, and set the qemu as server mode:: > + > + qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6002-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :10 > + > +3. On VM, bind virtio net to igb_uio and run testpmd:: > + > + ./testpmd -c 0x3 -n 4 -- -i --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +4. Send packets by packet generator, check if packets can be RX/TX with > virtio-pmd:: > + > + testpmd>show port stats all > + > +5. Reboot the VM, rerun step2-step4, check the reconnection can be > established. > + > +Test Case3: vhost-user/virtio-pmd pvp reconnect stability test > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Flow: TG--> NIC --> Vhost --> Virtio --> Vhost--> NIC--> TG > + > +Similar as Test Case1, all steps are similar except step 5, 6. > + > +5. Quit vhost-user, then re-launch, repeat it 5-8 times, check if the > reconnect can work and ensure the traffic can continue. > + > +6. Reboot VM, then re-launch VM, repeat it 3-5 times, check if the > reconnect can work and ensure the traffic can continue. > + > +Test Case 4: vhost-user/virtio-pmd pvp with multi VMs reconnect from > +vhost-user > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D=3D=3D=3D=3D > + > +1. Bind one port to igb_uio, launch the vhost by below command:: > + > + ./testpmd -c 0x30 -n 4 --socket-mem 2048,2048 --legacy-mem --file- > prefix=3Dvhost --vdev 'net_vhost0,iface=3Dvhost-net,client=3D1,queues=3D1= ' --vdev > 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D1' -- -i --port- > topology=3Dchained --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +2. Launch VM1 and VM2:: > + > + qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 12 -m 4096 > \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6002-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :10 > + > + qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 12 -m 4096 > \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16-1.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6003-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net1,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:02,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :11 > + > +3. On VM1, bind virtio1 to igb_uio and run testpmd:: > + > + ./testpmd -c 0x3 -n 4 -- -i --port-topology=3Dchained --nb-cores=3D1= -- > txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +4. On VM2, bind virtio2 to igb_uio and run testpmd:: > + > + ./testpmd -c 0x3 -n 4 -- -i --port-topology=3Dchained --nb-cores=3D1= -- > txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +5. Send packets by packet generator, check if packets can be RX/TX with = two > virtio-pmds in two VMs:: > + > + testpmd>show port stats all > + > +6. On host, quit vhost-user, then re-launch the vhost-user with below > command:: > + > + testpmd>quit > + ./testpmd -c 0x30 -n 4 --socket-mem 2048,2048 --legacy-mem --file- > prefix=3Dvhost --vdev 'net_vhost0,iface=3Dvhost-net,client=3D1,queues=3D1= ' --vdev > 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D1' -- -i --port- > topology=3Dchained --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +7. Check if the reconnection can work, still send packets by packet > generator, check if packets can be RX/TX with two virtio-pmds in two VMs:= : > + > + testpmd>show port stats all > + > +Test Case 5: vhost-user/virtio-pmd pvp with multi VMs reconnect from > +VMs > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D > +=3D > + > +1. Bind one port to igb_uio, launch the vhost by below command:: > + > + ./testpmd -c 0x30 -n 4 --socket-mem 2048,2048 --legacy-mem --file- > prefix=3Dvhost --vdev 'net_vhost0,iface=3Dvhost-net,client=3D1,queues=3D1= ' --vdev > 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D1' -- -i --port- > topology=3Dchained --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +2. Launch VM1 and VM2:: > + > + qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6002-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :10 > + > + qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16-1.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6003-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net1,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :11 > + > +3. On VM1, bind virtio1 to igb_uio and run testpmd:: > + > + ./testpmd -c 0x3 -n 4 -- -i --port-topology=3Dchained --nb-cores=3D1= -- > txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +4. On VM2, bind virtio2 to igb_uio and run testpmd:: > + > + ./testpmd -c 0x3 -n 4 -- -i --port-topology=3Dchained --port-topolog= y=3Dchain - > -nb-cores=3D1 --txd=3D1024 --rxd=3D1024 > + testpmd>set fwd mac > + testpmd>start > + > +5. Send packets by packet generator, check if packets can be RX/TX with = two > virtio-pmds in two VMs:: > + > + testpmd>show port stats all > + > +6. Reboot the two VMs, rerun step2-step5. > + > +7. Check if the reconnection can work, still send packets by packet > generator, check if packets can be RX/TX with two virtio-pmds in two VMs:= : > + > + testpmd>show port stats all > + > +Test Case 6: vhost-user/virtio-pmd pvp with multi VMs reconnect > +stability test > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D=3D=3D=3D=3D=3D > +=3D=3D=3D=3D=3D=3D=3D > + > +Similar as Test Case 4, all steps are similar except step 6, 7. > + > +6. Quit vhost-user, then re-launch, repeat it 5-8 times, check if the > reconnect can work and ensure the traffic can continue. > + > +7. Reboot VMs, then re-launch VMs, repeat it 3-5 times, check if the > reconnect can work and ensure the traffic can continue. > + > +Test Case 7: vhost-user/virtio-net VM2VM reconnect from vhost-user > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D=3D > +Flow: Virtio-net1 --> Vhost-user --> Virtio-net2 > + > +1. Launch the vhost by below commands, enable the client mode and tso:: > + > + ./testpmd -c 0x30 -n 4 --socket-mem 2048,2048 --legacy-mem --no-pci = -- > file-prefix=3Dvhost --vdev 'net_vhost,iface=3Dvhost-net,client=3D1,queues= =3D1' --vdev > 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D1' -- -i --nb-cores= =3D1 --txd=3D1024 > --rxd=3D1024 > + testpmd>start > + > +3. Launch VM1 and VM2:: > + > + qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6002-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :10 > + > + qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16-1.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6003-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net1,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:02,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :11 > + > +4. Set virtio device IP and run arp protocal on two VMs:: > + > + VM1: ifconfig ens4 1.1.1.2 > + VM2: ifconfig ens4 1.1.1.3 > + VM1: arp -s 1.1.1.3 52:54:00:00:00:02 > + VM2: arp -s 1.1.1.2 52:54:00:00:00:01 > + > +5. Run iperf on VM1 and VM2, check the tso enabled performance for 1 > min:: > + > + VM1: iperf -s -i 1 -t 60 > + VM2: iperf -c 1.1.1.2 -t 60 -i 1 > + > +6. Kill the vhost-user, then re-launch the vhost-user:: > + > + testpmd>quit > + ./testpmd -c 0x30 -n 4 --socket-mem 2048,2048 --legacy-mem --no-pci = -- > file-prefix=3Dvhost --vdev 'net_vhost,iface=3Dvhost-net,client=3D1,queues= =3D1' --vdev > 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D1' -- -i --nb-cores= =3D1 --txd=3D1024 > --rxd=3D1024 > + testpmd>start > + > +7. Rerun step5, ensure the vhost-user can reconnect to VM again, and the > iperf traffic can be continue. > + > +Test Case 8: vhost-user/virtio-net VM2VM reconnect from VMs > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > +Flow: Virtio-net1 --> Vhost-user --> Virtio-net2 > + > +1. Launch the vhost by below commands, enable the client mode and tso:: > + > + ./testpmd -c 0x30 -n 4 --socket-mem 2048,2048 --legacy-mem --no-pci = -- > file-prefix=3Dvhost --vdev 'net_vhost,iface=3Dvhost-net,client=3D1,queues= =3D1' --vdev > 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D1' -- -i --nb-cores= =3D1 --txd=3D1024 > --rxd=3D1024 > + testpmd>start > + > +3. Launch VM1 and VM2:: > + > + qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6002-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :10 > + > + qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -smp 2 -m 4096 \ > + -object memory-backend-file,id=3Dmem,size=3D4096M,mem- > path=3D/mnt/huge,share=3Don \ > + -numa node,memdev=3Dmem -mem-prealloc -drive > file=3D/home/osimg/ubuntu16-1.img \ > + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga= 0 - > device virtio-serial \ > + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agen= t.2 - > daemonize \ > + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -net > nic,vlan=3D2,macaddr=3D00:00:00:08:e8:aa,addr=3D1f \ > + -net user,vlan=3D2,hostfwd=3Dtcp:127.0.0.1:6003-:22 \ > + -chardev socket,id=3Dchar0,path=3D./vhost-net1,server \ > + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce \ > + -device virtio-net- > pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:02,mrg_rxbuf=3Don,rx_queue_size= =3D10 > 24,tx_queue_size=3D1024 \ > + -vnc :11 > + > +4. Set virtio device IP and run arp protocal on two VMs:: > + > + VM1: ifconfig ens4 1.1.1.2 > + VM2: ifconfig ens4 1.1.1.3 > + VM1: arp -s 1.1.1.3 52:54:00:00:00:02 > + VM2: arp -s 1.1.1.2 52:54:00:00:00:01 > + > +5. Run iperf on VM1 and VM2, check the tso enabled performance for 1 > min:: > + > + VM1: iperf -s -i 1 -t 60 > + VM2: iperf -c 1.1.1.2 -t 60 -i 1 > + > +6. Reboot VM1 and VM2, rerun step3-step5, ensure the vhost-user can > reconnect to VM again, and the iperf traffic can be continue. > + > +Test Case 9: vhost-user/virtio-net VM2VM reconnect stability test > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > =3D=3D > +Flow: Virtio-net1 --> Vhost-user --> Virtio-net2 > + > +Similar as Test Case 7, all steps are similar except step 6. > + > +6. Quit vhost-user, then re-launch, repeat it 5-8 times, check if the > reconnect can work and ensure the traffic can continue. > + > +7. Reboot two VMs, then re-launch VMs, repeat it 3-5 times, check if the > reconnect can work and ensure the traffic can continue. > \ No newline at end of file > -- > 2.17.1