test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts][PATCH V1] tests/ice_advanced_rss_gtpu:optimized and spilt new case
Date: Fri, 24 Jun 2022 04:01:53 +0800	[thread overview]
Message-ID: <20220623200153.6607-4-zhiminx.huang@intel.com> (raw)
In-Reply-To: <20220623200153.6607-1-zhiminx.huang@intel.com>

1.check the packets is distributed to all queues.
2.testplan have tcp and udp test scope,add new case in testcase.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 tests/TestSuite_ice_advanced_rss_gtpu.py | 273 ++++++++++++++++++++++-
 1 file changed, 269 insertions(+), 4 deletions(-)

diff --git a/tests/TestSuite_ice_advanced_rss_gtpu.py b/tests/TestSuite_ice_advanced_rss_gtpu.py
index 34f07c9c..d2186645 100644
--- a/tests/TestSuite_ice_advanced_rss_gtpu.py
+++ b/tests/TestSuite_ice_advanced_rss_gtpu.py
@@ -5716,11 +5716,15 @@ class TestICEAdvancedRSSGTPU(TestCase):
         self.rssprocess.create_rule(rule=rule)
         pkt = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst=RandIP(),src=RandIP())/UDP(sport=RandShort(),dport=RandShort())/("X"*480)'
         output = self.rssprocess.send_pkt_get_output(pkts=pkt, count=1280)
+        _, queues = self.rssprocess.get_hash_and_queues(output)
         hashes, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
         self.verify(
             len(hashes) == 1280,
             "all the packets should have hash value and distributed to all queues by RSS.",
         )
+        self.verify(
+            len(set(queues)) == 64, "all the packets have distributed to all queues"
+        )
         self.verify(rss_distribute, "the packet do not distribute by rss")
 
     def test_stress_cases(self):
@@ -5948,7 +5952,7 @@ class TestICEAdvancedRSSGTPU(TestCase):
             "packet 6 should has same hash value with packet 4",
         )
 
-    def test_ipv4_gtpu_eh_ipv4_and_ipv4_gtpu_eh_ipv4_udp_tcp(self):
+    def test_ipv4_gtpu_eh_ipv4_and_ipv4_gtpu_eh_ipv4_udp(self):
         self.switch_testpmd(enable_rss=True)
         pkts1 = [
             'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
@@ -6036,7 +6040,95 @@ class TestICEAdvancedRSSGTPU(TestCase):
             "packet 12 have same hash value to packet 10",
         )
 
-    def test_ipv6_gtpu_eh_ipv6_and_ipv6_gtpu_eh_ipv6_udp_tcp(self):
+    def test_ipv4_gtpu_eh_ipv4_and_ipv4_gtpu_eh_ipv4_tcp(self):
+        self.switch_testpmd(enable_rss=True)
+        pkts1 = [
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=33)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.1.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=33)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.1.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+        ]
+
+        rule1 = "flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only end key_len 0 queues end / end"
+        rule_li1 = self.rssprocess.create_rule(rule=rule1)
+        hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+        self.verify(
+            hash_values[1] == hash_values[0],
+            "packet 2 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[2] == hash_values[0],
+            "packet 3 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[4] != hash_values[3],
+            "packet 5 should has different hash value with packet 4",
+        )
+        self.verify(
+            hash_values[5] == hash_values[3],
+            "packet 6 should has same hash value with packet 4",
+        )
+        self.verify(
+            hash_values[7] == hash_values[6],
+            "packet 8 should has same hash value to packet 7",
+        )
+        self.verify(
+            hash_values[8] == hash_values[6] and hash_values[8] == hash_values[7],
+            "packet 9 should have same hash value to packet 7 and 8",
+        )
+        self.verify(
+            hash_values[10] == hash_values[9],
+            "packet 11 should has same hash value to packet 10",
+        )
+        self.verify(
+            hash_values[11] == hash_values[9] and hash_values[11] == hash_values[10],
+            "packet 12 have same hash value to packet 10 and 11",
+        )
+        rule2 = "flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end"
+        rule_li2 = self.rssprocess.create_rule(rule=rule2)
+        hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+        self.verify(
+            hash_values[1] == hash_values[0],
+            "packet 2 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[2] == hash_values[0],
+            "packet 3 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[4] != hash_values[3],
+            "packet 5 should has different hash value with packet 4",
+        )
+        self.verify(
+            hash_values[5] == hash_values[3],
+            "packet 6 should has same hash value with packet 4",
+        )
+        self.verify(
+            hash_values[7] == hash_values[6],
+            "packet 8 should has same hash value to packet 7",
+        )
+        self.verify(
+            hash_values[8] == hash_values[6] and hash_values[8] == hash_values[7],
+            "packet 9 should have same hash value to packet 7 and 8",
+        )
+        self.verify(
+            hash_values[10] != hash_values[9],
+            "packet 11 should has different hash value to packet 10",
+        )
+        self.verify(
+            hash_values[11] == hash_values[9],
+            "packet 12 have same hash value to packet 10",
+        )
+
+    def test_ipv6_gtpu_eh_ipv6_and_ipv6_gtpu_eh_ipv6_tcp(self):
         self.switch_testpmd(enable_rss=True)
         pkts1 = [
             'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)',
@@ -6124,7 +6216,95 @@ class TestICEAdvancedRSSGTPU(TestCase):
             "packet 12 have same hash value to packet 10 and 11",
         )
 
