test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] ice_dcf_data_path:modify check point to adapt dpdk changed
@ 2023-06-15 16:49 Zhimin Huang
  0 siblings, 0 replies; only message in thread
From: Zhimin Huang @ 2023-06-15 16:49 UTC (permalink / raw)
  To: dts; +Cc: Zhimin Huang

According to dpdk commit
38341238ba1e02c7292b037f91006ea20f8200f9(net/ice: add default RSS for
DCF),all default rss for dcf have been changed to ipv4/ipv6.
so we modify test script and test plan to adapt this changed.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 test_plans/ice_dcf_data_path_test_plan.rst | 38 ++++++++++++---
 tests/TestSuite_ice_dcf_data_path.py       | 55 ++++++++++++++++++----
 2 files changed, 78 insertions(+), 15 deletions(-)

diff --git a/test_plans/ice_dcf_data_path_test_plan.rst b/test_plans/ice_dcf_data_path_test_plan.rst
index 71c9793b..0e35d3a4 100644
--- a/test_plans/ice_dcf_data_path_test_plan.rst
+++ b/test_plans/ice_dcf_data_path_test_plan.rst
@@ -101,7 +101,7 @@ Send a series packets to check if DCF RSS is correct for tunnelling packet (inne
 
 
 Expected:
-   p1 hash value is not equal to p2 or p3. p1 hash value is equal to p4 and p5.
+   p1 hash value is equal to p2 or p3. p1 hash value is not equal to p4 and p5.
    check the packets are distributed to queues by rss.
 
 Send a series packets to check if DCF RSS is correct for tunnelling packet (inner IPv6) ::
@@ -113,9 +113,20 @@ Send a series packets to check if DCF RSS is correct for tunnelling packet (inne
     sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="11:22:33:44:55:77")/IPv6(src="::33", dst="::44")/GRE()/IPv6(src="::22", dst="::11")/Raw('x'*64), iface=intf)
 
 Expected:
-   p1 hash value is not equal to p2 or p3. p1 hash value is equal to p4 and p5.
-   p1/p2/p3 should be devided into different queues.
+   p1 hash value is equal to p2 or p3. p1 hash value is not equal to p4 and p5.
+   p1/p4/p5 should be devided into different queues.
 
+Send a series packets to check if DCF RSS is correct for tunnelling packet (outer IPv6) ::
+
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / Raw("x" * 64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.3") / Raw("x" * 64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.3", dst="192.168.1.2") / Raw("x" * 64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="11:22:33:44:55:77") / IPv6(src="::22",dst="::12") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / Raw("x" * 64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="11:22:33:44:55:77") / IP(src="1.1.1.2",dst="2.2.2.1") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / Raw("x" * 64), iface=intf)
+
+Expected:
+   p1 hash value is equal to p2 or p3. p1 hash value is not equal to p4 and p5.
+   p1/p4/p5 should be devided into different queues.
 
 Test Case: Check default rss for L4
 ===================================
@@ -141,7 +152,7 @@ Send a series packets to check if DCF RSS is correct for IPv4 ::
     sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:22:33:44:55:77")/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
 
 Expected:
-   p1 hash value is not equal to p2 or p3 or p4 or p5, and should be equal to p6.
+   p1 hash value is not equal to p2 or p3, and should be equal to p4 or p5 or p6.
    check the packets are distributed to queues by rss.
 
 Send a series packets to check if DCF RSS is correct for IPv6 ::
@@ -154,7 +165,7 @@ Send a series packets to check if DCF RSS is correct for IPv6 ::
     sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="11:22:33:44:55:77")/IPv6(src="::22", dst="::11")/TCP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
 
 Expected:
-   p1 hash value is not equal to p2 or p3 or p4 or p5, and should be equal to p6.
+   p1 hash value is not equal to p2 or p3, and should be equal to p4 or p5 or p6.
    check the packets are distributed to queues by rss.
 
 Send a series packets to check if DCF RSS is correct for tunnelling packet (inner IPv4) ::
