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 2C5AEA051F; Sat, 18 Jan 2020 09:32:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52F4344C7; Sat, 18 Jan 2020 09:32:55 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A902E2C2B for ; Sat, 18 Jan 2020 09:32:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2020 00:32:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,333,1574150400"; d="scan'208";a="258112077" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 18 Jan 2020 00:32:52 -0800 From: "zhu,shuai" To: dts@dpdk.org Cc: yinan.wang@intel.com, "zhu,shuai" Date: Sat, 18 Jan 2020 16:38:09 +0800 Message-Id: <1579336692-98775-6-git-send-email-shuaix.zhu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1579336692-98775-1-git-send-email-shuaix.zhu@intel.com> References: <1579336692-98775-1-git-send-email-shuaix.zhu@intel.com> Subject: [dts] [PATCH V1 6/9] tests/vhost_virtio_user_interrupt: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" add create_eal_parameters function. Signed-off-by: zhu,shuai --- .../TestSuite_vhost_virtio_user_interrupt.py | 43 ++++++++----------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/tests/TestSuite_vhost_virtio_user_interrupt.py b/tests/TestSuite_vhost_virtio_user_interrupt.py index e2b3f55..610e56e 100644 --- a/tests/TestSuite_vhost_virtio_user_interrupt.py +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py @@ -57,7 +57,7 @@ class TestVirtioUserInterrupt(TestCase): self.core_mask_vhost = utils.create_mask(self.core_list_vhost) self.core_mask_l3fwd = utils.create_mask(self.core_list_l3fwd) self.core_mask_virtio = self.core_mask_l3fwd - self.mem_channel = self.dut.get_memory_channels() + self.pci_info = self.dut.ports_info[0]['pci'] self.prepare_l3fwd_power() self.tx_port = self.tester.get_local_port(self.dut_ports[0]) @@ -91,13 +91,11 @@ class TestVirtioUserInterrupt(TestCase): def launch_l3fwd(self, path): self.core_interrupt = self.core_list_l3fwd[0] - cmd_l3fwd = "./examples/l3fwd-power/build/l3fwd-power " + \ - "-n %d -c %s --socket-mem 1024,1024 --legacy-mem " + \ - "--log-level='user1,7' --no-pci --file-prefix=l3fwd-pwd " + \ - "--vdev=virtio_user0,path=%s,cq=1 -- -p 1 " + \ - " --config='(0,0,%s)' --parse-ptype " - cmd_l3fwd = cmd_l3fwd % (self.mem_channel, self.core_mask_l3fwd, - path, self.core_interrupt) + example_para = "./examples/l3fwd-power/build/l3fwd-power " + vdev = " --log-level='user1,7' --vdev=virtio_user0,path=%s,cq=1 -- -p 1" % path + eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, prefix='l3fwd-pwd', no_pci=True, ports=[self.pci_info]) + para = " --config='(0,0,%s)' --parse-ptype" % self.core_interrupt + cmd_l3fwd = example_para + eal_params + vdev + para self.l3fwd.get_session_before(timeout=2) self.l3fwd.send_expect(cmd_l3fwd, "POWER", 40) time.sleep(10) @@ -111,16 +109,14 @@ class TestVirtioUserInterrupt(TestCase): """ start testpmd on vhost side """ + testcmd = self.dut.target + "/app/testpmd " + vdev = [r"'net_vhost0,iface=vhost-net,queues=1,client=0'"] + para = " -- -i --rxq=1 --txq=1" if len(pci) == 0: - pci_info = self.dut.ports_info[self.dut_ports[0]]['pci'] - pci = '-w %s' % pci_info - cmd_vhost_user = self.dut.target + "/app/testpmd -n %d -c %s " + \ - "--socket-mem 1024,1024 --legacy-mem %s " + \ - "--file-prefix=vhost " + \ - "--vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' " + \ - "-- -i --rxq=1 --txq=1" - cmd_vhost_user = cmd_vhost_user % (self.mem_channel, - self.core_mask_vhost, pci) + eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, ports=[self.pci_info], vdevs=vdev) + else: + eal_params = self.dut.create_eal_parameters(cores=self.core_list_vhost, prefix='vhost', no_pci=True, ports=[self.pci_info], vdevs=vdev) + cmd_vhost_user = testcmd + eal_params + para self.vhost.send_expect(cmd_vhost_user, "testpmd>", 30) self.vhost.send_expect("set fwd mac", "testpmd>", 30) @@ -130,14 +126,11 @@ class TestVirtioUserInterrupt(TestCase): """ start testpmd on virtio side """ - cmd_virtio_user = self.dut.target + "/app/testpmd -n %d -c %s " + \ - " --socket-mem 1024,1024 --legacy-mem --no-pci " + \ - "--file-prefix=virtio " + \ - " --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net" + \ - " -- -i --txd=512 --rxd=128 --tx-offloads=0x00" - cmd_virtio_user = cmd_virtio_user % (self.mem_channel, - self.core_mask_virtio) - + testcmd = self.dut.target + "/app/testpmd " + vdev = " --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net" + eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, prefix='virtio', no_pci=True, ports=[self.pci_info]) + para = " -- -i --txd=512 --rxd=128 --tx-offloads=0x00" + cmd_virtio_user = testcmd + eal_params + vdev + para self.virtio.send_expect(cmd_virtio_user, "testpmd>", 120) self.virtio.send_expect("set fwd mac", "testpmd>", 20) self.virtio.send_expect("start", "testpmd>", 20) -- 2.17.2