test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhou Jun <junx.w.zhou@intel.com>
To: dts@dpdk.org
Cc: Zhou Jun <junx.w.zhou@intel.com>
Subject: [dts] [dts 05/28] tests/TestSuite_ip_pipeline:Modify the hard coded app parameter to call the platform interface
Date: Tue,  8 Dec 2020 18:06:04 +0800	[thread overview]
Message-ID: <20201208100627.9792-6-junx.w.zhou@intel.com> (raw)
In-Reply-To: <20201208100627.9792-1-junx.w.zhou@intel.com>

Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
---
 tests/TestSuite_ip_pipeline.py | 50 +++++++++++++++-------------------
 1 file changed, 22 insertions(+), 28 deletions(-)

diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py
index c9a473ec..0d5a114b 100644
--- a/tests/TestSuite_ip_pipeline.py
+++ b/tests/TestSuite_ip_pipeline.py
@@ -217,6 +217,8 @@ class TestIPPipeline(TestCase):
         self.vf2_mac = "00:11:22:33:44:57"
         self.vf3_mac = "00:11:22:33:44:58"
 
+        ports = [self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci]
+        self.eal_para = self.dut.create_eal_parameters(cores=list(range(2)), ports=ports)
         self.sriov_vfs_port = []
         self.session_secondary = self.dut.new_session()
 
@@ -245,11 +247,9 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i -e 's/0000:06:00.1/%s/' ./examples/ip_pipeline/examples/route.cli" % self.dut_p3_pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)
         SCRIPT_FILE = "./examples/ip_pipeline/examples/route.cli"
 
-        cmd = "{0} -c 0x3 -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_PORTS, SCRIPT_FILE)
+        cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, self.eal_para, SCRIPT_FILE)
         self.dut.send_expect(cmd, "30:31:32:33:34:35", 60)
 
         #rule 0 test
@@ -313,11 +313,9 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i -e 's/0000:06:00.1/%s/' ./examples/ip_pipeline/examples/firewall.cli" % self.dut_p3_pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)
         SCRIPT_FILE = "./examples/ip_pipeline/examples/firewall.cli"
 
-        cmd = "{0} -c 0x3 -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_PORTS, SCRIPT_FILE)
+        cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, self.eal_para, SCRIPT_FILE)
         self.dut.send_expect(cmd, "fwd port 3", 60)
 
         #rule 0 test
@@ -381,11 +379,9 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i -e 's/0000:06:00.1/%s/' ./examples/ip_pipeline/examples/flow.cli" % self.dut_p3_pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)
         SCRIPT_FILE = "./examples/ip_pipeline/examples/flow.cli"
 
-        cmd = "{0} -c 0x3 -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_PORTS, SCRIPT_FILE)
+        cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, self.eal_para, SCRIPT_FILE)
         self.dut.send_expect(cmd, "fwd port 3", 60)
 
         #rule 0 test
@@ -449,11 +445,9 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i -e 's/0000:06:00.1/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.dut_p3_pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)
         SCRIPT_FILE = "./examples/ip_pipeline/examples/l2fwd.cli"
 
-        cmd = "{0} -c 0x3 -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_PORTS, SCRIPT_FILE)
+        cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, self.eal_para, SCRIPT_FILE)
         self.dut.send_expect(cmd, "fwd port 2", 60)
 
         #rule 0 test
@@ -519,22 +513,22 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i '/mempool MEMPOOL0/a\link LINK0 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[0][0].pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_PF_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)
-        PF_SCRIPT_FILE = "--file-prefix=pf --socket-mem 1024,1024"
+        DUT_PF_PORTS = [self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci]
+        PF_SCRIPT_FILE = "--socket-mem 1024,1024"
 
-        DUT_VF_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.sriov_vfs_port[0][0].pci, self.sriov_vfs_port[1][0].pci, self.sriov_vfs_port[2][0].pci, self.sriov_vfs_port[3][0].pci)
+        DUT_VF_PORTS = [self.sriov_vfs_port[0][0].pci, self.sriov_vfs_port[1][0].pci, self.sriov_vfs_port[2][0].pci, self.sriov_vfs_port[3][0].pci]
         VF_SCRIPT_FILE = "./examples/ip_pipeline/examples/l2fwd.cli"
 
-        pf_cmd = "{0} -c 0xf0 -n 4 {1} {2} -- -i".format(self.app_testpmd_path, DUT_PF_PORTS, PF_SCRIPT_FILE)
+        pf_eal_para = self.dut.create_eal_parameters(cores=list(range(4, 8)), prefix='pf', ports=DUT_PF_PORTS)
+        pf_cmd = "{0} {1} {2} -- -i".format(self.app_testpmd_path, pf_eal_para, PF_SCRIPT_FILE)
         self.dut.send_expect(pf_cmd, "testpmd> ", 60)
         self.dut.send_expect("set vf mac addr 0 0 %s" % self.vf0_mac, "testpmd> ", 30)
         self.dut.send_expect("set vf mac addr 1 0 %s" % self.vf1_mac, "testpmd> ", 30)
         self.dut.send_expect("set vf mac addr 2 0 %s" % self.vf2_mac, "testpmd> ", 30)
         self.dut.send_expect("set vf mac addr 3 0 %s" % self.vf3_mac, "testpmd> ", 30)
 
