* [dts] [PATCH V1]pvp_vhost_user_built_in_net_driver: allocate memory for vhost-switch manually
@ 2020-04-14 9:38 Xiao Qimai
2020-04-15 0:55 ` Wang, Yinan
0 siblings, 1 reply; 2+ messages in thread
From: Xiao Qimai @ 2020-04-14 9:38 UTC (permalink / raw)
To: dts; +Cc: Xiao Qimai
*. vhost-switch not support new memory allocation, add --socket-mem parameter for it
Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH V1]pvp_vhost_user_built_in_net_driver: allocate memory for vhost-switch manually
2020-04-14 9:38 [dts] [PATCH V1]pvp_vhost_user_built_in_net_driver: allocate memory for vhost-switch manually Xiao Qimai
@ 2020-04-15 0:55 ` Wang, Yinan
0 siblings, 0 replies; 2+ messages in thread
From: Wang, Yinan @ 2020-04-15 0:55 UTC (permalink / raw)
To: Xiao, QimaiX, dts; +Cc: Xiao, QimaiX
Hi Qimai,
The patch comment is not correct, vhost-switch can support new memory allocation, but need memory pre-allocation when enabling "builtin-net-driver".
BR,
Yinan
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xiao Qimai
> Sent: 2020年4月14日 17:38
> To: dts@dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao@intel.com>
> Subject: [dts] [PATCH V1]pvp_vhost_user_built_in_net_driver: allocate memory
> for vhost-switch manually
>
> *. vhost-switch not support new memory allocation, add --socket-mem
> parameter for it
>
> Signed-off-by: Xiao Qimai <qimaix.xiao@intel.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-15 0:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-14 9:38 [dts] [PATCH V1]pvp_vhost_user_built_in_net_driver: allocate memory for vhost-switch manually Xiao Qimai
2020-04-15 0:55 ` Wang, Yinan
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).