test suite reviews and discussions
 help / color / mirror / Atom feed
* [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case
@ 2022-12-23  1:02 Ke Xu
  2022-12-23  1:02 ` [DTS][PATCH V2 1/3] test_plans/vf_offload: fix wrong example packets Ke Xu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ke Xu @ 2022-12-23  1:02 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, qi.fu, yuan.peng, ke1.xu

Long packet and repeating packet sending helps triggering potential failures.
 For example, in DPDK 20.11 there was an MDD problem when handling long
 packets with TSO enabled.

This patch implemented packets count that sends multiple packets of one
 packet combination to trigger problems only happen under massive packets
 received. This patch also implemented random payload.

This patch added super-long packet of payload length of 8500. This helps
 triggering potential issues of ex-limit input.

Ke Xu (3):
  test_plans/vf_offload: fix wrong example packets.
  test_plans/vf_offload: add packets count, super-long packets and
    random payload to the case.
  tests/vf_offload: implement packets count, super-long packet and
    random payload.

 test_plans/vf_offload_test_plan.rst | 155 +++++++++++++++-------------
 tests/TestSuite_vf_offload.py       |  66 +++++++-----
 2 files changed, 122 insertions(+), 99 deletions(-)

-- 
2.25.1


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

* [DTS][PATCH V2 1/3] test_plans/vf_offload: fix wrong example packets.
  2022-12-23  1:02 [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Ke Xu
@ 2022-12-23  1:02 ` Ke Xu
  2022-12-23  1:02 ` [DTS][PATCH V2 2/3] test_plans/vf_offload: add packets count, super-long packets and random payload to the case Ke Xu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ke Xu @ 2022-12-23  1:02 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, qi.fu, yuan.peng, ke1.xu

Here we are to use TCP packets for TSO but UDP is listed in the test plan.

Signed-off-by: Ke Xu <ke1.xu@intel.com>
---
 test_plans/vf_offload_test_plan.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst
index 00b221ca..e5804fbf 100644
--- a/test_plans/vf_offload_test_plan.rst
+++ b/test_plans/vf_offload_test_plan.rst
@@ -427,11 +427,11 @@ Launch the userland ``testpmd`` application on DUT as follows::
 
 Test IPv4() in scapy::
 
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
 
 Test IPv6() in scapy::
 
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
 
 
 Test case: csum fwd engine, use tunnel TSO
@@ -479,9 +479,9 @@ Launch the userland ``testpmd`` application on DUT as follows::
 Test IPv4() in scapy::
 
   for one_outer_packet in outer_packet_list:
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
 
 Test IPv6() in scapy::
 
   for one_outer_packet in outer_packet_list:
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
-- 
2.25.1


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

* [DTS][PATCH V2 2/3] test_plans/vf_offload: add packets count, super-long packets and random payload to the case.
  2022-12-23  1:02 [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Ke Xu
  2022-12-23  1:02 ` [DTS][PATCH V2 1/3] test_plans/vf_offload: fix wrong example packets Ke Xu
@ 2022-12-23  1:02 ` Ke Xu
  2022-12-23  1:02 ` [DTS][PATCH V2 3/3] tests/vf_offload: implement packets count, super-long packet and random payload Ke Xu
  2022-12-26  1:54 ` [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Fu, Qi
  3 siblings, 0 replies; 5+ messages in thread
From: Ke Xu @ 2022-12-23  1:02 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, qi.fu, yuan.peng, ke1.xu

Long packet and repeating packet sending helps triggering potential failures.
 For example, in DPDK 20.11 there was an MDD problem when handling long
 packets with TSO enabled.

Signed-off-by: Ke Xu <ke1.xu@intel.com>
---
 test_plans/vf_offload_test_plan.rst | 155 +++++++++++++++-------------
 1 file changed, 81 insertions(+), 74 deletions(-)

diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst
index e5804fbf..00548a5a 100644
--- a/test_plans/vf_offload_test_plan.rst
+++ b/test_plans/vf_offload_test_plan.rst
@@ -316,75 +316,83 @@ on csum and enable tunnel tso as below::
   testpmd> tunnel_tso set 800 1
 
 Configure the traffic generator to send the multiple packets for the following
-combination:
-
-  +----------------+----------------------------------------+
-  | packet type    | packet organization                    |
-  +================+========================================+
-  |                | Ether / IPv4 / TCP / payload len 128   |
-  |                +----------------------------------------+
-  |                | Ether / IPv4 / TCP / payload len 800   |
-  |                +----------------------------------------+
-  |                | Ether / IPv4 / TCP / payload len 801   |
-  |                +----------------------------------------+
-  |                | Ether / IPv4 / TCP / payload len 1700  |
-  | non-tunneling  +----------------------------------------+
-  | packets for    | Ether / IPv4 / TCP / payload len 2500  |
-  | TSO test       +----------------------------------------+
-  |                | Ether / IPv6 / TCP / payload len 128   |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / TCP / payload len 800   |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / TCP / payload len 801   |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / TCP / payload len 1700  |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / TCP / payload len 2500  |
-  +----------------+----------------------------------------+
-  |                | Ether / IPv4 / UDP / VXLAN / Ether     |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / UDP / VXLAN / Ether     |
-  |                +----------------------------------------+
-  |                | Ether / IPv4 / GRE                     |
-  | outer and      +----------------------------------------+
-  | tunneling      | Ether / IPv4 / GRE / Ether             |
-  | packets        +----------------------------------------+
-  | for tso test   | Ether / IPv6 / GRE                     |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / GRE / Ether             |
-  |                +----------------------------------------+
-  |                | Ether / IPv4 / NVGRE                   |
-  |                +----------------------------------------+
-  |                | Ether / IPv4 / NVGRE / Ether           |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / NVGRE                   |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / NVGRE / Ether           |
-  |                +----------------------------------------+
-  |                | Ether / IPv4 / UDP / GTPU              |
-  |                +----------------------------------------+
-  |                | Ether / IPv6 / UDP / GTPU              |
-  +----------------+----------------------------------------+
-  |                | IPv4 / TCP / payload len 128           |
-  |                +----------------------------------------+
-  |                | IPv4 / TCP / payload len 800           |
-  |                +----------------------------------------+
-  |                | IPv4 / TCP / payload len 801           |
-  |                +----------------------------------------+
-  |                | IPv4 / TCP / payload len 1700          |
-  |                +----------------------------------------+
-  | inner packets  | IPv4 / TCP / payload len 2500          |
-  | for TSO test   +----------------------------------------+
-  |                | IPv6 / TCP / payload len 128           |
-  |                +----------------------------------------+
-  |                | IPv6 / TCP / payload len 800           |
-  |                +----------------------------------------+
-  |                | IPv6 / TCP / payload len 801           |
-  |                +----------------------------------------+
-  |                | IPv6 / TCP / payload len 1700          |
-  |                +----------------------------------------+
-  |                | IPv6 / TCP / payload len 2500          |
-  +----------------+----------------------------------------+
+combination, each combination for several times:
+
+  +----------------+----------------------------------------+---------------+
+  | packet type    | packet organization                    | packet count  |
+  +================+========================================+===============+
+  |                | Ether / IPv4 / TCP / payload len 128   | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / TCP / payload len 800   | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / TCP / payload len 801   | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / TCP / payload len 1700  | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / TCP / payload len 2500  | 10            |
+  | non-tunneling  +----------------------------------------+---------------+
+  | packets for    | Ether / IPv4 / TCP / payload len 8500  | 1000          |
+  | TSO test       +----------------------------------------+---------------+
+  |                | Ether / IPv6 / TCP / payload len 128   | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / TCP / payload len 800   | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / TCP / payload len 801   | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / TCP / payload len 1700  | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / TCP / payload len 2500  | 10            |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / TCP / payload len 8500  | 1000          |
+  +----------------+----------------------------------------+---------------+
+  |                | Ether / IPv4 / UDP / VXLAN / Ether     | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / UDP / VXLAN / Ether     | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / GRE                     | N/A           |
+  | outer and      +----------------------------------------+---------------+
+  | tunneling      | Ether / IPv4 / GRE / Ether             | N/A           |
+  | packets        +----------------------------------------+---------------+
+  | for tso test   | Ether / IPv6 / GRE                     | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / GRE / Ether             | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / NVGRE                   | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / NVGRE / Ether           | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / NVGRE                   | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / NVGRE / Ether           | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv4 / UDP / GTPU              | N/A           |
+  |                +----------------------------------------+---------------+
+  |                | Ether / IPv6 / UDP / GTPU              | N/A           |
+  +----------------+----------------------------------------+---------------+
+  |                | IPv4 / TCP / payload len 128           | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv4 / TCP / payload len 800           | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv4 / TCP / payload len 801           | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv4 / TCP / payload len 1700          | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv4 / TCP / payload len 2500          | 10            |
+  |                +----------------------------------------+---------------+
+  | inner packets  | IPv4 / TCP / payload len 8500          | 1000          |
+  | for TSO test   +----------------------------------------+---------------+
+  |                | IPv6 / TCP / payload len 128           | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv6 / TCP / payload len 800           | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv6 / TCP / payload len 801           | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv6 / TCP / payload len 1700          | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv6 / TCP / payload len 2500          | 10            |
+  |                +----------------------------------------+---------------+
+  |                | IPv6 / TCP / payload len 8500          | 1000          |
+  +----------------+----------------------------------------+---------------+
   
 Notice that VxLAN needs DCF to configure, so testing of VxLAN may need to perform
 on DCF.
@@ -427,12 +435,11 @@ Launch the userland ``testpmd`` application on DUT as follows::
 
 Test IPv4() in scapy::
 
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s)
 
 Test IPv6() in scapy::
 
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
-
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s)
 
 Test case: csum fwd engine, use tunnel TSO
 ==========================================
@@ -479,9 +486,9 @@ Launch the userland ``testpmd`` application on DUT as follows::
 Test IPv4() in scapy::
 
   for one_outer_packet in outer_packet_list:
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s)
 
 Test IPv6() in scapy::
 
   for one_outer_packet in outer_packet_list:
-    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s")
+    sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s)
-- 
2.25.1


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

* [DTS][PATCH V2 3/3] tests/vf_offload: implement packets count, super-long packet and random payload.
  2022-12-23  1:02 [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Ke Xu
  2022-12-23  1:02 ` [DTS][PATCH V2 1/3] test_plans/vf_offload: fix wrong example packets Ke Xu
  2022-12-23  1:02 ` [DTS][PATCH V2 2/3] test_plans/vf_offload: add packets count, super-long packets and random payload to the case Ke Xu
@ 2022-12-23  1:02 ` Ke Xu
  2022-12-26  1:54 ` [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Fu, Qi
  3 siblings, 0 replies; 5+ messages in thread
From: Ke Xu @ 2022-12-23  1:02 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, qi.fu, yuan.peng, ke1.xu

Implemented packets count that sends multiple packets of one packet combination.

Implemented random payload.

Added super-long packet of payload length of 8500.

Signed-off-by: Ke Xu <ke1.xu@intel.com>
---
 tests/TestSuite_vf_offload.py | 66 ++++++++++++++++++++++-------------
 1 file changed, 41 insertions(+), 25 deletions(-)

diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index 6765fcc5..f76a9f54 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -765,7 +765,14 @@ class TestVfOffload(TestCase):
             self.tester.get_local_port(self.dut_ports[1])
         )
 
-        self.loading_sizes = [128, 800, 801, 1700, 2500]
+        self.size_and_count = [
+            (128, 10),
+            (800, 10),
+            (801, 10),
+            (1700, 10),
+            (2500, 10),
+            (8500, 1000)
+        ]
 
         self.tester.send_expect(
             "ethtool -K %s rx off tx off tso off gso off gro off lro off"
@@ -839,13 +846,13 @@ class TestVfOffload(TestCase):
         self.tester.scapy_foreground()
         time.sleep(5)
 
-        for loading_size in self.loading_sizes:
+        for loading_size, packet_count in self.size_and_count:
             # IPv4 tcp test
             out = self.vm0_testpmd.execute_cmd("clear port info all", "testpmd> ", 120)
             self.tcpdump_start_sniffing([tx_interface, rx_interface])
             self.tester.scapy_append(
-                'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")'
-                % (mac, loading_size, tx_interface)
+                'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count=%s)'
+                % (mac, loading_size, tx_interface, packet_count)
             )
             out = self.tester.scapy_execute()
             out = self.vm0_testpmd.execute_cmd("show port stats all")
@@ -858,29 +865,29 @@ class TestVfOffload(TestCase):
             self.logger.info(tx_outlist)
             if loading_size <= 800:
                 self.verify(
-                    rx_stats == tx_stats and int(tx_outlist[0]) == loading_size,
+                    rx_stats == tx_stats and all([int(tx_outlist[j]) == loading_size for j in range(packet_count)]),
                     "IPV4 RX or TX packet number not correct",
                 )
             else:
                 num = loading_size // 800
                 for i in range(num):
                     self.verify(
-                        int(tx_outlist[i]) == 800,
+                        all([int(tx_outlist[i * packet_count + j]) == 800 for j in range(packet_count)]),
                         "the packet segmentation incorrect, %s" % tx_outlist,
                     )
                 if loading_size % 800 != 0:
                     self.verify(
-                        int(tx_outlist[num]) == loading_size % 800,
+                        all([int(tx_outlist[num * packet_count + j]) == loading_size % 800 for j in range(packet_count)]),
                         "the packet segmentation incorrect, %s" % tx_outlist,
                     )
 
-        for loading_size in self.loading_sizes:
+        for loading_size, packet_count in self.size_and_count:
             # IPv6 tcp test
             out = self.vm0_testpmd.execute_cmd("clear port info all", "testpmd> ", 120)
             self.tcpdump_start_sniffing([tx_interface, rx_interface])
             self.tester.scapy_append(
-                'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")'
-                % (mac, loading_size, tx_interface)
+                'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count=%s)'
+                % (mac, loading_size, tx_interface, packet_count)
             )
             out = self.tester.scapy_execute()
             out = self.vm0_testpmd.execute_cmd("show port stats all")
@@ -893,19 +900,19 @@ class TestVfOffload(TestCase):
             self.logger.info(tx_outlist)
             if loading_size <= 800:
                 self.verify(
-                    rx_stats == tx_stats and int(tx_outlist[0]) == loading_size,
+                    rx_stats == tx_stats and all([int(tx_outlist[j]) == loading_size for j in range(packet_count)]),
                     "IPV6 RX or TX packet number not correct",
                 )
             else:
                 num = loading_size // 800
                 for i in range(num):
                     self.verify(
-                        int(tx_outlist[i]) == 800,
+                        all([int(tx_outlist[i * packet_count + j]) == 800 for j in range(packet_count)]),
                         "the packet segmentation incorrect, %s" % tx_outlist,
                     )
                 if loading_size % 800 != 0:
                     self.verify(
-                        int(tx_outlist[num]) == loading_size % 800,
+                        all([int(tx_outlist[num * packet_count + j]) == loading_size % 800 for j in range(packet_count)]),
                         "the packet segmentation incorrect, %s" % tx_outlist,
                     )
 
@@ -924,7 +931,14 @@ class TestVfOffload(TestCase):
             self.tester.get_local_port(self.vm0_dut_ports[1])
         )
 
-        self.loading_sizes = [128, 800, 801, 1700, 2500]
+        self.size_and_count = [
+            (128, 10),
+            (800, 10),
+            (801, 10),
+            (1700, 10),
+            (2500, 10),
+            (8500, 1000)
+        ]
 
         self.tester.send_expect(
             "ethtool -K %s rx off tx off tso off gso off gro off lro off"
@@ -981,7 +995,7 @@ class TestVfOffload(TestCase):
         time.sleep(5)
 
         for key_outer in pkts_outer:
-            for loading_size in self.loading_sizes:
+            for loading_size, packet_count in self.size_and_count:
                 # IPv4 tcp test
                 out = self.vm0_testpmd.execute_cmd(
                     "clear port info all", "testpmd> ", 120
@@ -995,9 +1009,9 @@ class TestVfOffload(TestCase):
                     (
                         'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/'
                         + pkts_outer[key_outer]
-                        + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")'
+                        + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count = %s)'
                     )
-                    % (mac, loading_size, tx_interface)
+                    % (mac, loading_size, tx_interface, packet_count)
                 )
                 out = self.tester.scapy_execute()
                 out = self.vm0_testpmd.execute_cmd("show port stats all")
@@ -1005,26 +1019,27 @@ class TestVfOffload(TestCase):
                 self.tcpdump_stop_sniff()
                 rx_stats, payload_size_list = self.tcpdump_analyse_sniff(rx_interface)
                 tx_stats, _ = self.tcpdump_analyse_sniff(tx_interface)
+                payload_size_list.sort(reverse=True)
                 self.logger.info(payload_size_list)
                 if loading_size <= 800:
                     self.verify(
-                        rx_stats == tx_stats and payload_size_list[0] == loading_size,
+                        rx_stats == tx_stats and all([payload_size_list == loading_size for j in range(packet_count)]),
                         f"{key_outer} tunnel IPV4 RX or TX packet number not correct",
                     )
                 else:
                     num = loading_size // 800
                     for i in range(num):
                         self.verify(
-                            payload_size_list[i] == 800,
+                            all([payload_size_list[i * packet_count + j] == 800 for j in range(packet_count)]),
                             "the packet segmentation incorrect, %s" % payload_size_list,
                         )
                     if loading_size % 800 != 0:
                         self.verify(
-                            payload_size_list[num] == loading_size % 800,
+                            all([payload_size_list[num * packet_count + j] == loading_size % 800 for j in range(packet_count)]),
                             "the packet segmentation incorrect, %s" % payload_size_list,
                         )
 
-            for loading_size in self.loading_sizes:
+            for loading_size, packet_count in self.size_and_count:
                 # IPv6 tcp test
                 out = self.vm0_testpmd.execute_cmd(
                     "clear port info all", "testpmd> ", 120
@@ -1040,7 +1055,7 @@ class TestVfOffload(TestCase):
                         + pkts_outer[key_outer]
                         + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")'
                     )
-                    % (mac, loading_size, tx_interface)
+                    % (mac, loading_size, tx_interface, packet_count)
                 )
                 out = self.tester.scapy_execute()
                 out = self.vm0_testpmd.execute_cmd("show port stats all")
@@ -1048,22 +1063,23 @@ class TestVfOffload(TestCase):
                 self.tcpdump_stop_sniff()
                 rx_stats, payload_size_list = self.tcpdump_analyse_sniff(rx_interface)
                 tx_stats, _ = self.tcpdump_analyse_sniff(tx_interface)
+                payload_size_list.sort(reverse=True)
                 self.logger.info(payload_size_list)
                 if loading_size <= 800:
                     self.verify(
-                        rx_stats == tx_stats and payload_size_list[0] == loading_size,
+                        rx_stats == tx_stats and all([payload_size_list[j] == loading_size for j in range(packet_count)]),
                         f"{key_outer} tunnel IPV6 RX or TX packet number not correct",
                     )
                 else:
                     num = loading_size // 800
                     for i in range(num):
                         self.verify(
-                            payload_size_list[i] == 800,
+                            all([payload_size_list[i * packet_count + j] == 800 for j in range(packet_count)]),
                             "the packet segmentation incorrect, %s" % payload_size_list,
                         )
                     if loading_size % 800 != 0:
                         self.verify(
-                            payload_size_list[num] == loading_size % 800,
+                            all([payload_size_list[num * packet_count + j] == loading_size % 800 for j in range(packet_count)]),
                             "the packet segmentation incorrect, %s" % payload_size_list,
                         )
 
-- 
2.25.1


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

* RE: [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case
  2022-12-23  1:02 [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Ke Xu
                   ` (2 preceding siblings ...)
  2022-12-23  1:02 ` [DTS][PATCH V2 3/3] tests/vf_offload: implement packets count, super-long packet and random payload Ke Xu
@ 2022-12-26  1:54 ` Fu, Qi
  3 siblings, 0 replies; 5+ messages in thread
From: Fu, Qi @ 2022-12-26  1:54 UTC (permalink / raw)
  To: Xu, Ke1, dts; +Cc: Tu, Lijuan, Peng, Yuan

Acked-by: Fu, Qi <qi.fu@intel.com>

> -----Original Message-----
> From: Xu, Ke1 <ke1.xu@intel.com>
> Sent: Friday, December 23, 2022 9:03 AM
> To: dts@dpdk.org
> Cc: Tu, Lijuan <lijuan.tu@intel.com>; Fu, Qi <qi.fu@intel.com>; Peng, Yuan
> <yuan.peng@intel.com>; Xu, Ke1 <ke1.xu@intel.com>
> Subject: [DTS][PATCH V2 0/3] add packets count, super-long packets and
> random payload to the case
> 
> Long packet and repeating packet sending helps triggering potential failures.
>  For example, in DPDK 20.11 there was an MDD problem when handling
> long  packets with TSO enabled.
> 
> This patch implemented packets count that sends multiple packets of one
> packet combination to trigger problems only happen under massive packets
> received. This patch also implemented random payload.
> 
> This patch added super-long packet of payload length of 8500. This helps
> triggering potential issues of ex-limit input.
> 
> Ke Xu (3):
>   test_plans/vf_offload: fix wrong example packets.
>   test_plans/vf_offload: add packets count, super-long packets and
>     random payload to the case.
>   tests/vf_offload: implement packets count, super-long packet and
>     random payload.
> 
>  test_plans/vf_offload_test_plan.rst | 155 +++++++++++++++-------------
>  tests/TestSuite_vf_offload.py       |  66 +++++++-----
>  2 files changed, 122 insertions(+), 99 deletions(-)
> 
> --
> 2.25.1


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

end of thread, other threads:[~2022-12-26  1:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23  1:02 [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Ke Xu
2022-12-23  1:02 ` [DTS][PATCH V2 1/3] test_plans/vf_offload: fix wrong example packets Ke Xu
2022-12-23  1:02 ` [DTS][PATCH V2 2/3] test_plans/vf_offload: add packets count, super-long packets and random payload to the case Ke Xu
2022-12-23  1:02 ` [DTS][PATCH V2 3/3] tests/vf_offload: implement packets count, super-long packet and random payload Ke Xu
2022-12-26  1:54 ` [DTS][PATCH V2 0/3] add packets count, super-long packets and random payload to the case Fu, Qi

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