From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Xiao, QimaiX" <qimaix.xiao@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Xiao, QimaiX" <qimaix.xiao@intel.com>
Subject: Re: [dts] [PATCH V2]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env
Date: Fri, 21 Feb 2020 01:55:42 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCC851@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1582101794-42625-1-git-send-email-qimaix.xiao@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Wednesday, February 19, 2020 4:43 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH
> V2]tests/TestSuite_virtio_user_for_container_networking: add if sentence to
> verify 2M env
>
> * add param --single-file-segments for 2M env
>
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
> ...stSuite_virtio_user_for_container_networking.py | 32 ++++++++++++++----
> ----
> 1 file changed, 21 insertions(+), 11 deletions(-)
>
> diff --git a/tests/TestSuite_virtio_user_for_container_networking.py
> b/tests/TestSuite_virtio_user_for_container_networking.py
> index 034587e..ba303b7 100644
> --- a/tests/TestSuite_virtio_user_for_container_networking.py
> +++ b/tests/TestSuite_virtio_user_for_container_networking.py
> @@ -96,9 +96,9 @@ class TestVirtioUserForContainer(TestCase):
> self.verify(len(core_list) >= (self.nb_cores*2 + 2),
> 'There has not enought cores to test this case %s' %
> self.running_case)
> - core_list_vhost_user = core_list[0:self.nb_cores+1]
> + self.core_list_vhost_user = core_list[0:self.nb_cores+1]
> core_list_virtio_user = core_list[self.nb_cores+1:self.nb_cores*2+2]
> - self.core_mask_vhost_user = utils.create_mask(core_list_vhost_user)
> + self.core_list_virtio_user = core_list[self.nb_cores+1:self.nb_cores*2+2]
> self.core_mask_virtio_user = utils.create_mask(core_list_virtio_user)
>
> def send_and_verify(self):
> @@ -133,17 +133,19 @@ class TestVirtioUserForContainer(TestCase):
> results_row.append(throughput)
> self.result_table_add(results_row)
>
> + @property
> + def check_2M_env(self):
> + hugepage_size = self.dut.send_expect("cat /proc/meminfo |grep
> Hugepagesize|awk '{print($2)}'", "# ")
> + return True if hugepage_size == '2048' else False
> +
> def launch_testpmd_as_vhost(self):
> """
> start testpmd as vhost
> """
> - command_line_client = self.dut.target + '/app/testpmd ' + \
> - '-c %s -n %d --socket-mem 1024,1024 --file-prefix=vhost ' + \
> - '--vdev "net_vhost0,iface=vhost-net,queues=%d,client=0" '
> + \
> - '-- -i --nb-cores=%d'
> - command_line_client = command_line_client %
> (self.core_mask_vhost_user,
> - self.mem_channels, self.queue_number,
> - self.nb_cores)
> + eal_param =
> self.dut.create_eal_parameters(cores=self.core_list_vhost_user,
> prefix='vhost', vdevs=["net_vhost0,iface=vhost-net,queues=%d,client=0" %
> self.queue_number])
> + if self.check_2M_env:
> + eal_param += " --single-file-segments"
> + command_line_client = self.dut.target + '/app/testpmd ' + eal_param +
> ' -- -i --nb-cores=%d' % self.nb_cores
> self.vhost_user.send_expect(command_line_client, 'testpmd> ', 30)
> self.vhost_user.send_expect('start', 'testpmd> ', 30)
>
> @@ -151,10 +153,18 @@ class TestVirtioUserForContainer(TestCase):
> """
> start testpmd as virtio
> """
> - command_line_user = 'docker run -i -t --privileged -v %s/vhost-
> net:/tmp/vhost-net ' + \
> + if self.check_2M_env:
> + command_line_user = 'docker run -i -t --privileged -v %s/vhost-
> net:/tmp/vhost-net ' + \
> + '-v /mnt/huge:/dev/hugepages ' + \
> + '-v %s:%s %s .%s/%s/app/testpmd -c %s -n %d ' + \
> + '-m 1024 --no-pci --file-prefix=container --single-file-
> segments ' + \
> + '--
> vdev=virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=%d '
> + \
> + '-- -i --rxq=%d --txq=%d --nb-cores=%d'
> + else:
> + command_line_user = 'docker run -i -t --privileged -v %s/vhost-
> net:/tmp/vhost-net ' + \
> '-v /mnt/huge:/dev/hugepages ' + \
> '-v %s:%s %s .%s/%s/app/testpmd -c %s -n %d ' + \
> - '-m 1024 --no-pci --file-prefix=container ' + \
> + '-m 1024 --no-pci --file-prefix=container --single-file-
> segments ' + \
> '--
> vdev=virtio_user0,mac=00:11:22:33:44:10,path=/tmp/vhost-net,queues=%d '
> + \
> '-- -i --rxq=%d --txq=%d --nb-cores=%d'
> command_line_user = command_line_user % (self.container_base_dir,
> --
> 1.8.3.1
prev parent reply other threads:[~2020-02-21 1:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 8:43 Xiao Qimai
2020-02-21 1:55 ` Tu, Lijuan [this message]
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=8CE3E05A3F976642AAB0F4675D0AD20E0BBCC851@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=qimaix.xiao@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).