diff mbox series

[V1] tests/ice_advanced_rss_gtpu:optimized and spilt new case

Message ID 20220623200153.6607-4-zhiminx.huang@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/ice_advanced_rss_gtpu:optimized and spilt new case | expand

Checks

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

Commit Message

Zhimin Huang June 23, 2022, 8:01 p.m. UTC
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(-)

Comments

Tu, Lijuan June 29, 2022, 2:03 a.m. UTC | #1
On Fri, 24 Jun 2022 04:01:53 +0800, Zhimin Huang <zhiminx.huang@intel.com> wrote:
> 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>


Applied, thanks
diff mbox series

Patch

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