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 CE751A0563; Fri, 28 Feb 2020 02:27:20 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB6E11BFCD; Fri, 28 Feb 2020 02:27:20 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 886D42C4F for ; Fri, 28 Feb 2020 02:27:17 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2020 17:27:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,493,1574150400"; d="scan'208";a="350807986" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 27 Feb 2020 17:27:16 -0800 From: "zhu,shuai" To: dts@dpdk.org Cc: "zhu,shuai" Date: Fri, 28 Feb 2020 09:32:38 +0800 Message-Id: <1582853558-66855-6-git-send-email-shuaix.zhu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1582853558-66855-1-git-send-email-shuaix.zhu@intel.com> References: <1582853558-66855-1-git-send-email-shuaix.zhu@intel.com> Subject: [dts] [PATCH V2] tests/vm2vm_virtio_pmd:add create_eal_parameters function. 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" Signed-off-by: zhu,shuai --- tests/TestSuite_vm2vm_virtio_pmd.py | 44 +++++++++++++---------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py index c1703b9..5bc0d01 100644 --- a/tests/TestSuite_vm2vm_virtio_pmd.py +++ b/tests/TestSuite_vm2vm_virtio_pmd.py @@ -60,6 +60,7 @@ class TestVM2VMVirtioPMD(TestCase): self.virtio_user1 = None self.flag_compiled = False self.backup_speed = self.dut.skip_setup + self.pci_info = self.dut.ports_info[0]['pci'] def set_up(self): """ @@ -102,16 +103,13 @@ class TestVM2VMVirtioPMD(TestCase): """ launch the testpmd on vhost side """ - vhost_mask = utils.create_mask(self.cores_list[0:2]) - self.command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \ - "--socket-mem %s --legacy-mem --no-pci --file-prefix=vhost " + \ - "--vdev 'net_vhost0,iface=%s/vhost-net0,queues=1' " + \ - "--vdev 'net_vhost1,iface=%s/vhost-net1,queues=1' " + \ - "-- -i --nb-cores=1 --txd=1024 --rxd=1024" - - self.command_line = self.command_line % ( - vhost_mask, self.memory_channel, self.socket_mem, - self.base_dir, self.base_dir) + vhost_mask = self.cores_list[0:2] + testcmd = self.dut.target + "/app/testpmd " + vdev1 = "--vdev 'net_vhost0,iface=%s/vhost-net0,queues=1' " % self.base_dir + vdev2 = "--vdev 'net_vhost1,iface=%s/vhost-net1,queues=1' " % self.base_dir + eal_params = self.dut.create_eal_parameters(cores=vhost_mask, no_pci=True, prefix='vhost', ports=[self.pci_info]) + para = " -- -i --nb-cores=1 --txd=1024 --rxd=1024" + self.command_line = testcmd + eal_params + vdev1 + vdev2 + para self.vhost_user.send_expect(self.command_line, "testpmd> ", 30) self.vhost_user.send_expect("set fwd mac", "testpmd> ", 30) self.vhost_user.send_expect("start", "testpmd> ", 30) @@ -121,13 +119,12 @@ class TestVM2VMVirtioPMD(TestCase): launch the testpmd as virtio with vhost_net1 """ self.virtio_user1 = self.dut.new_session(suite="virtio_user1") - virtio_mask = utils.create_mask(self.cores_list[2:4]) - command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \ - "--socket-mem %s --no-pci --file-prefix=virtio " + \ - "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,%s " + \ - "-- -i --nb-cores=1 --txd=1024 --rxd=1024 %s" - command_line = command_line % (virtio_mask, self.memory_channel, - self.socket_mem, path_mode, extern_param) + virtio_mask = self.cores_list[2:4] + testcmd = self.dut.target + "/app/testpmd " + vdev = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,%s " % path_mode + eal_params = self.dut.create_eal_parameters(cores=virtio_mask, no_pci=True, prefix='virtio', ports=[self.pci_info]) + para = " -- -i --nb-cores=1 --txd=1024 --rxd=1024 %s" % extern_param + command_line = testcmd + eal_params + vdev + para self.virtio_user1.send_expect(command_line, 'testpmd> ', 30) self.virtio_user1.send_expect('set fwd rxonly', 'testpmd> ', 30) self.virtio_user1.send_expect('start', 'testpmd> ', 30) @@ -137,13 +134,12 @@ class TestVM2VMVirtioPMD(TestCase): launch the testpmd as virtio with vhost_net0 """ self.virtio_user0 = self.dut.new_session(suite="virtio_user0") - virtio_mask = utils.create_mask(self.cores_list[4:6]) - command_line = self.dut.target + "/app/testpmd -c %s -n %d " + \ - "--socket-mem %s --no-pci --file-prefix=virtio0 " + \ - "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,%s " + \ - "-- -i --nb-cores=1 --txd=1024 --rxd=1024 %s" - command_line = command_line % (virtio_mask, self.memory_channel, - self.socket_mem, path_mode, extern_param) + virtio_mask = self.cores_list[4:6] + testcmd = self.dut.target + "/app/testpmd " + vdev = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,%s " % path_mode + eal_params = self.dut.create_eal_parameters(cores=virtio_mask, no_pci=True, prefix='virtio0', ports=[self.pci_info]) + para = " -- -i --nb-cores=1 --txd=1024 --rxd=1024 %s" % extern_param + command_line = testcmd + eal_params + vdev + para self.virtio_user0.send_expect(command_line, 'testpmd> ', 30) self.virtio_user0.send_expect('set txpkts 2000,2000,2000,2000', 'testpmd> ', 30) self.virtio_user0.send_expect('set burst 1', 'testpmd> ', 30) -- 2.17.2