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 781B3A051C; Sat, 18 Jan 2020 09:32:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 66C9A316B; Sat, 18 Jan 2020 09:32:52 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6F8F72C2B for ; Sat, 18 Jan 2020 09:32:50 +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:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,333,1574150400"; d="scan'208";a="258112064" 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:48 -0800 From: "zhu,shuai" To: dts@dpdk.org Cc: yinan.wang@intel.com, "zhu,shuai" Date: Sat, 18 Jan 2020 16:38:05 +0800 Message-Id: <1579336692-98775-2-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 2/9] tests/vhost_enqueue_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 --- tests/TestSuite_vhost_enqueue_interrupt.py | 29 ++++++++-------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/tests/TestSuite_vhost_enqueue_interrupt.py b/tests/TestSuite_vhost_enqueue_interrupt.py index 5c4c1df..da325d3 100644 --- a/tests/TestSuite_vhost_enqueue_interrupt.py +++ b/tests/TestSuite_vhost_enqueue_interrupt.py @@ -49,8 +49,7 @@ class TestVhostEnqueueInterrupt(TestCase): self.queues = 1 self.cores_num = len([n for n in self.dut.cores if int(n['socket']) == 0]) self.vmac = "00:11:22:33:44:10" - self.dut_ports = self.dut.get_ports() - self.mem_channels = self.dut.get_memory_channels() + self.pci_info = self.dut.ports_info[0]['pci'] self.prepare_l3fwd_power() def set_up(self): @@ -83,21 +82,15 @@ class TestVhostEnqueueInterrupt(TestCase): core_list = self.dut.get_core_list(self.core_config) self.core_list_virtio = core_list[0: self.queues+1] self.core_list_l3fwd = core_list[self.queues+1: need_num] - self.core_mask_virtio = utils.create_mask(self.core_list_virtio) - self.core_mask_l3fwd = utils.create_mask(self.core_list_l3fwd) def lanuch_virtio_user(self): """ launch virtio-user with server mode """ - command_client = self.dut.target + "/app/testpmd -c %s -n %d " + \ - "--socket-mem 1024,1024 --legacy-mem --no-pci " + \ - "--file-prefix=virtio " + \ - "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,server=1,queues=%d " + \ - "-- -i --rxq=%d --txq=%d --rss-ip" - command_line_client = command_client % ( - self.core_mask_virtio, self.mem_channels, - self.vmac, self.queues, self.queues, self.queues) + vdev = "--vdev=net_virtio_user0,mac=%s,path=./vhost-net,server=1,queues=%d" % (self.vmac, self.queues) + eal_params = self.dut.create_eal_parameters(cores=self.core_list_virtio, prefix='virtio', no_pci=True, ports=[self.pci_info]) + para = " -- -i --rxq=%d --txq=%d --rss-ip" % (self.queues, self.queues) + command_line_client = self.dut.target + "/app/testpmd " + eal_params + vdev + para self.virtio_user.send_expect(command_line_client, "testpmd> ", 120) self.virtio_user.send_expect("set fwd txonly", "testpmd> ", 20) @@ -115,13 +108,11 @@ class TestVhostEnqueueInterrupt(TestCase): info = {'core': self.core_list_l3fwd[i], 'port': 0, 'queue': i} self.verify_info.append(info) - command_client = "./examples/l3fwd-power/build/app/l3fwd-power " + \ - "-c %s -n %d --socket-mem 1024,1024 --legacy-mem --no-pci " + \ - "--vdev 'net_vhost0,iface=vhost-net,queues=%d,client=1' " + \ - "-- -p 0x1 --parse-ptype 1 --config '%s' " - command_line_client = command_client % ( - self.core_mask_l3fwd, self.mem_channels, - self.queues, config_info) + example_cmd = "./examples/l3fwd-power/build/app/l3fwd-power " + vdev = [r"'net_vhost0,iface=vhost-net,queues=%d,client=1'" % self.queues] + para = " -- -p 0x1 --parse-ptype 1 --config '%s' " % config_info + eal_params = self.dut.create_eal_parameters(cores=self.core_list_l3fwd, no_pci=True, ports=[self.pci_info], vdevs=vdev) + command_line_client = example_cmd + eal_params + para self.vhost.get_session_before(timeout=2) self.vhost.send_expect(command_line_client, "POWER", 40) time.sleep(10) -- 2.17.2