From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, yinan.wang@intel.com, lihongx.ma@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one
Date: Wed, 18 Sep 2019 14:14:00 +0800 [thread overview]
Message-ID: <20190918061400.4397-2-yufengx.mo@intel.com> (raw)
In-Reply-To: <20190918061400.4397-1-yufengx.mo@intel.com>
socket server
set socket memsize to support suite deployed on one socket server.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
...uite_pvp_vhost_user_built_in_net_driver.py | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 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 52d9df9..1c13665 100644
--- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
+++ b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py
@@ -78,6 +78,10 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
self.tester.send_expect('mkdir -p %s' % self.out_path, '# ')
# create an instance to set stream field setting
self.pktgen_helper = PacketGeneratorHelper()
+
+ # set memory size
+ self.verify(self.sockets > 0, 'cpu socket should not be zero')
+ self.mem_size = ','.join(['2048']*self.sockets)
def set_up(self):
"""
@@ -100,6 +104,13 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
self.table_header.append("% linerate")
self.result_table_create(self.table_header)
+ @property
+ def sockets(self):
+ sockets = [
+ cpu.get('socket') for cpu in self.dut.get_all_cores()
+ if cpu.get('socket')]
+ return len(set(sockets))
+
def prepare_vhost_switch(self):
cmd_info = self.dut.send_expect("grep 'define MAX_QUEUES' %s" %
"./examples/vhost/main.c", "# ")
@@ -158,12 +169,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
"""
self.dut.send_expect("rm -rf ./vhost.out", "#")
command_line_client = "./examples/vhost/build/app/vhost-switch " + \
- "-c %s -n %d --socket-mem 2048,2048 -- " + \
+ "-c %s -n %d --socket-mem %s -- " + \
"-p 0x1 --mergeable 0 --vm2vm 1 " + \
"--builtin-net-driver --socket-file ./vhost-net" + \
"> ./vhost.out &"
command_line_client = command_line_client % (self.core_mask_vhost_user,
- self.mem_channels)
+ self.mem_channels, self.mem_size)
self.vhost_switch.send_expect(command_line_client, "# ", 120)
time.sleep(15)
try:
@@ -185,11 +196,12 @@ class TestPVPVhostUserBuiltInNetDriver(TestCase):
start testpmd on virtio
"""
command_line_user = "./%s/app/testpmd -n %d -c %s " + \
- "--no-pci --socket-mem 2048,2048 --file-prefix=virtio-user " + \
+ "--no-pci --socket-mem %s --file-prefix=virtio-user " + \
"--vdev=net_virtio_user0,mac=%s,path=./vhost-net,queues=1 " + \
"-- -i --rxq=1 --txq=1"
command_line_user = command_line_user % (self.target,
- self.mem_channels, self.core_mask_virtio_user, self.virtio_mac)
+ self.mem_channels, self.core_mask_virtio_user,
+ self.mem_size, self.virtio_mac)
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)
--
2.21.0
next prev parent reply other threads:[~2019-09-18 6:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 6:13 [dts] [PATCH V1 0/1] tests/pvp_vhost_user_built_in_net_driver: support one socket server yufengmx
2019-09-18 6:14 ` yufengmx [this message]
2019-09-18 6:16 ` [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one Mo, YufengX
2019-09-20 6:48 ` Tu, Lijuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190918061400.4397-2-yufengx.mo@intel.com \
--to=yufengx.mo@intel.com \
--cc=dts@dpdk.org \
--cc=lihongx.ma@intel.com \
--cc=yinan.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).