[V1] tests/multiprocess: modify script to suport i40e driver

Message ID 20220624155953.6335-1-songx.jiale@intel.com (mailing list archive)
State Superseded
Headers
Series [V1] tests/multiprocess: modify script to suport i40e driver |

Checks

Context Check Description
ci/Intel-dts-format-test fail Testing issues
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-doc-test success Testing OK
ci/Intel-dts-suite-test success Testing OK

Commit Message

Jiale, SongX June 24, 2022, 3:59 p.m. UTC
  1.add IPv6_RAW type packet.
2.i40e driver only rss for IP and IPv6 packets by default, modify the case to support i40e driver.

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 framework/packet.py                   |  1 +
 test_plans/multiprocess_test_plan.rst |  1 +
 tests/TestSuite_multiprocess.py       | 15 +++++++++++----
 3 files changed, 13 insertions(+), 4 deletions(-)
  

Patch

diff --git a/framework/packet.py b/framework/packet.py
index cd478bef..f56bf178 100644
--- a/framework/packet.py
+++ b/framework/packet.py
@@ -420,6 +420,7 @@  class Packet(object):
         "ARP": {"layers": ["ether", "arp"], "cfgload": False},
         "LLDP": {"layers": ["ether", "lldp"], "cfgload": False},
         "IP_RAW": {"layers": ["ether", "ipv4", "raw"], "cfgload": True},
+        "IPv6_RAW": {"layers": ["ether", "ipv6", "raw"], "cfgload": True},
         "TCP": {"layers": ["ether", "ipv4", "tcp", "raw"], "cfgload": True},
         "UDP": {"layers": ["ether", "ipv4", "udp", "raw"], "cfgload": True},
         "VLAN_UDP": {
diff --git a/test_plans/multiprocess_test_plan.rst b/test_plans/multiprocess_test_plan.rst
index 872ea10a..e9b81c8e 100644
--- a/test_plans/multiprocess_test_plan.rst
+++ b/test_plans/multiprocess_test_plan.rst
@@ -229,6 +229,7 @@  summarize all received packets and check whether it is bigger than or equal to t
 
 2. send some packets,the number of packets is a random value between 20 and 256, packet type including IPV6/4,TCP/UDP,
    refer to Random_Packet
+   Note::I40e only rss for IP and IPv6 packets by default
 
 3. stop all process and check output::
 
diff --git a/tests/TestSuite_multiprocess.py b/tests/TestSuite_multiprocess.py
index b666835a..7f164c70 100644
--- a/tests/TestSuite_multiprocess.py
+++ b/tests/TestSuite_multiprocess.py
@@ -164,10 +164,17 @@  class TestMultiprocess(TestCase):
 
     def random_packet(self, pkt_num):
         pkt = Packet()
-        pkt.generate_random_pkts(
-            pktnum=pkt_num,
-            dstmac="00:11:22:33:44:55",
-        )
+        if self.kdriver == "i40e":
+            pkt.generate_random_pkts(
+                pktnum=pkt_num,
+                dstmac="00:11:22:33:44:55",
+                random_type=["IP_RAW","IPv6_RAW"]
+            )
+        else:
+            pkt.generate_random_pkts(
+                pktnum=pkt_num,
+                dstmac="00:11:22:33:44:55",
+            )
         pkt.send_pkt(crb=self.tester, tx_port=self.tester_ifaces[0], count=1)
 
     def specify_packet(self, que_num):