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 D5542A0561; Mon, 20 Apr 2020 08:19:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ABB6D1C436; Mon, 20 Apr 2020 08:19:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id CC8D91C435 for ; Mon, 20 Apr 2020 08:19:09 +0200 (CEST) IronPort-SDR: E4GPNS6S0SrH+t9BsdrbDuVYxHo89mxGQdCCn3MhM+uvBqGR8nihK8rt0GBdZyEh6tXIkU/D14 dOzRqz8no1ag== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2020 23:19:08 -0700 IronPort-SDR: zVdSl+p8kwZ7ScdxnQhDICZVsEkSF3pxe/6KSeGj3LmeMYizc6/6wkudpVHg+k+eQpf4a7mytf OMRBg+BqJIYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,405,1580803200"; d="scan'208";a="273077554" Received: from unknown (HELO dpdk-xiaoqimai-dut.sh.intel.com) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 19 Apr 2020 23:19:07 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Mon, 20 Apr 2020 14:13:06 +0800 Message-Id: <1587363186-180222-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V2]pvp_vhost_user_built_in_net_driver: pre_allocate memory for vhost-switch manually 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" *. need memory pre-allocation when enabling "builtin-net-driver" Signed-off-by: Xiao Qimai --- tests/TestSuite_pvp_vhost_user_built_in_net_driver.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py index cfdd704..3f55e7a 100644 --- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py +++ b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py @@ -171,7 +171,7 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase): start vhost-switch on vhost """ self.dut.send_expect("rm -rf ./vhost.out", "#") - eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_vhost_user, prefix='vhost') + eal_param = self.dut.create_eal_parameters(cores=self.core_list_vhost_user, prefix='vhost') command_line_client = "./examples/vhost/build/vhost-switch " + eal_param + ' -- -p 0x1 --mergeable 0 --vm2vm 1 --builtin-net-driver --socket-file ./vhost-net> ./vhost.out &' self.vhost_switch.send_expect(command_line_client, "# ", 120) time.sleep(15) @@ -193,12 +193,13 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase): """ start testpmd on virtio """ - eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_virtio_user, prefix='virtio', + eal_param = self.dut.create_eal_parameters(cores=self.core_list_virtio_user, prefix='virtio', no_pci=True, vdevs=[ 'net_virtio_user0,mac=%s,path=./vhost-net,queues=1' % self.virtio_mac]) if self.check_2M_env: eal_param += " --single-file-segments" - command_line_user = "./%s/app/testpmd " % self.target + eal_param + " -- -i --rxq=1 --txq=1" + # since vhost-switch not support new memory allocation, so add --socket-mem parameter to testpmd to handle it + command_line_user = "./%s/app/testpmd " % self.target + eal_param + " --socket-mem " + self.mem_size + " -- -i --rxq=1 --txq=1" self.virtio_user.send_expect(command_line_user, "testpmd> ", 120) self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) self.virtio_user.send_expect("start tx_first", "testpmd> ", 120) -- 1.8.3.1