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 8C602A0093; Mon, 28 Nov 2022 03:56:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C08642B8B; Mon, 28 Nov 2022 03:56:04 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 7C43C40156 for ; Mon, 28 Nov 2022 03:56:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669604162; x=1701140162; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=XtiIfM+0UuYw2fkXYJ5LbNzcXiGUELIaIbSYSewMbDA=; b=GjFlMT18zb7yQnr4tKtSbOcUlDRa+2sLs4dlyWgzhxWht+Oi7btm0Em3 HwoEYkfsndtaoj3SUvAP+YL/eFyCGsTY/ThBjyiSKt0LCYXNAEEeLj/GD xE/i2n98OE+MCpewjqNLs8qq84YVNqNCOtF4qDQvZRF3ABFwra3ONG+zs 0kbJv7Hn1dcnP4jdVYfpMIS+KKsapDXBvRfkK7q3yuZNzKgkvdP3Byj9q NQszWLMS4oIjp9uTnq5cc3eVDnEtG99vKd52sAM0TxClDgT9uCxZSkKsd MNd9gk2kBlTreYEJpb6nt6GeMIqE9d9tTWwAHhrp2TC2qsju/FUmhcwd8 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="298090544" X-IronPort-AV: E=Sophos;i="5.96,199,1665471600"; d="scan'208,223";a="298090544" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2022 18:56:01 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10544"; a="785467492" X-IronPort-AV: E=Sophos;i="5.96,199,1665471600"; d="scan'208,223";a="785467492" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2022 18:55:59 -0800 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V3 2/3] tests/vhost_cbdma: modify the dmas parameter by DPDK changed Date: Mon, 28 Nov 2022 10:50:14 +0800 Message-Id: <20221128025014.2315408-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 | 859 ++++++++++++++++----------------- 1 file changed, 417 insertions(+), 442 deletions(-) diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py index 88ee83df..ab2341f2 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,22 @@ 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" + dmas = ( + "txq0@%s;" + "txq1@%s;" + "rxq0@%s;" + "rxq1@%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 + "--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 +244,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 +288,49 @@ 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" + 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.vhost_core_list[1], self.cbdma_list[0], - self.vhost_core_list[2], + 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], - 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 + 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 +368,120 @@ 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" + 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.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], + 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_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + 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 +490,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 +525,18 @@ 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], - ) + 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=[txq0;txq1;rxq0;rxq1]'" - vhost_param = ( - "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + 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 +580,23 @@ 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" + dmas = ( + "rxq0@%s;" + "rxq1@%s;" + "rxq2@%s;" + "rxq3@%s" % ( - self.vhost_core_list[1], self.cbdma_list[0], - self.vhost_core_list[2], + self.cbdma_list[0], + self.cbdma_list[1], 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 + 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 +610,41 @@ 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" + 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.vhost_core_list[1], self.cbdma_list[0], - self.vhost_core_list[1], + 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.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 + 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 +658,40 @@ 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" + 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.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[2], + self.cbdma_list[3], 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 + 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 +704,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 +716,25 @@ 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" + dmas = ( + "txq0@%s;" + "txq1@%s;" + "rxq0@%s;" + "rxq1@%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 + "--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 +822,46 @@ 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" + 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.vhost_core_list[1], self.cbdma_list[0], - self.vhost_core_list[2], + self.cbdma_list[0], + self.cbdma_list[0], + self.cbdma_list[0], self.cbdma_list[1], - self.vhost_core_list[3], - self.cbdma_list[2], - self.vhost_core_list[4], - self.cbdma_list[3], + 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=[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 + 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,39 +900,118 @@ 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" + 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.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], + 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_param = ( - "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -942,7 +1022,7 @@ 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) @@ -980,39 +1060,16 @@ 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], - ) + 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=[txq0;txq1;rxq0;rxq1]'" - vhost_param = ( - "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" - % lcore_dma + 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 +1113,23 @@ 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" + dmas = ( + "rxq0@%s;" + "rxq1@%s;" + "rxq2@%s;" + "rxq3@%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], + self.cbdma_list[0], + self.cbdma_list[1], ) ) - 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 + 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 +1143,40 @@ 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" + 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.vhost_core_list[1], self.cbdma_list[0], - self.vhost_core_list[1], + 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.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 + 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,50 +1190,38 @@ 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" + 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.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[2], + self.cbdma_list[3], 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 + 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, @@ -1196,70 +1235,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