-    def test_ipv4_gtpu_eh_ipv6_and_ipv4_gtpu_eh_ipv6_udp_tcp_without_ul_dl(self):
+    def test_ipv6_gtpu_eh_ipv6_and_ipv6_gtpu_eh_ipv6_udp(self):
+        self.switch_testpmd(enable_rss=True)
+        pkts1 = [
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=33)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=33)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)',
+        ]
+
+        rule1 = "flow create 0 ingress pattern eth / ipv6 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end"
+        rule_li1 = self.rssprocess.create_rule(rule=rule1)
+        hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+        self.verify(
+            hash_values[1] != hash_values[0],
+            "packet 2 should has different hash value with packet 1",
+        )
+        self.verify(
+            hash_values[2] == hash_values[0],
+            "packet 3 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[4] == hash_values[3],
+            "packet 5 should has same hash value with packet 4",
+        )
+        self.verify(
+            hash_values[5] == hash_values[3],
+            "packet 6 should has same hash value with packet 4",
+        )
+        self.verify(
+            hash_values[7] == hash_values[6],
+            "packet 8 should has same hash value to packet 7",
+        )
+        self.verify(
+            hash_values[8] == hash_values[6] and hash_values[8] == hash_values[7],
+            "packet 9 should have different hash value to packet 7 and 8",
+        )
+        self.verify(
+            hash_values[10] == hash_values[9],
+            "packet 11 should has different hash value to packet 10",
+        )
+        self.verify(
+            hash_values[11] == hash_values[9] and hash_values[11] == hash_values[10],
+            "packet 12 have different hash value to packet 10 and 11",
+        )
+        rule2 = "flow create 0 ingress pattern eth / ipv6 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end"
+        rule_li2 = self.rssprocess.create_rule(rule=rule2)
+        hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+        self.verify(
+            hash_values[1] == hash_values[0],
+            "packet 2 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[2] != hash_values[0],
+            "packet 3 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[4] == hash_values[3],
+            "packet 5 should has same hash value with packet 4",
+        )
+        self.verify(
+            hash_values[5] == hash_values[3],
+            "packet 6 should has same hash value with packet 4",
+        )
+        self.verify(
+            hash_values[7] == hash_values[6],
+            "packet 8 should has same hash value to packet 7",
+        )
+        self.verify(
+            hash_values[8] != hash_values[6],
+            "packet 9 should have different hash value to packet 7",
+        )
+        self.verify(
+            hash_values[10] == hash_values[9],
+            "packet 11 should has same hash value to packet 10",
+        )
+        self.verify(
+            hash_values[11] == hash_values[9] and hash_values[11] == hash_values[10],
+            "packet 12 have same hash value to packet 10 and 11",
+        )
+
+    def test_ipv4_gtpu_eh_ipv6_and_ipv4_gtpu_eh_ipv6_tcp_without_ul_dl(self):
         self.switch_testpmd(enable_rss=True)
         pkts1 = [
             'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)',
@@ -6156,7 +6336,39 @@ class TestICEAdvancedRSSGTPU(TestCase):
             "packet 7 should has differnt hash value to packet 5.",
         )
 
