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 77727A057F; Tue, 22 Nov 2022 10:05:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7159E42BAC; Tue, 22 Nov 2022 10:05:12 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 7A000427EB for ; Tue, 22 Nov 2022 10:05:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669107910; x=1700643910; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=z/yvUtAr9jqD2mFqSwyCuqtaOiaY/1KtoFy8ri/j88E=; b=IEQPb188S6Kc22Rxt/OGopX18V9w2S9FeQ4e9Flj8d83JEG5pfZR4BVK iHFMNYHIJ61NN8t7PxR+G2t1jB/Cbghq2Eyaa211AvzMKpIQRmB0U1E/Y wMfbYeCPeBjP4Osvn1QkLzewrzISD8XoWvS+JebQHqgQIfdQRlzKX6YX2 309S/qh7qWaw8WL6ZCcZIQIsfUakelZn3HeDWw3Vn1cnF5NRYxkm27IjQ KCA5jYDbEjrFZx6yemICIxtFYhACYZckaYPNb4CA4z7zQ10aKvgAubbv7 6qjieTHmlbHK4FDlL+8o/ACCGgP4TpgSMHxWsEPD1zdVYwrVWAKyDLAmD A==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="294160865" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208,223";a="294160865" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 01:05:06 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="766274661" X-IronPort-AV: E=Sophos;i="5.96,183,1665471600"; d="scan'208,223";a="766274661" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2022 01:05:02 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 2/3] tests/vhost_cbdma: modify the dmas parameter by DPDK changed Date: Tue, 22 Nov 2022 16:59:17 +0800 Message-Id: <20221122085917.2898758-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 >From DPDK-22.11, the dmas parameter have been changed by the local patch, so modify the dmas parameter in the testsuite. Signed-off-by: Wei Ling --- tests/TestSuite_vhost_cbdma.py | 991 +++++++++++++++------------------ 1 file changed, 446 insertions(+), 545 deletions(-) diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py index 88ee83df..b1492004 100644 --- a/tests/TestSuite_vhost_cbdma.py +++ b/tests/TestSuite_vhost_cbdma.py @@ -70,7 +70,7 @@ class TestVhostCbdma(TestCase): self.test_result = {} self.nb_desc = self.test_parameters.get(list(self.test_parameters.keys())[0])[0] self.dut.send_expect("killall -I %s" % self.testpmd_name, "#", 20) - self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#") + #self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#") self.mode_list = [] def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num, allow_diff_socket=False): @@ -189,29 +189,17 @@ class TestVhostCbdma(TestCase): Test Case 1: PVP split ring all path multi-queues vhost async operation with 1 to 1 mapping between vrings and CBDMA virtual channels """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - ) - ) - vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[txq0;txq1;rxq0;rxq1]'" - ) - vhost_param = ( - "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "rxq0@%s;" \ + "rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[%s]'" % dmas + vhost_param = "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024" allow_pci = [self.dut.ports_info[0]["pci"]] for i in self.cbdma_list: allow_pci.append(i) @@ -251,6 +239,7 @@ class TestVhostCbdma(TestCase): if not self.check_2M_env: self.vhost_user_pmd.quit() + vhost_eal_param += ",dma-ring-size=4096" self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -294,30 +283,44 @@ class TestVhostCbdma(TestCase): self, ): """ - Test Case 2: PVP split ring all path multi-queues vhost async operations with M to 1 mapping between vrings and CBDMA virtual channels + Test Case 2: PVP split ring all path multi-queues vhost async operations test with one CBDMA device being shared among multiple tx/rx queues """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[3], - self.cbdma_list[2], - self.vhost_core_list[4], - self.cbdma_list[3], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;rxq0;rxq1;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "txq7@%s;" \ + "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" %( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas + vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" allow_pci = [self.dut.ports_info[0]["pci"]] for i in self.cbdma_list: allow_pci.append(i) @@ -355,40 +358,110 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=8) self.virtio_user_pmd.quit() + self.vhost_user_pmd.quit() + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "txq7@%s;" \ + "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[3], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[3], + ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas + vhost_param = "--nb-cores=6 --txq=8 --rxq=8 --txd=1024 --rxd=1024" + self.start_vhost_testpmd( + cores=self.vhost_core_list, + param=vhost_param, + eal_param=vhost_eal_param, + ports=allow_pci, + iova_mode="va", + ) + for key, path in SPLIT_RING_PATH.items(): + if key == "mergeable": + virtio_eal_param = ( + "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'" + % (self.virtio_mac, path) + ) + + mode = key + "_VA_diff" + self.mode_list.append(mode) + self.start_virtio_testpmd( + cores=self.virtio_core_list, + param=virtio_param, + eal_param=virtio_eal_param, + ) + self.send_imix_packets(mode=mode) + self.check_each_queue_of_port_packets(queues=8) + + mode += "_RestartVhost" + self.vhost_user_pmd.execute_cmd("start") + self.mode_list.append(mode) + self.send_imix_packets(mode=mode) + self.check_each_queue_of_port_packets(queues=8) + self.virtio_user_pmd.quit() + if not self.check_2M_env: self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[0], - self.vhost_core_list[3], - self.cbdma_list[0], - self.vhost_core_list[4], - self.cbdma_list[0], - self.vhost_core_list[5], - self.cbdma_list[0], - self.vhost_core_list[6], - self.cbdma_list[0], - self.vhost_core_list[7], - self.cbdma_list[0], - self.vhost_core_list[8], - self.cbdma_list[0], - ) - ) - vhost_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "txq7@%s;" \ + "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas + vhost_param = "--nb-cores=6 --txq=8 --rxq=8 --txd=1024 --rxd=1024" self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -397,7 +470,7 @@ class TestVhostCbdma(TestCase): iova_mode="pa", ) for key, path in SPLIT_RING_PATH.items(): - if key == "inorder_mergeable": + if key == "inorder_non_mergeable": virtio_eal_param = ( "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'" % (self.virtio_mac, path) @@ -432,42 +505,16 @@ class TestVhostCbdma(TestCase): self, ): """ - Test Case 3: PVP split ring dynamic queue number vhost async operations with M to N mapping between vrings and CBDMA virtual channels + Test Case 3: PVP split ring dynamic queue number vhost async operations with cbdma """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[2], - self.cbdma_list[4], - self.vhost_core_list[2], - self.cbdma_list[5], - self.vhost_core_list[2], - self.cbdma_list[6], - self.vhost_core_list[2], - self.cbdma_list[7], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - vhost_param = ( - "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s" %( + self.cbdma_list[0], + self.cbdma_list[1], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=64'" % dmas + vhost_param = "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024" allow_pci = [self.dut.ports_info[0]["pci"]] for i in self.cbdma_list: allow_pci.append(i) @@ -511,27 +558,17 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=1) self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[3], - self.cbdma_list[2], - self.vhost_core_list[4], - self.cbdma_list[3], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[rxq0;rxq1;rxq2;rxq3]'" - vhost_param = ( - "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=2048'" % dmas + vhost_param = "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024" self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -545,42 +582,35 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=4) self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[2], - self.cbdma_list[2], - self.vhost_core_list[2], - self.cbdma_list[3], - self.vhost_core_list[2], - self.cbdma_list[4], - self.vhost_core_list[2], - self.cbdma_list[5], - self.vhost_core_list[2], - self.cbdma_list[6], - self.vhost_core_list[2], - self.cbdma_list[7], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" %( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=64'" % dmas + vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -594,51 +624,35 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=8) self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[2], - self.cbdma_list[2], - self.vhost_core_list[3], - self.cbdma_list[3], - self.vhost_core_list[3], - self.cbdma_list[4], - self.vhost_core_list[3], - self.cbdma_list[5], - self.vhost_core_list[3], - self.cbdma_list[6], - self.vhost_core_list[4], - self.cbdma_list[4], - self.vhost_core_list[4], - self.cbdma_list[5], - self.vhost_core_list[4], - self.cbdma_list[6], - self.vhost_core_list[4], - self.cbdma_list[7], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" %( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[7], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas + vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -651,70 +665,6 @@ class TestVhostCbdma(TestCase): self.send_imix_packets(mode=mode) self.check_each_queue_of_port_packets(queues=8) - self.virtio_user_pmd.quit() - virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" - for key, path in SPLIT_RING_PATH.items(): - if key == "mergeable": - virtio_eal_param = ( - "--vdev 'net_virtio_user0,mac=%s,path=vhost-net0,%s,queues=8,server=1'" - % (self.virtio_mac, path) - ) - mode = key + "_VA_M:N_diff" - self.mode_list.append(mode) - self.start_virtio_testpmd( - cores=self.virtio_core_list, - param=virtio_param, - eal_param=virtio_eal_param, - ) - self.send_imix_packets(mode=mode) - self.check_each_queue_of_port_packets(queues=8) - - self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[0], - self.vhost_core_list[3], - self.cbdma_list[1], - self.vhost_core_list[3], - self.cbdma_list[2], - self.vhost_core_list[4], - self.cbdma_list[1], - self.vhost_core_list[4], - self.cbdma_list[2], - self.vhost_core_list[5], - self.cbdma_list[1], - self.vhost_core_list[5], - self.cbdma_list[2], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - param=vhost_param, - eal_param=vhost_eal_param, - ports=allow_pci, - iova_mode="pa", - ) - mode = "mergeable" + "_PA_M:N_diff" - self.mode_list.append(mode) - self.send_imix_packets(mode=mode) - self.check_each_queue_of_port_packets(queues=8) - self.test_target = self.running_case self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ self.test_target @@ -727,32 +677,22 @@ class TestVhostCbdma(TestCase): self, ): """ - Test Case 4: PVP packed ring all path multi-queues vhost async operations with 1 to 1 mapping between vrings and CBDMA virtual channels + Test Case 4: PVP packed ring all path multi-queues vhost async operation test with each tx/rx queue using one CBDMA device """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - ) - ) + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "rxq0@%s;" \ + "rxq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[txq0;txq1;rxq0;rxq1]'" - ) - vhost_param = ( - "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[%s]'" % dmas ) + vhost_param = "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024" allow_pci = [self.dut.ports_info[0]["pci"]] for i in self.cbdma_list: allow_pci.append(i) @@ -840,27 +780,41 @@ class TestVhostCbdma(TestCase): Test Case 5: PVP packed ring all path multi-queues vhost async operations with M to 1 mapping between vrings and CBDMA virtual channels """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[3], - self.cbdma_list[2], - self.vhost_core_list[4], - self.cbdma_list[3], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;rxq0;rxq1;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "txq7@%s;" \ + "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas + vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" allow_pci = [self.dut.ports_info[0]["pci"]] for i in self.cbdma_list: allow_pci.append(i) @@ -899,40 +853,110 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=8) self.virtio_user_pmd.quit() + + self.vhost_user_pmd.quit() + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "txq7@%s;" \ + "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[3], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[3], + ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas + self.start_vhost_testpmd( + cores=self.vhost_core_list, + param=vhost_param, + eal_param=vhost_eal_param, + ports=allow_pci, + iova_mode="va", + ) + virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" + for key, path in PACKED_RING_PATH.items(): + if key == "vectorized_path_not_power_of_2": + virtio_eal_param = ( + "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'" + % (self.virtio_mac, path) + ) + + mode = key + "_VA_diff" + self.mode_list.append(mode) + self.start_virtio_testpmd( + cores=self.virtio_core_list, + param=virtio_param, + eal_param=virtio_eal_param, + ) + self.send_imix_packets(mode=mode) + self.check_each_queue_of_port_packets(queues=8) + + mode += "_RestartVhost" + self.vhost_user_pmd.execute_cmd("start") + self.mode_list.append(mode) + self.send_imix_packets(mode=mode) + self.check_each_queue_of_port_packets(queues=8) + self.virtio_user_pmd.quit() + if not self.check_2M_env: self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[0], - self.vhost_core_list[3], - self.cbdma_list[0], - self.vhost_core_list[4], - self.cbdma_list[0], - self.vhost_core_list[5], - self.cbdma_list[0], - self.vhost_core_list[6], - self.cbdma_list[0], - self.vhost_core_list[7], - self.cbdma_list[0], - self.vhost_core_list[8], - self.cbdma_list[0], - ) - ) - vhost_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma - ) + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "txq7@%s;" \ + "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -942,10 +966,10 @@ class TestVhostCbdma(TestCase): ) virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" for key, path in PACKED_RING_PATH.items(): - if key == "inorder_mergeable": + if key == "vectorized_path_not_power_of_2": virtio_eal_param = ( - "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'" - % (self.virtio_mac, path) + "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'" + % (self.virtio_mac, path) ) mode = key + "_PA" @@ -980,39 +1004,14 @@ class TestVhostCbdma(TestCase): Test Case 6: PVP packed ring dynamic queue number vhost async operations with M to N mapping between vrings and CBDMA virtual channels """ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[1], - self.cbdma_list[2], - self.vhost_core_list[1], - self.cbdma_list[3], - self.vhost_core_list[2], - self.cbdma_list[4], - self.vhost_core_list[2], - self.cbdma_list[5], - self.vhost_core_list[2], - self.cbdma_list[6], - self.vhost_core_list[2], - self.cbdma_list[7], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" - vhost_param = ( - "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=64'" % dmas + vhost_param = "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024" + allow_pci = [self.dut.ports_info[0]["pci"]] for i in self.cbdma_list: allow_pci.append(i) @@ -1056,27 +1055,17 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=1) self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[3], - self.cbdma_list[2], - self.vhost_core_list[4], - self.cbdma_list[3], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[rxq0;rxq1;rxq2;rxq3]'" - vhost_param = ( - "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "rxq0@%s;" \ + "rxq1@%s;" \ + "rxq2@%s;" \ + "rxq3@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[0], + self.cbdma_list[1], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=2048'" % dmas + vhost_param = "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024" self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -1090,42 +1079,35 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=4) self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[1], - self.cbdma_list[1], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[2], - self.cbdma_list[2], - self.vhost_core_list[2], - self.cbdma_list[3], - self.vhost_core_list[2], - self.cbdma_list[4], - self.vhost_core_list[2], - self.cbdma_list[5], - self.vhost_core_list[2], - self.cbdma_list[6], - self.vhost_core_list[2], - self.cbdma_list[7], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" % ( + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], + self.cbdma_list[1], ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas + vhost_param = "--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024" self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -1139,51 +1121,34 @@ class TestVhostCbdma(TestCase): self.check_each_queue_of_port_packets(queues=8) self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[1], - self.vhost_core_list[2], - self.cbdma_list[2], - self.vhost_core_list[3], - self.cbdma_list[3], - self.vhost_core_list[3], - self.cbdma_list[4], - self.vhost_core_list[3], - self.cbdma_list[5], - self.vhost_core_list[3], - self.cbdma_list[6], - self.vhost_core_list[4], - self.cbdma_list[4], - self.vhost_core_list[4], - self.cbdma_list[5], - self.vhost_core_list[4], - self.cbdma_list[6], - self.vhost_core_list[4], - self.cbdma_list[7], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma - ) + dmas = "txq0@%s;" \ + "txq1@%s;" \ + "txq2@%s;" \ + "txq3@%s;" \ + "txq4@%s;" \ + "txq5@%s;" \ + "txq6@%s;" \ + "rxq2@%s;" \ + "rxq3@%s;" \ + "rxq4@%s;" \ + "rxq5@%s;" \ + "rxq6@%s;" \ + "rxq7@%s" % ( + self.cbdma_list[0], + self.cbdma_list[1], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[2], + self.cbdma_list[3], + self.cbdma_list[4], + self.cbdma_list[5], + self.cbdma_list[6], + self.cbdma_list[7], + ) + vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas self.start_vhost_testpmd( cores=self.vhost_core_list, param=vhost_param, @@ -1196,70 +1161,6 @@ class TestVhostCbdma(TestCase): self.send_imix_packets(mode=mode) self.check_each_queue_of_port_packets(queues=8) - self.virtio_user_pmd.quit() - virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024" - for key, path in PACKED_RING_PATH.items(): - if key == "mergeable": - virtio_eal_param = ( - "--vdev 'net_virtio_user0,mac=%s,path=vhost-net0,%s,queues=8,server=1'" - % (self.virtio_mac, path) - ) - mode = key + "_VA_M:N_diff" - self.mode_list.append(mode) - self.start_virtio_testpmd( - cores=self.virtio_core_list, - param=virtio_param, - eal_param=virtio_eal_param, - ) - self.send_imix_packets(mode=mode) - self.check_each_queue_of_port_packets(queues=8) - - self.vhost_user_pmd.quit() - lcore_dma = ( - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s," - "lcore%s@%s" - % ( - self.vhost_core_list[1], - self.cbdma_list[0], - self.vhost_core_list[2], - self.cbdma_list[0], - self.vhost_core_list[3], - self.cbdma_list[1], - self.vhost_core_list[3], - self.cbdma_list[2], - self.vhost_core_list[4], - self.cbdma_list[1], - self.vhost_core_list[4], - self.cbdma_list[2], - self.vhost_core_list[5], - self.cbdma_list[1], - self.vhost_core_list[5], - self.cbdma_list[2], - ) - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'" - vhost_param = ( - "--nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - param=vhost_param, - eal_param=vhost_eal_param, - ports=allow_pci, - iova_mode="pa", - ) - mode = "mergeable" + "_PA_M:N_diff" - self.mode_list.append(mode) - self.send_imix_packets(mode=mode) - self.check_each_queue_of_port_packets(queues=8) - self.test_target = self.running_case self.expected_throughput = self.get_suite_cfg()["expected_throughput"][ self.test_target -- 2.25.1