* [dts] [PATCH V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env
@ 2020-02-18 10:12 Xiao Qimai
2020-02-21 1:50 ` Tu, Lijuan
0 siblings, 1 reply; 3+ messages in thread
From: Xiao Qimai @ 2020-02-18 10:12 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
* optimize testpmd eal parameters
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
...stSuite_virtio_user_for_container_networking.py | 22 +++++++++++-----------
1 file changed, 11 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..cdcae01 100644
--- a/tests/TestSuite_virtio_user_for_container_networking.py
+++ b/tests/TestSuite_virtio_user_for_container_networking.py
@@ -96,10 +96,8 @@ 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]
- 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_mask_virtio_user = utils.create_mask(core_list_virtio_user)
+ self.core_list_vhost_user = core_list[0:self.nb_cores+1]
+ self.core_list_virtio_user = core_list[self.nb_cores+1:self.nb_cores*2+2]
def send_and_verify(self):
"""
@@ -133,17 +131,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)
--
1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env
2020-02-18 10:12 [dts] [PATCH V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env Xiao Qimai
@ 2020-02-21 1:50 ` Tu, Lijuan
2020-02-21 1:56 ` Tu, Lijuan
0 siblings, 1 reply; 3+ messages in thread
From: Tu, Lijuan @ 2020-02-21 1:50 UTC (permalink / raw)
To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> Sent: Tuesday, February 18, 2020 6:12 PM
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH
> V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to
> verify 2M env
>
> * optimize testpmd eal parameters
>
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
> ...stSuite_virtio_user_for_container_networking.py | 22 +++++++++++---------
> --
> 1 file changed, 11 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..cdcae01 100644
> --- a/tests/TestSuite_virtio_user_for_container_networking.py
> +++ b/tests/TestSuite_virtio_user_for_container_networking.py
> @@ -96,10 +96,8 @@ 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]
> - 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_mask_virtio_user = utils.create_mask(core_list_virtio_user)
> + self.core_list_vhost_user = core_list[0:self.nb_cores+1]
> + self.core_list_virtio_user = core_list[self.nb_cores+1:self.nb_cores*2+2]
>
> def send_and_verify(self):
> """
> @@ -133,17 +131,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)
>
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env
2020-02-21 1:50 ` Tu, Lijuan
@ 2020-02-21 1:56 ` Tu, Lijuan
0 siblings, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2020-02-21 1:56 UTC (permalink / raw)
To: Tu, Lijuan, Xiao, QimaiX, dts; +Cc: Xiao, QimaiX
Sorry, applied V2, not v1.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Tu, Lijuan
> Sent: Friday, February 21, 2020 9:50 AM
> To: Xiao, QimaiX <qimaix.xiao@intel.com>; dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: Re: [dts] [PATCH
> V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to
> verify 2M env
>
> Applied, thanks
>
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiao Qimai
> > Sent: Tuesday, February 18, 2020 6:12 PM
> > To: dts@dpdk.org
> > Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> > Subject: [dts] [PATCH
> > V1]tests/TestSuite_virtio_user_for_container_networking: add if
> > sentence to verify 2M env
> >
> > * optimize testpmd eal parameters
> >
> > Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> > ---
> > ...stSuite_virtio_user_for_container_networking.py | 22
> > +++++++++++---------
> > --
> > 1 file changed, 11 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..cdcae01 100644
> > --- a/tests/TestSuite_virtio_user_for_container_networking.py
> > +++ b/tests/TestSuite_virtio_user_for_container_networking.py
> > @@ -96,10 +96,8 @@ 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]
> > - 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_mask_virtio_user = utils.create_mask(core_list_virtio_user)
> > + self.core_list_vhost_user = core_list[0:self.nb_cores+1]
> > + self.core_list_virtio_user =
> > + core_list[self.nb_cores+1:self.nb_cores*2+2]
> >
> > def send_and_verify(self):
> > """
> > @@ -133,17 +131,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)
> >
> > --
> > 1.8.3.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-21 1:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 10:12 [dts] [PATCH V1]tests/TestSuite_virtio_user_for_container_networking: add if sentence to verify 2M env Xiao Qimai
2020-02-21 1:50 ` Tu, Lijuan
2020-02-21 1:56 ` Tu, Lijuan
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).