From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 482E7A0501; Sat, 2 Apr 2022 11:04:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E6B842858; Sat, 2 Apr 2022 11:04:56 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 321CF41101 for ; Sat, 2 Apr 2022 11:04:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648890294; x=1680426294; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Z7ny5puq1aqOjSHWy/uj+8izBLOSkmMwiIvhVlz05UQ=; b=AvhoHnn821nAOeEtv8bMvwK9xszk6o0OrgVSbEbutFo5t9WsLEUhY3lu qUD9KddfEqp3Ey5/hi2AGcTacWCwSteVOScGSJHYK/oQUDF6FMMI5ZeUC wSJ4eyQ9ossfHtdm/GOYW/B/STeUndN8jFDchmUXNHMFcVkiQDGX7sVIv ZrCx3nSpgAUp1ab9K6WEbZb80XJfkCABPHbNBF/tDVKiO+3MldO/mEZ4J XVonb7Y6FlHUehA66+KetXekw8aujml1M2cE/KTsRlXWHopqhs89N95oN kzCH1teQ3Bkr7JfS3oZ9DGcIpNkmD1nX2WCMKhBg2W0p2mo655niz3EJQ g==; X-IronPort-AV: E=McAfee;i="6200,9189,10304"; a="240227756" X-IronPort-AV: E=Sophos;i="5.90,229,1643702400"; d="scan'208";a="240227756" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2022 02:04:43 -0700 X-IronPort-AV: E=Sophos;i="5.90,229,1643702400"; d="scan'208";a="696136280" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Apr 2022 02:03:05 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 3/5] test_plans/vm2vm_virtio_pmd_cbdma_test_plan: add DPDK22.03 new feature Date: Sat, 2 Apr 2022 17:03:01 +0800 Message-Id: <20220402090301.476574-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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 As commit 53d3f4778c(vhost: integrate dmadev in asynchronous data-path), add new testplan/vm2vm_virtio_pmd_cbdma_test_plan. Signed-off-by: Wei Ling --- .../vm2vm_virtio_pmd_cbdma_test_plan.rst | 379 ++++++++++++++++++ 1 file changed, 379 insertions(+) create mode 100644 test_plans/vm2vm_virtio_pmd_cbdma_test_plan.rst diff --git a/test_plans/vm2vm_virtio_pmd_cbdma_test_plan.rst b/test_plans/v= m2vm_virtio_pmd_cbdma_test_plan.rst new file mode 100644 index 00000000..a3c6e671 --- /dev/null +++ b/test_plans/vm2vm_virtio_pmd_cbdma_test_plan.rst @@ -0,0 +1,379 @@ +.. Copyright (c) <2022>, Intel Corporation=0D + All rights reserved.=0D +=0D + Redistribution and use in source and binary forms, with or without=0D + modification, are permitted provided that the following conditions=0D + are met:=0D +=0D + - Redistributions of source code must retain the above copyright=0D + notice, this list of conditions and the following disclaimer.=0D +=0D + - Redistributions in binary form must reproduce the above copyright=0D + notice, this list of conditions and the following disclaimer in=0D + the documentation and/or other materials provided with the=0D + distribution.=0D +=0D + - Neither the name of Intel Corporation nor the names of its=0D + contributors may be used to endorse or promote products derived=0D + from this software without specific prior written permission.=0D +=0D + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS=0D + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT=0D + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS=0D + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE=0D + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,=0D + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES=0D + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR=0D + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0D + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,=0D + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)=0D + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED=0D + OF THE POSSIBILITY OF SUCH DAMAGE.=0D +=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +vm2vm vhost-user/virtio-pmd test plan=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +Description=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +This test plan includes vm2vm mergeable, normal and vector_rx path test wi= th virtio 0.95 and virtio 1.0.=0D +Since qemu 4.2.0, Packed virtqueue mergeable path and Packed virtqueue non= -mergeable path can be supported.=0D +then also add mergeable and non-mergeable path test with virtio 1.1.=0D +=0D +For more about dpdk-testpmd sample, please refer to the DPDK docments:=0D +https://doc.dpdk.org/guides/testpmd_app_ug/run_app.html=0D +=0D +For virtio-user vdev parameter, you can refer to the DPDK docments:=0D +https://doc.dpdk.org/guides/nics/virtio.html#virtio-paths-selection-and-us= age.=0D +=0D +Prerequisites=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +Topology=0D +--------=0D + Test flow: Virtio-pmd-->Vhost-user-->Testpmd-->Vhost-user-->Virtio-p= md=0D +=0D +Hardware=0D +--------=0D + Supportted NICs: ALL=0D +=0D +Software=0D +--------=0D + Trex:http://trex-tgn.cisco.com/trex/release/v2.26.tar.gz=0D +=0D +General set up=0D +--------------=0D +1. Compile DPDK::=0D +=0D + # CC=3Dgcc meson --werror -Denable_kmods=3DTrue -Dlibdir=3Dlib -Dexa= mples=3Dall --default-library=3D=0D + # ninja -C -j 110=0D +=0D +2. Get the PCI device ID and DMA device ID of DUT, for example, 0000:18:00= .0 is PCI device ID, 0000:00:04.0, 0000:00:04.1 is DMA device ID::=0D +=0D + # ./usertools/dpdk-devbind.py -s=0D +=0D + Network devices using kernel driver=0D + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D + 0000:18:00.0 'Device 159b' if=3Dens785f0 drv=3Dice unused=3Dvfio-pci= =0D +=0D + DMA devices using kernel driver=0D + =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=0D + 0000:00:04.0 'Sky Lake-E CBDMA Registers 2021' drv=3Dioatdma unused= =3Dvfio-pci=0D + 0000:00:04.1 'Sky Lake-E CBDMA Registers 2021' drv=3Dioatdma unused= =3Dvfio-pci=0D +=0D +Test case=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +Common steps=0D +------------=0D +1. Bind 1 NIC port and CBDMA channels to vfio-pci::=0D +=0D + # ./usertools/dpdk-devbind.py -b vfio-pci =0D + # ./usertools/dpdk-devbind.py -b vfio-pci =0D +=0D + For example, Bind 1 NIC port and 2 CBDMA channels::=0D + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:00:18.0=0D + # ./usertools/dpdk-devbind.py -b vfio-pci 0000:00:04.0,000= 0:00:04.1=0D +=0D +2. On VM1 and VM2, bind virtio device with vfio-pci driver::=0D +=0D + modprobe vfio=0D + modprobe vfio-pci=0D + echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode=0D + # ./usertools/dpdk-devbind.py --force --bind=3Dvfio-pci 0000= :00:05.0=0D +=0D +Test Case 1: VM2VM virtio-pmd split ring mergeable path 8 queues CBDMA ena= ble with server mode stable test=0D +--------------------------------------------------------------------------= --------------------------------=0D +This case uses testpmd and QEMU to test split ring mergeable path with 8 q= ueues and CBDMA enable with server mode, relaunch vhost-user 10 times to te= st stable.=0D +=0D +1. Bind 16 CBDMA channels to vfio-pci, as common step 1.=0D +=0D +2. Launch the testpmd with 2 vhost port and 8 queues by below commands::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 = --file-prefix=3Dvhost \=0D + -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 000= 0:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \=0D + -a 0000:80:04.0 -a 0000:80:04.1 -a 0000:80:04.2 -a 0000:80:04.3 -a 000= 0:80:04.4 -a 0000:80:04.5 -a 0000:80:04.6 -a 0000:80:04.7 \=0D + --vdev 'net_vhost0,iface=3Dvhost-net0,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \=0D + --vdev 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \=0D + -- -i --nb-cores=3D4 --txd=3D1024 --rxd=3D1024 --rxq=3D8 --txq=3D8 \=0D + --lcore-dma=3D[lcore2@0000:00:04.0,lcore2@0000:00:04.1,lcore2@0000:00:= 04.2,lcore2@0000:00:04.3,lcore3@0000:00:04.4,lcore3@0000:00:04.5,lcore3@000= 0:00:04.6,lcore3@0000:00:04.7,\=0D + lcore4@0000:80:04.0,lcore4@0000:80:04.1,lcore4@0000:80:04.2,lcore4@000= 0:80:04.3,lcore5@0000:80:04.4,lcore5@0000:80:04.5,lcore5@0000:80:04.6,lcore= 5@0000:80:04.7]=0D + testpmd>start=0D +=0D +3. Launch VM1 and VM2 using qemu::=0D +=0D + taskset -c 6-16 qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -sm= p 9 -m 4096 \=0D + -object memory-backend-file,id=3Dmem,size=3D4096M,mem-path=3D/mnt/huge= ,share=3Don \=0D + -numa node,memdev=3Dmem -mem-prealloc -drive file=3D/home/osimg/ubuntu= 20-04.img \=0D + -chardev socket,path=3D/tmp/vm1_qga0.sock,server,nowait,id=3Dvm1_qga0 = -device virtio-serial \=0D + -device virtserialport,chardev=3Dvm1_qga0,name=3Dorg.qemu.guest_agent.= 2 -daemonize \=0D + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev= =3Dnttsip1 \=0D + -netdev user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6002-:22 \=0D + -chardev socket,id=3Dchar0,path=3D./vhost-net0,server \=0D + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce,queu= es=3D8 \=0D + -device virtio-net-pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,disabl= e-modern=3Dfalse,mrg_rxbuf=3Don,\=0D + mq=3Don,vectors=3D40,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_ts= o4=3Don,guest_ecn=3Don,guest_ufo=3Don,host_ufo=3Don -vnc :10=0D +=0D + taskset -c 17-27 qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -s= mp 9 -m 4096 \=0D + -object memory-backend-file,id=3Dmem,size=3D4096M,mem-path=3D/mnt/huge= ,share=3Don \=0D + -numa node,memdev=3Dmem -mem-prealloc -drive file=3D/home/osimg/ubuntu= 20-04-2.img \=0D + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga0 = -device virtio-serial \=0D + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agent.= 2 -daemonize \=0D + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev= =3Dnttsip1 \=0D + -netdev user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6003-:22 \=0D + -chardev socket,id=3Dchar0,path=3D./vhost-net1,server \=0D + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce,queu= es=3D8 \=0D + -device virtio-net-pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:02,disabl= e-modern=3Dfalse,mrg_rxbuf=3Don,mq=3Don,\=0D + vectors=3D40,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_tso4=3Don,= guest_ecn=3Don,guest_ufo=3Don,host_ufo=3Don -vnc :12=0D +=0D +4. On VM1 and VM2, bind virtio device with vfio-pci driver, as common step= 2.=0D +=0D +5. Launch testpmd in VM1::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 = -- -i --tx-offloads=3D0x00 --enable-hw-vlan-strip \=0D + --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024 --max-pkt-len=3D9600 --r= x-offloads=3D0x00002000=0D + testpmd>set fwd mac=0D + testpmd>start=0D +=0D +6. Launch testpmd in VM2, sent imix pkts from VM2::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 = -- -i --tx-offloads=3D0x00 --enable-hw-vlan-strip \=0D + --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024 --max-pkt-len=3D9600 --r= x-offloads=3D0x00002000=0D + testpmd>set fwd mac=0D + testpmd>set txpkts 64,256,512,1024,2000,64,256,512,1024,2000=0D + testpmd>start tx_first 1=0D +=0D +7. Check imix packets can looped between two VMs and 8 queues all have pac= kets rx/tx::=0D +=0D + testpmd>show port stats all=0D + testpmd>stop=0D +=0D +8. Relaunch and start vhost side testpmd with below cmd::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 = --file-prefix=3Dvhost \=0D + -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 000= 0:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \=0D + -a 0000:80:04.0 -a 0000:80:04.1 -a 0000:80:04.2 -a 0000:80:04.3 -a 000= 0:80:04.4 -a 0000:80:04.5 -a 0000:80:04.6 -a 0000:80:04.7 \=0D + --vdev 'net_vhost0,iface=3Dvhost-net0,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \=0D + --vdev 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \=0D + -- -i --nb-cores=3D4 --txd=3D1024 --rxd=3D1024 --rxq=3D8 --txq=3D8 \=0D + --lcore-dma=3D[lcore2@0000:00:04.0,lcore2@0000:00:04.1,lcore2@0000:00:= 04.2,lcore2@0000:00:04.3,lcore3@0000:00:04.4,lcore3@0000:00:04.5,lcore3@000= 0:00:04.6,lcore3@0000:00:04.7,\=0D + lcore4@0000:80:04.0,lcore4@0000:80:04.1,lcore4@0000:80:04.2,lcore4@000= 0:80:04.3,lcore5@0000:80:04.4,lcore5@0000:80:04.5,lcore5@0000:80:04.6,lcore= 5@0000:80:04.7]=0D + testpmd>start=0D +=0D +9. Send pkts by testpmd in VM2, check imix packets can looped between two = VMs and 8 queues all have packets rx/tx::=0D +=0D + testpmd>stop=0D + testpmd>start tx_first 1=0D + testpmd>show port stats all=0D + testpmd>stop=0D +=0D +10. Rerun step 7-8 for 10 times.=0D +=0D +Test Case 2: VM2VM virtio-pmd split ring mergeable path dynamic queue size= CBDMA enable with server mode test=0D +--------------------------------------------------------------------------= -----------------------------------=0D +This case uses testpmd and QEMU to test split ring mergeable path and CBDM= A enable with server mode, and dynamic queue size from 4 to 8 to it works w= ell or not.=0D +=0D +1. Bind 16 CBDMA channels to vfio-pci, as common step 1.=0D +=0D +2. Launch the testpmd with 2 vhost ports below commands::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 = --file-prefix=3Dvhost \=0D + -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 000= 0:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \=0D + -a 0000:80:04.0 -a 0000:80:04.1 -a 0000:80:04.2 -a 0000:80:04.3 -a 000= 0:80:04.4 -a 0000:80:04.5 -a 0000:80:04.6 -a 0000:80:04.7 \=0D + --vdev 'net_vhost0,iface=3Dvhost-net0,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3]' \=0D + --vdev 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3]' \=0D + -- -i --nb-cores=3D4 --txd=3D1024 --rxd=3D1024 --rxq=3D4 --txq=3D4 \=0D + --lcore-dma=3D[lcore2@0000:00:04.0,lcore2@0000:00:04.1,lcore2@0000:00:= 04.2,lcore2@0000:00:04.3,lcore3@0000:00:04.4,lcore3@0000:00:04.5,lcore3@000= 0:00:04.6,lcore3@0000:00:04.7,\=0D + lcore4@0000:80:04.0,lcore4@0000:80:04.1,lcore4@0000:80:04.2,lcore4@000= 0:80:04.3,lcore5@0000:80:04.4,lcore5@0000:80:04.5,lcore5@0000:80:04.6,lcore= 5@0000:80:04.7]=0D + testpmd>start=0D +=0D +3. Launch VM1 and VM2 using qemu::=0D +=0D + taskset -c 6-16 qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -sm= p 9 -m 4096 \=0D + -object memory-backend-file,id=3Dmem,size=3D4096M,mem-path=3D/mnt/huge= ,share=3Don \=0D + -numa node,memdev=3Dmem -mem-prealloc -drive file=3D/home/osimg/ubuntu= 20-04.img \=0D + -chardev socket,path=3D/tmp/vm1_qga0.sock,server,nowait,id=3Dvm1_qga0 = -device virtio-serial \=0D + -device virtserialport,chardev=3Dvm1_qga0,name=3Dorg.qemu.guest_agent.= 2 -daemonize \=0D + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev= =3Dnttsip1 \=0D + -netdev user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6002-:22 \=0D + -chardev socket,id=3Dchar0,path=3D./vhost-net0,server \=0D + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce,queu= es=3D8 \=0D + -device virtio-net-pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,disabl= e-modern=3Dfalse,mrg_rxbuf=3Don,\=0D + mq=3Don,vectors=3D40,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_ts= o4=3Don,guest_ecn=3Don,guest_ufo=3Don,host_ufo=3Don -vnc :10=0D +=0D + taskset -c 17-27 qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -s= mp 9 -m 4096 \=0D + -object memory-backend-file,id=3Dmem,size=3D4096M,mem-path=3D/mnt/huge= ,share=3Don \=0D + -numa node,memdev=3Dmem -mem-prealloc -drive file=3D/home/osimg/ubuntu= 20-04-2.img \=0D + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga0 = -device virtio-serial \=0D + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agent.= 2 -daemonize \=0D + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev= =3Dnttsip1 \=0D + -netdev user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6003-:22 \=0D + -chardev socket,id=3Dchar0,path=3D./vhost-net1,server \=0D + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce,queu= es=3D8 \=0D + -device virtio-net-pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:02,disabl= e-modern=3Dfalse,mrg_rxbuf=3Don,mq=3Don,\=0D + vectors=3D40,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_tso4=3Don,= guest_ecn=3Don,guest_ufo=3Don,host_ufo=3Don -vnc :12=0D +=0D +4. On VM1 and VM2, bind virtio device with vfio-pci driver, as common step= 2.=0D +=0D +5. Launch testpmd in VM1::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 = -- -i --tx-offloads=3D0x00 --enable-hw-vlan-strip \=0D + --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024 --max-pkt-len=3D9600 --r= x-offloads=3D0x00002000=0D + testpmd>set fwd mac=0D + testpmd>start=0D +=0D +6. Launch testpmd in VM2, sent imix pkts from VM2::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 = -- -i --tx-offloads=3D0x00 --enable-hw-vlan-strip \=0D + --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024 --max-pkt-len=3D9600 --r= x-offloads=3D0x00002000=0D + testpmd>set fwd mac=0D + testpmd>set txpkts 64,256,512,1024,2000,64,256,512,1024,2000=0D + testpmd>start tx_first 1=0D +=0D +7. Check imix packets can looped between two VMs and 4 queues (queue0 to = queue3) have packets rx/tx::=0D +=0D + testpmd>show port stats all=0D + testpmd>stop=0D +=0D +=0D +8. Relaunch and start vhost side testpmd with 8 queues::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 = --file-prefix=3Dvhost \=0D + -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 000= 0:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \=0D + -a 0000:80:04.0 -a 0000:80:04.1 -a 0000:80:04.2 -a 0000:80:04.3 -a 000= 0:80:04.4 -a 0000:80:04.5 -a 0000:80:04.6 -a 0000:80:04.7 \=0D + --vdev 'net_vhost0,iface=3Dvhost-net0,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \=0D + --vdev 'net_vhost1,iface=3Dvhost-net1,client=3D1,queues=3D8,dmas=3D[tx= q0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]' \=0D + -- -i --nb-cores=3D4 --txd=3D1024 --rxd=3D1024 --rxq=3D8 --txq=3D8 \=0D + --lcore-dma=3D[lcore2@0000:00:04.0,lcore2@0000:00:04.1,lcore2@0000:00:= 04.2,lcore2@0000:00:04.3,lcore3@0000:00:04.4,lcore3@0000:00:04.5,lcore3@000= 0:00:04.6,lcore3@0000:00:04.7,\=0D + lcore4@0000:80:04.0,lcore4@0000:80:04.1,lcore4@0000:80:04.2,lcore4@000= 0:80:04.3,lcore5@0000:80:04.4,lcore5@0000:80:04.5,lcore5@0000:80:04.6,lcore= 5@0000:80:04.7]=0D + testpmd>start=0D +=0D +9. Send pkts by testpmd in VM2, check imix packets can looped between two = VMs and 8 queues all have packets rx/tx::=0D +=0D + testpmd>stop=0D + testpmd>start tx_first 1=0D + testpmd>show port stats all=0D + testpmd>stop=0D +=0D +10. Rerun step 7-8 for 10 times.=0D +=0D +Test Case 3: VM2VM virtio-pmd packed ring mergeable path 8 queues CBDMA en= able test=0D +--------------------------------------------------------------------------= ---------=0D +This case uses testpmd and QEMU to test packed ring mergeable path with 8 = queues and CBDMA enable, and change VM1 from packed ring path to splirt rin= g path to test.=0D +=0D +1. Bind 16 CBDMA channels to vfio-pci, as common step 1.=0D +=0D +2. Launch the testpmd with 2 vhost port and 8 queues by below commands::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-5 -n 4 = --file-prefix=3Dvhost \=0D + -a 0000:00:04.0 -a 0000:00:04.1 -a 0000:00:04.2 -a 0000:00:04.3 -a 000= 0:00:04.4 -a 0000:00:04.5 -a 0000:00:04.6 -a 0000:00:04.7 \=0D + -a 0000:80:04.0 -a 0000:80:04.1 -a 0000:80:04.2 -a 0000:80:04.3 -a 000= 0:80:04.4 -a 0000:80:04.5 -a 0000:80:04.6 -a 0000:80:04.7 \=0D + --vdev 'net_vhost0,iface=3Dvhost-net0,queues=3D8,dmas=3D[txq0;txq1;txq= 2;txq3;txq4;txq5;txq6;txq7]' \=0D + --vdev 'net_vhost1,iface=3Dvhost-net1,queues=3D8,dmas=3D[txq0;txq1;txq= 2;txq3;txq4;txq5;txq6;txq7]' \=0D + -- -i --nb-cores=3D4 --txd=3D1024 --rxd=3D1024 --rxq=3D8 --txq=3D8 \=0D + --lcore-dma=3D[lcore2@0000:00:04.0,lcore2@0000:00:04.1,lcore2@0000:00:= 04.2,lcore2@0000:00:04.3,lcore3@0000:00:04.4,lcore3@0000:00:04.5,lcore3@000= 0:00:04.6,lcore3@0000:00:04.7,\=0D + lcore4@0000:80:04.0,lcore4@0000:80:04.1,lcore4@0000:80:04.2,lcore4@000= 0:80:04.3,lcore5@0000:80:04.4,lcore5@0000:80:04.5,lcore5@0000:80:04.6,lcore= 5@0000:80:04.7]=0D + testpmd>start=0D +=0D +3. Launch VM1 and VM2 with qemu::=0D +=0D + taskset -c 6-16 qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -sm= p 9 -m 4096 \=0D + -object memory-backend-file,id=3Dmem,size=3D4096M,mem-path=3D/mnt/huge= ,share=3Don \=0D + -numa node,memdev=3Dmem -mem-prealloc -drive file=3D/home/osimg/ubuntu= 20-04.img \=0D + -chardev socket,path=3D/tmp/vm1_qga0.sock,server,nowait,id=3Dvm1_qga0 = -device virtio-serial \=0D + -device virtserialport,chardev=3Dvm1_qga0,name=3Dorg.qemu.guest_agent.= 2 -daemonize \=0D + -monitor unix:/tmp/vm1_monitor.sock,server,nowait -device e1000,netdev= =3Dnttsip1 \=0D + -netdev user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6002-:22 \=0D + -chardev socket,id=3Dchar0,path=3D./vhost-net0 \=0D + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce,queu= es=3D8 \=0D + -device virtio-net-pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,disabl= e-modern=3Dfalse,mrg_rxbuf=3Don,\=0D + mq=3Don,vectors=3D40,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_ts= o4=3Don,guest_ecn=3Don,guest_ufo=3Don,host_ufo=3Don,packed=3Don -vnc :10=0D +=0D + taskset -c 17-27 qemu-system-x86_64 -name vm2 -enable-kvm -cpu host -s= mp 9 -m 4096 \=0D + -object memory-backend-file,id=3Dmem,size=3D4096M,mem-path=3D/mnt/huge= ,share=3Don \=0D + -numa node,memdev=3Dmem -mem-prealloc -drive file=3D/home/osimg/ubuntu= 20-04-2.img \=0D + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga0 = -device virtio-serial \=0D + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agent.= 2 -daemonize \=0D + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev= =3Dnttsip1 \=0D + -netdev user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6003-:22 \=0D + -chardev socket,id=3Dchar0,path=3D./vhost-net1 \=0D + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce,queu= es=3D8 \=0D + -device virtio-net-pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:02,disabl= e-modern=3Dfalse,mrg_rxbuf=3Don,mq=3Don,\=0D + vectors=3D40,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_tso4=3Don,= guest_ecn=3Don,guest_ufo=3Don,host_ufo=3Don,packed=3Don -vnc :12=0D +=0D +4. On VM1 and VM2, bind virtio device with vfio-pci driver, as common step= 2.=0D +=0D +5. Launch testpmd in VM1::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 = -- -i --tx-offloads=3D0x00 --enable-hw-vlan-strip \=0D + --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024 --max-pkt-len=3D9600 --r= x-offloads=3D0x00002000=0D + testpmd>set fwd mac=0D + testpmd>start=0D +=0D +6. Launch testpmd in VM2, sent imix pkts from VM2::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 = -- -i --tx-offloads=3D0x00 --enable-hw-vlan-strip \=0D + --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024 --max-pkt-len=3D9600 --r= x-offloads=3D0x00002000=0D + testpmd>set fwd mac=0D + testpmd>set txpkts 64,256,512,1024,2000,64,256,512,1024,2000=0D + testpmd>start tx_first 1=0D +=0D +7. Check imix packets can looped between two VMs and 8 queues all have pac= kets rx/tx::=0D +=0D + testpmd>show port stats all=0D + testpmd>stop=0D +=0D +8. Quit VM2 and relaunch VM2 with split ring::=0D +=0D + taskset -c 6-16 qemu-system-x86_64 -name vm1 -enable-kvm -cpu host -sm= p 9 -m 4096 \=0D + -object memory-backend-file,id=3Dmem,size=3D4096M,mem-path=3D/mnt/huge= ,share=3Don \=0D + -numa node,memdev=3Dmem -mem-prealloc -drive file=3D/home/osimg/ubuntu= 20-04.img \=0D + -chardev socket,path=3D/tmp/vm2_qga0.sock,server,nowait,id=3Dvm2_qga0 = -device virtio-serial \=0D + -device virtserialport,chardev=3Dvm2_qga0,name=3Dorg.qemu.guest_agent.= 2 -daemonize \=0D + -monitor unix:/tmp/vm2_monitor.sock,server,nowait -device e1000,netdev= =3Dnttsip1 \=0D + -netdev user,id=3Dnttsip1,hostfwd=3Dtcp:127.0.0.1:6002-:22 \=0D + -chardev socket,id=3Dchar0,path=3D./vhost-net0 \=0D + -netdev type=3Dvhost-user,id=3Dnetdev0,chardev=3Dchar0,vhostforce,queu= es=3D8 \=0D + -device virtio-net-pci,netdev=3Dnetdev0,mac=3D52:54:00:00:00:01,disabl= e-modern=3Dfalse,mrg_rxbuf=3Don,\=0D + mq=3Don,vectors=3D40,csum=3Don,guest_csum=3Don,host_tso4=3Don,guest_ts= o4=3Don,guest_ecn=3Don,guest_ufo=3Don,host_ufo=3Don -vnc :10=0D +=0D +9. Bind virtio device with vfio-pci driver::=0D +=0D + modprobe vfio=0D + modprobe vfio-pci=0D + echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode=0D + # ./usertools/dpdk-devbind.py --force --bind=3Dvfio-pci 0000= :00:05.0=0D +=0D +10. Launch testpmd in VM2 and send imix pkts from VM2::=0D +=0D + # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 = -- -i --tx-offloads=3D0x00 --enable-hw-vlan-strip \=0D + --txq=3D8 --rxq=3D8 --txd=3D1024 --rxd=3D1024 --max-pkt-len=3D9600 --r= x-offloads=3D0x00002000=0D + testpmd>set fwd mac=0D + testpmd>set txpkts 64,256,512,1024,2000,64,256,512,1024,2000=0D +=0D +11. Check imix packets can looped between two VMs and 8 queues all have pa= ckets rx/tx::=0D +=0D + testpmd>show port stats all=0D + testpmd>stop=0D +=0D --=20 2.25.1