-        vf_cmd = "{0} -c 0x3 -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_VF_PORTS, VF_SCRIPT_FILE)
+        vf_eal_para = self.dut.create_eal_parameters(cores=list(range(2)), ports=DUT_VF_PORTS)
+        vf_cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, vf_eal_para, VF_SCRIPT_FILE)
         self.session_secondary.send_expect(vf_cmd, "fwd port 2", 60)
 
         #rule 0 test
@@ -599,11 +593,11 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i '/mempool MEMPOOL0/a\link LINK0 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[0][0].pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_VF_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.sriov_vfs_port[0][0].pci, self.sriov_vfs_port[1][0].pci, self.sriov_vfs_port[2][0].pci, self.sriov_vfs_port[3][0].pci)
+        DUT_VF_PORTS = [self.sriov_vfs_port[0][0].pci, self.sriov_vfs_port[1][0].pci, self.sriov_vfs_port[2][0].pci, self.sriov_vfs_port[3][0].pci]
         VF_SCRIPT_FILE = "./examples/ip_pipeline/examples/l2fwd.cli"
 
-        vf_cmd = "{0} -c 0x3 -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_VF_PORTS, VF_SCRIPT_FILE)
+        vf_eal_para = self.dut.create_eal_parameters(cores=list(range(2)), ports=DUT_VF_PORTS)
+        vf_cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, vf_eal_para, VF_SCRIPT_FILE)
         self.session_secondary.send_expect(vf_cmd, "fwd port 2", 60)
 
         #rule 0 test
@@ -665,11 +659,11 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i -e 's/0000:02:00.1/%s/' ./examples/ip_pipeline/examples/tap.cli" % self.dut_p1_pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_PORTS = " -w {0} -w {1} "\
-                    .format(self.dut_p0_pci, self.dut_p1_pci)
+        DUT_PORTS = [self.dut_p0_pci, self.dut_p1_pci]
         SCRIPT_FILE = "./examples/ip_pipeline/examples/tap.cli"
 
-        cmd = "{0} -c 0x3 -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_PORTS, SCRIPT_FILE)
+        eal_para = self.dut.create_eal_parameters(cores=list(range(2)), ports=DUT_PORTS)
+        cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, eal_para, SCRIPT_FILE)
         self.dut.send_expect(cmd, "fwd port 3", 60)
 
         tap_session = self.dut.new_session()
@@ -722,11 +716,11 @@ class TestIPPipeline(TestCase):
         cmd = "sed -i -e 's/0000:06:00.1/%s/' ./examples/ip_pipeline/examples/rss.cli" % self.dut_p3_pci
         self.dut.send_expect(cmd, "# ", 20)
 
-        DUT_PORTS = " -w {0} -w {1} -w {2} -w {3} "\
-                    .format(self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci)
+        DUT_PORTS = [self.dut_p0_pci, self.dut_p1_pci, self.dut_p2_pci, self.dut_p3_pci]
         SCRIPT_FILE = "./examples/ip_pipeline/examples/rss.cli"
 
-        cmd = "{0} -c 0x1f -n 4 {1} -- -s {2}".format(self.app_ip_pipline_path, DUT_PORTS, SCRIPT_FILE)
+        eal_para = self.dut.create_eal_parameters(cores=list(range(5)), ports=DUT_PORTS)
+        cmd = "{0} {1} -- -s {2}".format(self.app_ip_pipline_path, eal_para, SCRIPT_FILE)
         self.dut.send_expect(cmd, "PIPELINE3 enable", 60)
 
         #rule 0 test
-- 
2.17.1


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

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 10:05 [dts] [PATCH V1 00/28] Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 01/28] tests/TestSuite_hello_world:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 02/28] tests/TestSuite_hotplug:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 03/28] tests/TestSuite_inline_ipsec:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 04/28] tests/TestSuite_interrupt_pmd:Modify " Zhou Jun
2020-12-08 10:06 ` Zhou Jun [this message]
2020-12-08 10:06 ` [dts] [dts 06/28] tests/TestSuite_ipfrag:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 07/28] tests/TestSuite_ipv4_reassembly:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 08/28] tests/TestSuite_keep_alive:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 09/28] tests/TestSuite_kni:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 10/28] tests/TestSuite_l2fwd_jobstats:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 11/28] tests/TestSuite_l3fwdacl:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 12/28] tests/TestSuite_link_status_interrupt:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 13/28] tests/TestSuite_metering_and_policing:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 14/28] tests/TestSuite_multicast:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 15/28] tests/TestSuite_multiprocess:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 16/28] tests/TestSuite_packet_ordering:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 17/28] tests/TestSuite_pmdpcap:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 18/28] tests/TestSuite_pmdrss_hash:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 19/28] tests/TestSuite_pmdrssreta:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 20/28] tests/TestSuite_ptpclient:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 21/28] tests/TestSuite_queue_start_stop:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 22/28] tests/TestSuite_rxtx_callbacks:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 23/28] tests/TestSuite_short_live:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 24/28] tests/TestSuite_skeleton:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 25/28] tests/TestSuite_softnic:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 26/28] tests/TestSuite_timer:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 27/28] tests/TestSuite_tso:Modify " Zhou Jun
2020-12-08 10:06 ` [dts] [dts 28/28] tests/TestSuite_userspace_ethtool:Modify " Zhou Jun
2020-12-09  1:53 ` [dts] [PATCH V1 00/28] Modify " Zhao, HaiyangX
2020-12-10  8:43 ` 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=20201208100627.9792-6-junx.w.zhou@intel.com \
    --to=junx.w.zhou@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).