From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B27DDA0521; Tue, 3 Nov 2020 11:12:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9BE88C8B4; Tue, 3 Nov 2020 11:12:04 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 2BF0CBE4D for ; Tue, 3 Nov 2020 11:12:01 +0100 (CET) IronPort-SDR: 3BOfmsNqD4jx86a5nfkZ8DFEqJtl8uCNwdY/83ppRZ9UhTYIhXFN82hm+Ayp/9AU2qrQbpPn7K 0QEKhHK7aBGQ== X-IronPort-AV: E=McAfee;i="6000,8403,9793"; a="186874084" X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="186874084" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 02:11:49 -0800 IronPort-SDR: FMab/AOkGMrSXLjoX+6kr1BNrJ5HbrPzMixAeJ3SAVfE61EmZSy/6eo7+9sv+0tuq6kPLK9+f5 WvpkxrA4JyEA== X-IronPort-AV: E=Sophos;i="5.77,447,1596524400"; d="scan'208";a="538436372" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2020 02:11:48 -0800 From: lingwei To: dts@dpdk.org Cc: lingwei Date: Wed, 4 Nov 2020 02:08:11 +0800 Message-Id: <20201103180811.112226-1-weix.ling@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/vhost_cbdma:assign the cores which nic in to start testpmd X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" assign the cores which nic in to start testpmd Signed-off-by: lingwei --- tests/TestSuite_vhost_cbdma.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py index e15839f..869765f 100644 --- a/tests/TestSuite_vhost_cbdma.py +++ b/tests/TestSuite_vhost_cbdma.py @@ -64,7 +64,8 @@ class TestVirTioVhostCbdma(TestCase): self.virtio_mac = "00:01:02:03:04:05" self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip'] self.pci_info = self.dut.ports_info[0]['pci'] - self.cores = self.dut.get_core_list("all") + self.socket = self.dut.get_numa_id(self.dut_ports[0]) + self.cores = self.dut.get_core_list("all", socket=self.socket) self.cbdma_dev_infos = [] self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) @@ -197,7 +198,7 @@ class TestVirTioVhostCbdma(TestCase): pvp_split_all_path_virtio_params = "--tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=%d --txd=%d " \ "--rxd=%d" % (queue, txd_rxd, txd_rxd) - self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, txd_rxd, txd_rxd), self.cores[1:3], + self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, txd_rxd, txd_rxd), self.cores[0:2], dev=vhost_vdevs % (queue, dmathr), ) for key, path_mode in dev_path_mode_mapper.items(): @@ -206,7 +207,7 @@ class TestVirTioVhostCbdma(TestCase): queue, txd_rxd, txd_rxd) vdevs = f"'net_virtio_user0,mac={self.virtio_mac},path=/tmp/s0,{path_mode},queues=%d'" % queue self.diff_param_launch_send_and_verify(key, pvp_split_all_path_virtio_params, vdevs, - self.cores[4:6], + self.cores[2:4], ) self.result_table_print() @@ -233,13 +234,13 @@ class TestVirTioVhostCbdma(TestCase): vhost_dev = f"'net_vhost0,iface={virtio_path},queues={queue},client=1,%s'" # launch vhost testpmd - self.launch_testpmd_as_vhost_user(eal_params, self.cores[27:29], + self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], dev=vhost_dev % vhost_dmas) # # queue 2 start virtio testpmd,virtio queue 2 to 1 mode = "dynamic_queue2" self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_params, - self.cores[29:31], + self.cores[2:4], dev=virtio_dev) self.send_and_verify(mode) self.vhost_or_virtio_set_one_queue(self.virtio_user) @@ -251,7 +252,7 @@ class TestVirTioVhostCbdma(TestCase): self.dut.send_expect(f"rm -rf {virtio_path}", "#") # queue 2 start virtio testpmd,vhost queue 2 to 1 self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_params, - self.cores[29:31], + self.cores[2:4], dev=virtio_dev) mode = "Relaunch_dynamic_queue2" self.send_and_verify(mode) @@ -264,7 +265,7 @@ class TestVirTioVhostCbdma(TestCase): mode = "Relaunch_vhost_2_cbdma" dmathr = 512 vhost_dmas = f"dmas=[txq0@{self.used_cbdma[0]}],dmathr={dmathr}" - self.launch_testpmd_as_vhost_user(eal_params, self.cores[27:29], + self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], dev=vhost_dev % vhost_dmas) self.send_and_verify(mode) self.virtio_user.send_expect("quit", "# ") -- 2.17.1