-    def test_ipv6_gtpu_ipv4_and_ipv6_gtpu_ipv4_udp_tcp(self):
+    def test_ipv4_gtpu_eh_ipv6_and_ipv4_gtpu_eh_ipv6_udp_without_ul_dl(self):
+        self.switch_testpmd(enable_rss=True)
+        pkts1 = [
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=33)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)',
+        ]
+
+        rule1 = "flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end"
+        self.rssprocess.create_rule(rule=rule1)
+        hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+        self.verify(
+            hash_values[1] == hash_values[0] and hash_values[2] == hash_values[0],
+            "packet 2 should has same hash value with packet 1, packet 3 should has same hash value to packet 1",
+        )
+        self.verify(
+            hash_values[3] != hash_values[0],
+            "packet 4 should have different hash value to packet 1.",
+        )
+        self.verify(
+            hash_values[5] == hash_values[4],
+            "packet 6 should has same hash value to packet 5.",
+        )
+        self.verify(
+            hash_values[6] != hash_values[4],
+            "packet 7 should has differnt hash value to packet 5.",
+        )
+
+    def test_ipv6_gtpu_ipv4_and_ipv6_gtpu_ipv4_udp(self):
         self.switch_testpmd(enable_rss=True)
         pkts1 = [
             'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
@@ -6209,6 +6421,59 @@ class TestICEAdvancedRSSGTPU(TestCase):
             "packet 7 should has different hash value to packet 5.",
         )
 
+    def test_ipv6_gtpu_ipv4_and_ipv6_gtpu_ipv4_tcp(self):
+        self.switch_testpmd(enable_rss=True)
+        pkts1 = [
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=33)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/TCP(sport=22,dport=23)/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+            'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+        ]
+
+        self.rssprocess.create_rule(
+            rule="flow create 0 ingress pattern eth / ipv6 / udp / gtpu / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only end key_len 0 queues end / end"
+        )
+        hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+        self.verify(
+            hash_values[1] != hash_values[0],
+            "packet 2 should has defferent hash value with packet 1",
+        )
+        self.verify(
+            hash_values[2] == hash_values[0] and hash_values[3] == hash_values[0],
+            "packet 3 and packet 4 should have same hash value to packet 1.",
+        )
+        self.verify(
+            len({hash_values[4], hash_values[5], hash_values[6]}) == 1,
+            "packet 5 and packet 6 and packet 7 have same hash value.",
+        )
+        self.rssprocess.create_rule(
+            rule="flow create 0 ingress pattern eth / ipv6 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end"
+        )
+        hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+        self.verify(
+            hash_values[1] == hash_values[0],
+            "packet 2 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[2] != hash_values[0],
+            "packet 3 should has different hash value to packet 1.",
+        )
+        self.verify(
+            hash_values[3] == hash_values[0],
+            "packet 4 should has same hash value with packet 1",
+        )
+        self.verify(
+            hash_values[5] == hash_values[4],
+            "packet 6 should has same hash value with packet 5",
+        )
+        self.verify(
+            hash_values[6] != hash_values[4],
+            "packet 7 should has different hash value to packet 5.",
+        )
+
     def test_toeplitz_symmetric_combination(self):
         self.switch_testpmd(False)
         self.logger.info("Subcase: toeplitz/symmetric with same pattern")
-- 
2.17.1


  parent reply	other threads:[~2022-06-23 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 20:01 [dts][PATCH V1] ice_advanced_rss_pppoe:add check result after deleting the rules Zhimin Huang
2022-06-23 20:01 ` [dts][PATCH V2] test_plans/ice_advanced_iavf_rss:add lost case in testplan Zhimin Huang
2022-06-29  1:46   ` lijuan.tu
2022-06-23 20:01 ` [dts][PATCH V1] test_plans/ice_advanced_rss:add " Zhimin Huang
2022-06-29  1:47   ` lijuan.tu
2022-06-23 20:01 ` Zhimin Huang [this message]
2022-06-29  2:03   ` [dts][PATCH V1] tests/ice_advanced_rss_gtpu:optimized and spilt new case lijuan.tu
2022-06-29  1:46 ` [dts][PATCH V1] ice_advanced_rss_pppoe:add check result after deleting the rules lijuan.tu

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=20220623200153.6607-4-zhiminx.huang@intel.com \
    --to=zhiminx.huang@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).