@@ -168,7 +179,7 @@ Send a series packets to check if DCF RSS is correct for tunnelling packet (inne
     sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:22:33:44:55:77")/IPv6(src="::11", dst="::22")/GRE()/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
 
 Expected:
-   p1 hash value is not equal to p2 or p3 or p4 or p5, and should be equal to p6 and p7.
+   p1 hash value is equal to p2 or p3 or p4 or p5, and should be not equal to p6 and p7.
    check the packets are distributed to queues by rss.
 
 Send a series packets to check if DCF RSS is correct for tunnelling packet (inner IPv6) ::
@@ -182,9 +193,22 @@ Send a series packets to check if DCF RSS is correct for tunnelling packet (inne
     sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:22:33:44:55:77")/IPv6(src="::33", dst="::44")/GRE()/IPv6(src="::22", dst="::11")/UDP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
 
 Expected:
-   p1 hash value is not equal to p2 or p3 or p4 or p5, and should be equal to p6 and p7.
+   p1 hash value is equal to p2 or p3 or p4 or p5, and should be not equal to p6 and p7.
    check the packets are distributed to queues by rss.
 
+Send a series packets to check if DCF RSS is correct for tunnelling packet (outer IPv6) ::
+
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.3") / UDP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.3", dst="192.168.1.2") / UDP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1235, dport=5678)/Raw('x'*64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1234, dport=5679)/Raw('x'*64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:22:33:44:55:77") / IPv6(src="::22",dst="::12") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
+    sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:22:33:44:55:77") / IP(src="1.1.1.2",dst="2.2.2.1") / GRE() / IPv6(src="::22", dst="::11") / UDP(sport=1234, dport=5678)/Raw('x'*64), iface=intf)
+
+Expected:
+   p1 hash value is equal to p2 or p3 or p4 or p5, and should be not equal to p6 and p7.
+   check the packets are distributed to queues by rss.
 
 Test Case: Create rule with to original VF action
 =================================================
diff --git a/tests/TestSuite_ice_dcf_data_path.py b/tests/TestSuite_ice_dcf_data_path.py
index 64ee0aa6..bc34b763 100644
--- a/tests/TestSuite_ice_dcf_data_path.py
+++ b/tests/TestSuite_ice_dcf_data_path.py
@@ -125,6 +125,18 @@ class TestICEDCFDataPath(TestCase):
             'Ether(dst="%s", src="11:22:33:44:55:77") / IPv6(src="::33", dst="::44") / GRE() / IPv6(src="::22", dst="::11") / Raw("x" * 64)'
             % self.vf_mac,
         ]
+        pkt_list5 = [
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.3") / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.3", dst="192.168.1.2") / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="11:22:33:44:55:77") / IPv6(src="::22",dst="::12") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="11:22:33:44:55:77") / IP(src="1.1.1.2",dst="2.2.2.1") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / Raw("x" * 64)'
+            % self.vf_mac,
+        ]
 
         self.pmd_output.execute_cmd("set fwd rxonly")
         self.pmd_output.execute_cmd("set verbose 1")
@@ -141,14 +153,19 @@ class TestICEDCFDataPath(TestCase):
         )
         out3 = self.send_pkts_getouput(pkt_list3, self.tester_intf0)
         self.verify(
-            out3[0] == out3[3] == out3[4] and out3[0] != out3[1] != out3[2],
+            out3[0] != out3[3] != out3[4] and out3[0] == out3[1] == out3[2],
             "inner ipv4 rss hash value test failed",
         )
         out4 = self.send_pkts_getouput(pkt_list4, self.tester_intf0)
         self.verify(
-            out4[0] == out4[3] == out4[4] and out4[0] != out4[1] != out4[2],
+            out4[0] != out4[3] != out4[4] and out4[0] == out4[1] == out4[2],
             "inner ipv6 rss hash value test failed",
         )
