test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V2 1/2] test_plans/large_vf: modify script to adapt to changes in dpdk
@ 2023-02-09 10:46 Hongbo Li
  2023-02-09 10:46 ` [PATCH V2 2/2] tests/large_vf: " Hongbo Li
  0 siblings, 1 reply; 3+ messages in thread
From: Hongbo Li @ 2023-02-09 10:46 UTC (permalink / raw)
  To: dts; +Cc: Hongbo Li

1.after dpdk is modified, if all ports fail to start, dpdk still allows testpmd to enter the command line, instead of unconditionally terminating testpmd.
According to dpdk commit 7e40372522c("app/testpmd: fix interactive mode with no ports").

2.after driver is modified, the default RX rings available decreased(now from SW4.2 default number of queues are created according to the single NUMA CPU cores), so modify script to adapt.

Signed-off-by: Hongbo Li <hongbox.li@intel.com>
---
V2: modify the comments

 test_plans/large_vf_test_plan.rst | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/test_plans/large_vf_test_plan.rst b/test_plans/large_vf_test_plan.rst
index e043a660..0f2318de 100644
--- a/test_plans/large_vf_test_plan.rst
+++ b/test_plans/large_vf_test_plan.rst
@@ -264,25 +264,29 @@ Subcase 5: PF fdir + large VF fdir co-exist
 
 Start testpmd on VF0 with 256 queues.
 
-Create 10 rules on PF0, queue from [54~63]::
+Get RX rings available on DUT ::
 
-    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.21 src-port 22 action 63
-    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.22 src-port 22 action 62
-    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.23 src-port 22 action 61
+    ethtool -n enp96s0f0
+
+Create 10 rules on PF0, and the actions decrease from the maximum value of RX rings available::
+
+    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.21 src-port 22 action 35
+    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.22 src-port 22 action 34
+    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.23 src-port 22 action 33
     ...
-    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.30 src-port 22 action 54
+    ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.30 src-port 22 action 26
 
 Check rules on PF::
 
     ethtool -n enp96s0f0
 
-Send matched patches to PF::
+Send matched packet to PF::
 
     pkt1=Ether(dst="00:00:00:00:01:00")/IP(src=RandIP(),dst="192.168.0.21")/UDP(sport=22,dport=23)/Raw('x'*80)
     ......
     pkt10=Ether(dst="00:00:00:00:01:00")/IP(src=RandIP(),dst="192.168.0.30")/UDP(sport=22,dport=23)/Raw('x'*80)
 
-Check PF matched queue [54~63] could receive matched packet::
+Check PF matched queue could receive matched packet::
 
     ethtool -S enp96s0f0
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH V2 2/2] tests/large_vf: modify script to adapt to changes in dpdk
  2023-02-09 10:46 [dts][PATCH V2 1/2] test_plans/large_vf: modify script to adapt to changes in dpdk Hongbo Li
@ 2023-02-09 10:46 ` Hongbo Li
  2023-03-03  5:49   ` lijuan.tu
  0 siblings, 1 reply; 3+ messages in thread
From: Hongbo Li @ 2023-02-09 10:46 UTC (permalink / raw)
  To: dts; +Cc: Hongbo Li

1.after dpdk is modified, if all ports fail to start, dpdk still allows testpmd to enter the command line, instead of unconditionally terminating testpmd.
According to dpdk commit 7e40372522c("app/testpmd: fix interactive mode with no ports").

2.after driver is modified, the default RX rings available decreased(now from SW4.2 default number of queues are created according to the single NUMA CPU cores), so modify script to adapt.

Signed-off-by: Hongbo Li <hongbox.li@intel.com>
---
 tests/TestSuite_large_vf.py | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/tests/TestSuite_large_vf.py b/tests/TestSuite_large_vf.py
index 4e2ff1d6..fb03145e 100644
--- a/tests/TestSuite_large_vf.py
+++ b/tests/TestSuite_large_vf.py
@@ -110,8 +110,7 @@ different_queues_switch = {
 
 pf_large_vf_fdir_coexist = {
     "name": "test_pf_large_vf_fdir_coexist",
-    "param": [21, 63],
-    "check_param": (54, 63),
+    "param": [21],
     "count": 1,
 }
 
@@ -124,7 +123,7 @@ exceed_256_queues = {
 more_than_3_vfs_256_queues = {
     "name": "test_more_than_3_vfs_256_queues",
     "param": "--txq=256 --rxq=256",
-    "check_param": "Cause: Start ports failed",
+    "check_param": "Start ports failed",
 }
 
 max_vfs_256_queues_3 = [
@@ -296,6 +295,7 @@ class TestLargeVf(TestCase):
 
     def rte_flow_process(self, vectors):
         test_results = {}
+        self.rule_num = []
         for tv in vectors:
             try:
                 subcase_name = tv["name"]
@@ -322,14 +322,14 @@ class TestLargeVf(TestCase):
                         self.pmdout_list[0],
                         self.pf0_intf,
                         tv["param"][0],
-                        tv["param"][1],
+                        self.max_ring_num - 1,
                     )
                     self.send_pkts_pf_check(
                         self.pmdout_list[0],
                         self.pf0_intf,
                         self.pf0_mac,
                         tv["param"][0],
-                        tv["check_param"],
+                        self.rule_num,
                         tv["count"],
                     )
                     self.create_fdir_rule(vectors[0]["rule"])
@@ -373,11 +373,14 @@ class TestLargeVf(TestCase):
                                 + "-- -i "
                                 + tv["param"]
                             )
-                            out = self.pmd_output.execute_cmd(cmd, "#")
+                            out = self.pmd_output.execute_cmd(
+                                cmd, "testpmd> ", timeout=30
+                            )
                             self.verify(
                                 tv["check_param"] in out,
                                 "fail: testpmd start successfully",
                             )
+                            self.pmd_output.quit()
                             self.pmdout_list[0].execute_cmd("quit", "# ")
                             break
                         else:
@@ -399,11 +402,12 @@ class TestLargeVf(TestCase):
                                     + "-- -i "
                                     + tv["param"]
                                 )
-                                out = self.pmd_output.execute_cmd(cmd, "#")
+                                out = self.pmd_output.execute_cmd(cmd, "testpmd> ")
                                 self.verify(
                                     tv["check_param"] in out,
                                     "fail: testpmd start successfully",
                                 )
+                                self.pmd_output.quit()
                                 # quit all testpmd
                                 self.pmdout_list[0].execute_cmd("quit", "# ")
                                 self.pmdout_list[1].execute_cmd("quit", "# ")
@@ -515,6 +519,7 @@ class TestLargeVf(TestCase):
                 pf_intf, ip, action
             )
             pmdout.execute_cmd(cmd, "#")
+            self.rule_num.append(action)
             ip += 1
             action -= 1
         self.validation_pf_rule(pmdout, pf_intf, 10)
@@ -534,7 +539,7 @@ class TestLargeVf(TestCase):
             ip += 1
         time.sleep(1)
         out = pmdout.execute_cmd("ethtool -S %s" % pf_intf, "# ")
-        for queue in range(check_param[0], check_param[1] + 1):
+        for queue in check_param:
             packet_str = "rx_queue_%d_packets: (\d+)" % queue
             packet = re.search(packet_str, out).group(1)
             self.verify(
@@ -544,8 +549,10 @@ class TestLargeVf(TestCase):
 
     def destroy_pf_rule(self, pmdout, pf_intf):
         rule_str = "Filter:.*?(\d+)"
+        max_ring_str = "(\d+) RX rings available"
         out = pmdout.execute_cmd("ethtool -n %s" % pf_intf, "#")
         rule_list = re.findall(rule_str, out)
+        self.max_ring_num = int(re.search(max_ring_str, out).group(1))
         if rule_list:
             for rule in rule_list:
                 cmd = "ethtool -N {} delete {}".format(pf_intf, rule)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH V2 2/2] tests/large_vf: modify script to adapt to changes in dpdk
  2023-02-09 10:46 ` [PATCH V2 2/2] tests/large_vf: " Hongbo Li
@ 2023-03-03  5:49   ` lijuan.tu
  0 siblings, 0 replies; 3+ messages in thread
From: lijuan.tu @ 2023-03-03  5:49 UTC (permalink / raw)
  To: dts, Hongbo Li; +Cc: Hongbo Li

On Thu,  9 Feb 2023 18:46:33 +0800, Hongbo Li <hongbox.li@intel.com> wrote:
> 1.after dpdk is modified, if all ports fail to start, dpdk still allows testpmd to enter the command line, instead of unconditionally terminating testpmd.
> According to dpdk commit 7e40372522c("app/testpmd: fix interactive mode with no ports").
> 
> 2.after driver is modified, the default RX rings available decreased(now from SW4.2 default number of queues are created according to the single NUMA CPU cores), so modify script to adapt.
> 
> Signed-off-by: Hongbo Li <hongbox.li@intel.com>


Series applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-03  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 10:46 [dts][PATCH V2 1/2] test_plans/large_vf: modify script to adapt to changes in dpdk Hongbo Li
2023-02-09 10:46 ` [PATCH V2 2/2] tests/large_vf: " Hongbo Li
2023-03-03  5:49   ` lijuan.tu

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).