From patchwork Tue Dec 13 06:56:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 120787 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A75D3A0540; Tue, 13 Dec 2022 08:03:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A057440684; Tue, 13 Dec 2022 08:03:46 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id AC1BE40146 for ; Tue, 13 Dec 2022 08:03:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670915024; x=1702451024; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NUdwx/UcVtq8R7MmzH1iU2ibLo9GLjShz80I4vLabF8=; b=iMI9mOCme7dBscCMfL0kNKdUTQA+gYzDlLmINMCxhtBja3uyQvR/0a+9 Dq794ZnYOeGJHRoHT1hyTS/YlDB6g2H67jEvvgLc5uRPqiRNXgkPQ35gS pg8OW3MkbGDzxWl/IXMEC/ehOn6yrscneyr0EwT4/UYDSoI/0R6FtgD3W BkPtxMiVgSdlSqe3C24Ff9Rfr1v5mHMMZ9kL0vNe0OzeV/9bDgVPIGJ8g OTOZj5rZHplnWn7njVUAaiSVEEXOpuB9/msIw0VjkWu7oGED1VODJJjhN GZzRG9Om4gFyTNHFGGXNF/FDDkjebr2chWuGjMQ2Jvtm/3qsB29q9gNr+ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="319206086" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="319206086" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 23:03:43 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="772881468" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="772881468" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 23:03:42 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 1/2] test_plans/vm2vm_virtio_pmd_test_plan: modify testcase name and format Date: Tue, 13 Dec 2022 14:56:18 +0800 Message-Id: <20221213065618.3354678-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Modify testplan formart and case name to make it clearer. Signed-off-by: Wei Ling --- test_plans/vm2vm_virtio_pmd_test_plan.rst | 60 ++++++++++++++--------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/test_plans/vm2vm_virtio_pmd_test_plan.rst b/test_plans/vm2vm_virtio_pmd_test_plan.rst index 7f47bd02..284b9081 100644 --- a/test_plans/vm2vm_virtio_pmd_test_plan.rst +++ b/test_plans/vm2vm_virtio_pmd_test_plan.rst @@ -13,13 +13,15 @@ Test flow ========= Virtio-pmd <-> Vhost-user <-> Testpmd <-> Vhost-user <-> Virtio-pmd -Test Case 1: VM2VM vhost-user/virtio-pmd with vector_rx path -============================================================ +Test Case 1: VM2VM vhost-user/virtio0.95-pmd with vector_rx path +================================================================ 1. Bind one physical nic port to vfio-pci, then launch the testpmd by below commands:: rm -rf vhost-net* - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start @@ -47,15 +49,15 @@ Test Case 1: VM2VM vhost-user/virtio-pmd with vector_rx path -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :12 -3. On VM1, bind vdev with vfio-pci driver,then run testpmd, set rxonly for virtio1, [0000:xx.00] is [Bus,Device,Function] of virtio-net:: +3. On VM1, bind vdev with vfio-pci driver,then run testpmd, set rxonly for virtio1, [0000:00:04.0] is [Bus,Device,Function] of virtio-net:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:xx.00,vectorized=1 -- -i --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:00:04.0,vectorized=1 -- -i --txd=1024 --rxd=1024 testpmd>set fwd rxonly testpmd>start -4. On VM2, bind vdev with vfio-pci driver,then run testpmd, set txonly for virtio2 and send 64B packets, [0000:xx.00] is [Bus,Device,Function] of virtio-net:: +4. On VM2, bind vdev with vfio-pci driver,then run testpmd, set txonly for virtio2 and send 64B packets, [0000:00:04.0] is [Bus,Device,Function] of virtio-net:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:xx.00,vectorized=1 -- -i --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:00:04.0,vectorized=1 -- -i --txd=1024 --rxd=1024 testpmd>set fwd txonly testpmd>set txpkts 64 testpmd>start tx_first 32 @@ -68,13 +70,15 @@ Test Case 1: VM2VM vhost-user/virtio-pmd with vector_rx path RX-pps: xxx TX-pps: xxx -Test Case 2: VM2VM vhost-user/virtio-pmd with normal path -========================================================= +Test Case 2: VM2VM vhost-user/virtio0.95-pmd with normal path +============================================================= 1. Bind one physical nic port to vfio-pci, then launch the testpmd by below commands:: rm -rf vhost-net* - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start @@ -129,7 +133,9 @@ Test Case 3: VM2VM vhost-user/virtio1.0-pmd with vector_rx path 1. Bind one physical nic port to vfio-pci, then launch the testpmd by below commands:: rm -rf vhost-net* - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start @@ -157,15 +163,15 @@ Test Case 3: VM2VM vhost-user/virtio1.0-pmd with vector_rx path -netdev type=vhost-user,id=netdev0,chardev=char0,vhostforce \ -device virtio-net-pci,netdev=netdev0,mac=52:54:00:00:00:02,disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on -vnc :12 -3. On VM1, bind vdev with vfio-pci driver,then run testpmd, set rxonly for virtio1, [0000:xx.00] is [Bus,Device,Function] of virtio-net:: +3. On VM1, bind vdev with vfio-pci driver,then run testpmd, set rxonly for virtio1, [0000:00:04.0] is [Bus,Device,Function] of virtio-net:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:xx.00,vectorized=1 -- -i --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:00:04.0,vectorized=1 -- -i --txd=1024 --rxd=1024 testpmd>set fwd rxonly testpmd>start -4. On VM2, bind vdev with vfio-pci driver,then run testpmd, set txonly for virtio2, [0000:xx.00] is [Bus,Device,Function] of virtio-net:: +4. On VM2, bind vdev with vfio-pci driver,then run testpmd, set txonly for virtio2, [0000:00:04.0] is [Bus,Device,Function] of virtio-net:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:xx.00,vectorized=1 -- -i --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0x3 -n 4 -a 0000:00:04.0,vectorized=1 -- -i --txd=1024 --rxd=1024 testpmd>set fwd txonly testpmd>set txpkts 64 testpmd>start tx_first 32 @@ -184,7 +190,9 @@ Test Case 4: VM2VM vhost-user/virtio1.0-pmd with normal path 1. Bind one physical nic port to vfio-pci, then launch the testpmd by below commands:: rm -rf vhost-net* - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start @@ -233,12 +241,14 @@ Test Case 4: VM2VM vhost-user/virtio1.0-pmd with normal path RX-pps: xxx TX-pps: xxx -Test Case 5: VM2VM vhost-user/virtio-pmd mergeable path with payload valid check -================================================================================ +Test Case 5: VM2VM vhost-user/virtio0.95-pmd mergeable path with payload valid check +==================================================================================== 1. Bind virtio with vfio-pci driver, launch the testpmd by below commands:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start @@ -313,7 +323,9 @@ Test Case 6: VM2VM vhost-user/virtio1.0-pmd mergeable path with payload valid ch 1. Bind virtio with vfio-pci driver, launch the testpmd by below commands:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start @@ -388,7 +400,9 @@ Test Case 7: VM2VM vhost-user/virtio1.1-pmd mergeable path with payload valid ch 1. Bind virtio with vfio-pci driver, launch the testpmd by below commands:: - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start @@ -464,7 +478,9 @@ Test Case 8: VM2VM vhost-user/virtio1.1-pmd with normal path 1. Bind one physical nic port to vfio-pci, then launch the testpmd by below commands:: rm -rf vhost-net* - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xc0000 -n 4 --no-pci --file-prefix=vhost \ + --vdev 'net_vhost0,iface=vhost-net0,queues=1' --vdev 'net_vhost1,iface=vhost-net1,queues=1' \ + -- -i --nb-cores=1 --txd=1024 --rxd=1024 testpmd>set fwd mac testpmd>start From patchwork Tue Dec 13 06:56:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 120788 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB63CA0540; Tue, 13 Dec 2022 08:03:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6C1A410D3; Tue, 13 Dec 2022 08:03:55 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 6005E40146 for ; Tue, 13 Dec 2022 08:03:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670915034; x=1702451034; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=lqs8EFZz/NFbKRcfT152iHIs1BlEhobqxCmZGJXQ62g=; b=nlB8dpgyeoJrBTcI/HF/XvpASaZM1I0xcgidOpTO7QiqWFwG+9BN1ddV O47kYdTsAvKQefdrKuA3K9wdLl6GAmgQUE4WLt7CMG0Ma9AhjVJ1iedDw tPIzIsopWGU/yJ8fdWYZI7MFV8ntP/RdWWSg2NeAoiUSO8+/Zs12388vn NtoDomJAbM4pWFxfttXaKgPyxX10oh9VruS08awg51A1QReF/qmUyH6Bn flOxBmF+F7DJIG/uhGyGt9uU8WgUmmgi/BOk62V9QrlxRW/BPs9gZQLvJ 1HQ8Tpx6FFqeX1QDzQYCHeb2vYFNS2WWFm3whEQ4s+ixzZo53NuQ7YAYw Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="319206127" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="319206127" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 23:03:52 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="772881511" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="772881511" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 23:03:51 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V1 2/2] tests/vm2vm_virtio_pmd: modify testcase name sync with testplan Date: Tue, 13 Dec 2022 14:56:28 +0800 Message-Id: <20221213065628.3354740-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Modify case name sync with testplan and adjust case order. Signed-off-by: Wei Ling Acked-by: Lijuan Tu --- tests/TestSuite_vm2vm_virtio_pmd.py | 145 ++++++++++++---------------- 1 file changed, 62 insertions(+), 83 deletions(-) diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py index b4604626..5721e829 100644 --- a/tests/TestSuite_vm2vm_virtio_pmd.py +++ b/tests/TestSuite_vm2vm_virtio_pmd.py @@ -2,15 +2,6 @@ # Copyright(c) 2019 Intel Corporation # -""" -DPDK Test suite. - -Test cases for Vhost-user/Virtio-pmd VM2VM -Test cases for vhost/virtio-pmd(0.95/1.0) VM2VM test with 3 rx/tx paths, -includes mergeable, normal, vector_rx. -Test cases fro vhost/virtio-pmd(1.1) VM2VM test with mergeable path. -About mergeable path check the large packet payload. -""" import re import time @@ -210,11 +201,6 @@ class TestVM2VMVirtioPMD(TestCase): opt_queue=None, vm_config="vhost_sample", ): - """ - start two VM, each VM has one virtio device - """ - # for virtio 0.95, start vm with "disable-modern=true" - # for virito 1.0, start vm with "disable-modern=false" vm_params = {} if opt_queue is not None: @@ -234,7 +220,7 @@ class TestVM2VMVirtioPMD(TestCase): vm_info.set_vm_device(**vm_params) time.sleep(3) try: - vm_dut = vm_info.start() + vm_dut = vm_info.start(set_target=True, bind_dev=True) if vm_dut is None: raise Exception("Set up VM ENV failed") except Exception as e: @@ -269,11 +255,11 @@ class TestVM2VMVirtioPMD(TestCase): start to send packets and verify it """ # start to send packets - self.vm_dut[0].send_expect("set fwd rxonly", "testpmd> ", 10) - self.vm_dut[0].send_command("start", 3) - self.vm_dut[1].send_expect("set fwd txonly", "testpmd> ", 10) - self.vm_dut[1].send_expect("set txpkts 64", "testpmd> ", 10) - self.vm_dut[1].send_expect("start tx_first 32", "testpmd> ", 10) + self.vm_dut[0].send_expect("set fwd rxonly", "testpmd> ") + self.vm_dut[0].send_expect("start", "testpmd> ") + self.vm_dut[1].send_expect("set fwd txonly", "testpmd> ") + self.vm_dut[1].send_expect("set txpkts 64", "testpmd> ") + self.vm_dut[1].send_expect("start tx_first 32", "testpmd> ") Mpps = self.calculate_avg_throughput() self.update_table_info(mode, 64, Mpps, path) self.result_table_print() @@ -314,38 +300,46 @@ class TestVM2VMVirtioPMD(TestCase): self.dut.close_session(self.virtio_user0) self.virtio_user0 = None - def test_vhost_vm2vm_virtio_pmd_with_normal_path(self): + def test_vm2vm_vhost_user_virtio095_pmd_with_vector_rx_path(self): """ - Test Case 2: vhost-user + virtio-pmd with normal path + Test Case 1: VM2VM vhost-user/virtio0.95-pmd with vector_rx path """ + path_mode = "vector_rx" setting_args = "disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" - path_mode = "normal" self.get_core_list(2) self.start_vhost_testpmd() self.start_vms(setting_args=setting_args) - self.start_vm_testpmd(self.vm_dut[0], path_mode) - self.start_vm_testpmd(self.vm_dut[1], path_mode) - self.send_and_verify(mode="virtio 0.95 normal path", path=path_mode) + self.start_vm_testpmd( + self.vm_dut[0], + path_mode, + virtio_net_pci=self.vm_dut[0].ports_info[0]["pci"], + ) + self.start_vm_testpmd( + self.vm_dut[1], + path_mode, + virtio_net_pci=self.vm_dut[1].ports_info[0]["pci"], + ) + self.send_and_verify(mode="virtio 0.95 vector_rx", path=path_mode) - def test_vhost_vm2vm_virito_10_pmd_with_normal_path(self): + def test_vm2vm_vhost_user_virtio095_pmd_with_normal_path(self): """ - Test Case 4: vhost-user + virtio1.0-pmd with normal path + Test Case 2: VM2VM vhost-user/virtio0.95-pmd with normal path """ + setting_args = "disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" path_mode = "normal" - setting_args = "disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" self.get_core_list(2) self.start_vhost_testpmd() self.start_vms(setting_args=setting_args) self.start_vm_testpmd(self.vm_dut[0], path_mode) self.start_vm_testpmd(self.vm_dut[1], path_mode) - self.send_and_verify(mode="virtio 1.0 normal path", path=path_mode) + self.send_and_verify(mode="virtio 0.95 normal path", path=path_mode) - def test_vhost_vm2vm_virtio_pmd_with_vector_rx_path(self): + def test_vm2vm_vhost_user_virtio10_pmd_with_vector_rx_path(self): """ - Test Case 1: vhost-user + virtio-pmd with vector_rx path + Test Case 3: VM2VM vhost-user/virtio1.0-pmd with vector_rx path """ path_mode = "vector_rx" - setting_args = "disable-modern=true,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" + setting_args = "disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" self.get_core_list(2) self.start_vhost_testpmd() self.start_vms(setting_args=setting_args) @@ -359,32 +353,26 @@ class TestVM2VMVirtioPMD(TestCase): path_mode, virtio_net_pci=self.vm_dut[1].ports_info[0]["pci"], ) - self.send_and_verify(mode="virtio 0.95 vector_rx", path=path_mode) + self.send_and_verify(mode="virtio 1.0 vector_rx", path=path_mode) - def test_vhost_vm2vm_virtio_10_pmd_with_vector_rx_path(self): + def test_vhost_vm2vm_virito_10_pmd_with_normal_path(self): """ - Test Case 3: vhost-user + virtio1.0-pmd with vector_rx path + Test Case 4: VM2VM vhost-user/virtio1.0-pmd with normal path """ - path_mode = "vector_rx" + path_mode = "normal" setting_args = "disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" self.get_core_list(2) self.start_vhost_testpmd() self.start_vms(setting_args=setting_args) - self.start_vm_testpmd( - self.vm_dut[0], - path_mode, - virtio_net_pci=self.vm_dut[0].ports_info[0]["pci"], - ) - self.start_vm_testpmd( - self.vm_dut[1], - path_mode, - virtio_net_pci=self.vm_dut[1].ports_info[0]["pci"], - ) - self.send_and_verify(mode="virtio 1.0 vector_rx", path=path_mode) + self.start_vm_testpmd(self.vm_dut[0], path_mode) + self.start_vm_testpmd(self.vm_dut[1], path_mode) + self.send_and_verify(mode="virtio 1.0 normal path", path=path_mode) - def test_vhost_vm2vm_virito_pmd_with_mergeable_path(self): + def test_vm2vm_vhost_user_virtio095_pmd_with_mergeable_path_with_payload_valid_check( + self, + ): """ - Test Case 5: vhost-user + virtio-pmd with mergeable path test with payload check + Test Case 5: VM2VM vhost-user/virtio0.95-pmd mergeable path with payload valid check """ path_mode = "mergeable" setting_args = "disable-modern=true,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" @@ -393,8 +381,6 @@ class TestVM2VMVirtioPMD(TestCase): self.get_core_list(2) self.start_vhost_testpmd() self.start_vms(setting_args=setting_args) - # git the vm enough huge to run pdump - self.vm_dut[0].set_huge_pages(2048) # start testpmd and pdump in VM0 self.start_vm_testpmd(self.vm_dut[0], path_mode, extern_param) self.vm_dut[0].send_expect("set fwd rxonly", "testpmd> ", 30) @@ -408,9 +394,11 @@ class TestVM2VMVirtioPMD(TestCase): # check the packet in vm0 self.check_packet_payload_valid(self.vm_dut[0]) - def test_vhost_vm2vm_virito_10_pmd_with_mergeable_path(self): + def test_vm2vm_vhost_user_virtio10_pmd_with_mergeable_path_with_payload_valid_check( + self, + ): """ - Test Case 6: vhost-user + virtio1.0-pmd with mergeable path test with payload check + Test Case 6: VM2VM vhost-user/virtio1.0-pmd mergeable path with payload valid check """ path_mode = "mergeable" setting_args = "disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on" @@ -419,8 +407,6 @@ class TestVM2VMVirtioPMD(TestCase): self.get_core_list(2) self.start_vhost_testpmd() self.start_vms(setting_args=setting_args) - # git the vm enough huge to run pdump - self.vm_dut[0].set_huge_pages(2048) # start testpmd and pdump in VM0 self.start_vm_testpmd(self.vm_dut[0], path_mode, extern_param) self.vm_dut[0].send_expect("set fwd rxonly", "testpmd> ", 30) @@ -434,22 +420,11 @@ class TestVM2VMVirtioPMD(TestCase): # check the packet in vm0 self.check_packet_payload_valid(self.vm_dut[0]) - def test_vhost_vm2vm_virito_11_pmd_with_normal_path(self): - """ - Test Case 8: vhost-user + virtio1.0-pmd with normal path - """ - path_mode = "normal" - setting_args = "disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on" - self.get_core_list(2) - self.start_vhost_testpmd() - self.start_vms(setting_args=setting_args) - self.start_vm_testpmd(self.vm_dut[0], path_mode) - self.start_vm_testpmd(self.vm_dut[1], path_mode) - self.send_and_verify(mode="virtio 1.0 normal path", path=path_mode) - - def test_vhost_vm2vm_virito_11_pmd_with_mergeable_path(self): + def test_vm2vm_vhost_user_virtio11_pmd_with_mergeable_path_with_payload_valid_check( + self, + ): """ - Test Case 7: vhost-user + virtio1.0-pmd with mergeable path test with payload check + Test Case 7: VM2VM vhost-user/virtio1.1-pmd mergeable path with payload valid check """ path_mode = "mergeable" setting_args = "disable-modern=false,mrg_rxbuf=on,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on" @@ -458,8 +433,6 @@ class TestVM2VMVirtioPMD(TestCase): self.get_core_list(2) self.start_vhost_testpmd() self.start_vms(setting_args=setting_args) - # git the vm enough huge to run pdump - self.vm_dut[0].set_huge_pages(2048) # start testpmd and pdump in VM0 self.start_vm_testpmd(self.vm_dut[0], path_mode, extern_param) self.vm_dut[0].send_expect("set fwd rxonly", "testpmd> ", 30) @@ -473,6 +446,19 @@ class TestVM2VMVirtioPMD(TestCase): # check the packet in vm0 self.check_packet_payload_valid(self.vm_dut[0]) + def test_vhost_vm2vm_virito_11_pmd_with_normal_path(self): + """ + Test Case 8: VM2VM vhost-user/virtio1.1-pmd with normal path + """ + path_mode = "normal" + setting_args = "disable-modern=false,mrg_rxbuf=off,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,packed=on" + self.get_core_list(2) + self.start_vhost_testpmd() + self.start_vms(setting_args=setting_args) + self.start_vm_testpmd(self.vm_dut[0], path_mode) + self.start_vm_testpmd(self.vm_dut[1], path_mode) + self.send_and_verify(mode="virtio 1.1 normal path", path=path_mode) + def check_port_stats_result(self, vm_dut, queue_num=0): out = vm_dut.send_expect("show port stats all", "testpmd> ", 30) rx_packets = re.findall(r"RX-packets: (\w+)", out) @@ -480,7 +466,6 @@ class TestVM2VMVirtioPMD(TestCase): self.verify(int(rx_packets[0]) > 1, "RX packets no correctly") self.verify(int(tx_packets[0]) > 1, "TX packets no correctly") self.check_packets_of_each_queue(vm_dut, queue_num) - # vm_dut.send_expect('stop', 'testpmd> ', 30) def check_packets_of_each_queue(self, vm_dut, queue_num): """ @@ -504,7 +489,6 @@ class TestVM2VMVirtioPMD(TestCase): def prepare_test_env( self, - cbdma=False, no_pci=True, client_mode=False, enable_queues=1, @@ -513,12 +497,8 @@ class TestVM2VMVirtioPMD(TestCase): server_mode=False, opt_queue=None, rxq_txq=None, - iova_mode=False, vm_config="vhost_sample", ): - """ - start vhost testpmd and qemu, and config the vm env - """ self.start_vhost_testpmd_cbdma( no_pci=no_pci, client_mode=client_mode, @@ -576,13 +556,12 @@ class TestVM2VMVirtioPMD(TestCase): ) self.command_line = testcmd + eal_params + vdev1 + vdev2 + params self.pmd_vhost.execute_cmd(self.command_line, timeout=30) - self.pmd_vhost.execute_cmd("vhost enable tx all", timeout=30) self.pmd_vhost.execute_cmd("start", timeout=30) def tear_down(self): - # - # Run after each test case. - # + """ + Run after each test case. + """ self.stop_all_apps() self.dut.kill_all()