test suite reviews and discussions
 help / color / mirror / Atom feed
From: lingwei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: lingwei <weix.ling@intel.com>
Subject: [dts] [PATCH V1] tests/vhost_cbdma:assign the cores which nic in to start testpmd
Date: Wed,  4 Nov 2020 02:08:11 +0800	[thread overview]
Message-ID: <20201103180811.112226-1-weix.ling@intel.com> (raw)

assign the cores which nic in to start testpmd

Signed-off-by: lingwei <weix.ling@intel.com>
---
 tests/TestSuite_vhost_cbdma.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py
index e15839f..869765f 100644
--- a/tests/TestSuite_vhost_cbdma.py
+++ b/tests/TestSuite_vhost_cbdma.py
@@ -64,7 +64,8 @@ class TestVirTioVhostCbdma(TestCase):
         self.virtio_mac = "00:01:02:03:04:05"
         self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip']
         self.pci_info = self.dut.ports_info[0]['pci']
-        self.cores = self.dut.get_core_list("all")
+        self.socket = self.dut.get_numa_id(self.dut_ports[0])
+        self.cores = self.dut.get_core_list("all", socket=self.socket)
         self.cbdma_dev_infos = []
 
         self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
@@ -197,7 +198,7 @@ class TestVirTioVhostCbdma(TestCase):
 
         pvp_split_all_path_virtio_params = "--tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=%d --txd=%d " \
                                            "--rxd=%d" % (queue, txd_rxd, txd_rxd)
-        self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, txd_rxd, txd_rxd), self.cores[1:3],
+        self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, txd_rxd, txd_rxd), self.cores[0:2],
                                           dev=vhost_vdevs % (queue, dmathr), )
 
         for key, path_mode in dev_path_mode_mapper.items():
@@ -206,7 +207,7 @@ class TestVirTioVhostCbdma(TestCase):
                     queue, txd_rxd, txd_rxd)
             vdevs = f"'net_virtio_user0,mac={self.virtio_mac},path=/tmp/s0,{path_mode},queues=%d'" % queue
             self.diff_param_launch_send_and_verify(key, pvp_split_all_path_virtio_params, vdevs,
-                                                   self.cores[4:6],
+                                                   self.cores[2:4],
                                                    )
         self.result_table_print()
 
@@ -233,13 +234,13 @@ class TestVirTioVhostCbdma(TestCase):
         vhost_dev = f"'net_vhost0,iface={virtio_path},queues={queue},client=1,%s'"
 
         # launch vhost testpmd
-        self.launch_testpmd_as_vhost_user(eal_params, self.cores[27:29],
+        self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2],
                                           dev=vhost_dev % vhost_dmas)
         #
         #  queue 2 start virtio testpmd,virtio queue 2 to 1
         mode = "dynamic_queue2"
         self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_params,
-                                           self.cores[29:31],
+                                           self.cores[2:4],
                                            dev=virtio_dev)
         self.send_and_verify(mode)
         self.vhost_or_virtio_set_one_queue(self.virtio_user)
@@ -251,7 +252,7 @@ class TestVirTioVhostCbdma(TestCase):
         self.dut.send_expect(f"rm -rf {virtio_path}", "#")
         # queue 2 start virtio testpmd,vhost queue 2 to 1
         self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_params,
-                                           self.cores[29:31],
+                                           self.cores[2:4],
                                            dev=virtio_dev)
         mode = "Relaunch_dynamic_queue2"
         self.send_and_verify(mode)
@@ -264,7 +265,7 @@ class TestVirTioVhostCbdma(TestCase):
         mode = "Relaunch_vhost_2_cbdma"
         dmathr = 512
         vhost_dmas = f"dmas=[txq0@{self.used_cbdma[0]}],dmathr={dmathr}"
-        self.launch_testpmd_as_vhost_user(eal_params, self.cores[27:29],
+        self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2],
                                           dev=vhost_dev % vhost_dmas)
         self.send_and_verify(mode)
         self.virtio_user.send_expect("quit", "# ")
-- 
2.17.1


             reply	other threads:[~2020-11-03 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 18:08 lingwei [this message]
2020-11-03 10:12 ` Ling, WeiX
2020-11-04  1:42 ` 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=20201103180811.112226-1-weix.ling@intel.com \
    --to=weix.ling@intel.com \
    --cc=dts@dpdk.org \
    /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).