+        out5 = self.send_pkts_getouput(pkt_list5, self.tester_intf0)
+        self.verify(
+            out5[0] != out5[3] != out5[4] and out5[0] == out5[1] == out5[2],
+            "outer ipv6 rss hash value test failed",
+        )
 
     def test_default_rss_l4(self):
         """
@@ -214,32 +231,54 @@ class TestICEDCFDataPath(TestCase):
             'Ether(dst="%s", src="00:22:33:44:55:77") / IPv6(src="::33", dst="::44") / GRE() / IPv6(src="::22", dst="::11") / UDP(sport=1234, dport=5678) / Raw("x" * 64)'
             % self.vf_mac,
         ]
+        pkt_list5 = [
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1234, dport=5678) / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.3") / UDP(sport=1234, dport=5678) / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.3", dst="192.168.1.2") / UDP(sport=1234, dport=5678) / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1235, dport=5678) / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:11:22:33:44:55") / IPv6(src="::22",dst="::11") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1234, dport=5679) / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:22:33:44:55:77") / IPv6(src="::22",dst="::12") / GRE() / IP(src="192.168.1.1", dst="192.168.1.2") / UDP(sport=1234, dport=5678) / Raw("x" * 64)'
+            % self.vf_mac,
+            'Ether(dst="%s", src="00:22:33:44:55:77") / IP(src="1.1.1.2",dst="2.2.2.1") / GRE() / IPv6(src="::22", dst="::11") / UDP(sport=1234, dport=5678) / Raw("x" * 64)'
+            % self.vf_mac,
+        ]
 
         self.pmd_output.execute_cmd("set fwd rxonly")
         self.pmd_output.execute_cmd("set verbose 1")
         self.pmd_output.execute_cmd("start")
         out1 = self.send_pkts_getouput(pkt_list1, self.tester_intf0)
         self.verify(
-            out1[0] == out1[5] and out1[0] != out1[1] != out1[2] != out1[3] != out1[4],
+            out1[0] == out1[5] == out1[3] == out1[4] and out1[0] != out1[1] != out1[2],
             "ipv4 rss hash value test failed",
         )
         out2 = self.send_pkts_getouput(pkt_list2, self.tester_intf0)
         self.verify(
-            out2[0] == out2[5] and out2[0] != out2[1] != out2[2] != out2[3] != out2[4],
+            out2[0] == out2[5] == out2[3] == out2[4] and out2[0] != out2[1] != out2[2],
             "ipv6 rss hash value test failed",
         )
         out3 = self.send_pkts_getouput(pkt_list3, self.tester_intf0)
         self.verify(
-            out3[0] == out3[6]
-            and out3[0] != out3[1] != out3[2] != out3[3] != out3[4] != out3[5],
+            out3[0] != out3[6] != out3[5]
+            and out3[0] == out3[1] == out3[2] == out3[3] == out3[4],
             "inner ipv4 rss hash value test failed",
         )
         out4 = self.send_pkts_getouput(pkt_list4, self.tester_intf0)
         self.verify(
-            out4[0] == out4[6]
-            and out4[0] != out4[1] != out4[2] != out4[3] != out4[4] != out4[5],
+            out4[0] != out4[6] != out4[5]
+            and out4[0] == out4[1] == out4[2] == out4[3] == out4[4],
             "inner ipv6 rss hash value test failed",
         )
+        out5 = self.send_pkts_getouput(pkt_list5, self.tester_intf0)
+        self.verify(
+            out5[0] != out5[6] != out5[5]
+            and out5[0] == out5[1] == out5[2] == out5[3] == out5[4],
+            "outer ipv6 rss hash value test failed",
+        )
 
     def test_create_rule_with_vf_action(self):
         """
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-06-15  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-15 16:49 [dts][PATCH V1] ice_dcf_data_path:modify check point to adapt dpdk changed Zhimin Huang

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