test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Mo, YufengX" <yufengx.mo@intel.com>,
	"dts@dpdk.org" <dts@dpdk.org>,
	"Wang, Yinan" <yinan.wang@intel.com>,
	"Ma, LihongX" <lihongx.ma@intel.com>
Cc: "Mo, YufengX" <yufengx.mo@intel.com>
Subject: Re: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver:	support one
Date: Fri, 20 Sep 2019 06:48:09 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB24DD5@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190918061400.4397-2-yufengx.mo@intel.com>

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx
> Sent: Wednesday, September 18, 2019 2:14 PM
> To: dts@dpdk.org; Wang, Yinan <yinan.wang@intel.com>; Ma, LihongX
> <lihongx.ma@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver:
> support one
> 
>  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


      parent reply	other threads:[~2019-09-20  6:48 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 ` [dts] [PATCH V1 1/1] tests/pvp_vhost_user_built_in_net_driver: support one yufengmx
2019-09-18  6:16   ` Mo, YufengX
2019-09-20  6:48   ` 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=8CE3E05A3F976642AAB0F4675D0AD20E0BB24DD5@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=lihongx.ma@intel.com \
    --cc=yinan.wang@intel.com \
    --cc=yufengx.mo@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).