From patchwork Wed Jul 5 16:36:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 129274 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3441F42DCC; Wed, 5 Jul 2023 10:20:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CD32406BC; Wed, 5 Jul 2023 10:20:55 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9B8EE40150 for ; Wed, 5 Jul 2023 10:20:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688545253; x=1720081253; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=hkin67xRVuwz/uNxKoDOeZMc5bcwJAwvncb2oaE2rjU=; b=RZUM4tA0g3IhzdbkElmf9aBNRlK9cDXSW8O8zsIHR3GTbenz6tMdy1gY Ohf2M1R+sP7tz/c+cBbjjbTY48efV/C1EfYtFGEVi4d7ibDSkv80jz5Gr WX/3ZKXBxtkpJnmFfuyaLNp0ROf/joIe22f7T/loWNmBUbTvZH2Zc6wMO goZcpFJVOWDKhqT+4f/vyb5ipfWpT0FCGFQUaQYet7yoXZU4fFVDX5nyc 1NrnadSwF7baohTCZcxKr8vpuvfo+a3OVmp7GqvWHQxhbfBNP4bxfweW+ RVDJ4BTIHyLr2BalX+qWeTp/YinamOMsO/EZs/bhXwQuI+/DawbOriW49 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="449649484" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="449649484" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2023 01:20:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="1049625267" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="1049625267" Received: from unknown (HELO localhost.localdomain) ([10.239.252.96]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2023 01:20:48 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V2] ice_dcf_data_path:modify check point to adapt dpdk changed Date: Wed, 5 Jul 2023 16:36:23 +0000 Message-Id: <20230705163623.1060424-1-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org 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. And in some customer issue,it was found that starting testpmd with dcf and vf port cause rss not work,this dpdk commmit also fixed this issue,so we add a vf port into test case. Signed-off-by: Zhimin Huang --- v2: add an additional vf port to start testpmd test_plans/ice_dcf_data_path_test_plan.rst | 43 +++++++++++--- tests/TestSuite_ice_dcf_data_path.py | 65 ++++++++++++++++++---- 2 files changed, 87 insertions(+), 21 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..a724dc35 100644 --- a/test_plans/ice_dcf_data_path_test_plan.rst +++ b/test_plans/ice_dcf_data_path_test_plan.rst @@ -26,10 +26,11 @@ Set a VF as trust :: ip link set enp24s0f0 vf 0 trust on ip link set enp27s0f0 vf 0 mac D2:6B:4C:EB:1C:26 -Launch dpdk on the VF, request DCF mode :: +Launch dpdk on the VF, request DCF mode and add an additional vf port to check that not affect DCF fwd:: ./usertools/dpdk-devbind.py -b vfio-pci 18:01.0 - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 6-10 -n 4 -a 18:01.0,cap=dcf --file-prefix=vf -- -i --rxq=4 --txq=4 + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 6-10 -n 4 -a 18:01.0,cap=dcf -a 18:01.1 --file-prefix=vf -- -i + --rxq=4 --txq=4 Test Case: Launch DCF and do macfwd @@ -101,7 +102,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 +114,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 +153,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 +166,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 +180,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 +194,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..0a237dc4 100644 --- a/tests/TestSuite_ice_dcf_data_path.py +++ b/tests/TestSuite_ice_dcf_data_path.py @@ -24,13 +24,15 @@ class TestICEDCFDataPath(TestCase): # Generate 1 trust VF on 1 PF, and request 1 DCF on the trust VF self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 4, self.kdriver) self.sriov_vfs_port_0 = self.dut.ports_info[self.dut_ports[0]]["vfs_port"] - self.used_vf_pci = self.sriov_vfs_port_0[0].pci + self.used_vf0_pci = self.sriov_vfs_port_0[0].pci + self.used_vf1_pci = self.sriov_vfs_port_0[1].pci # config vf trust on and vf mac value self.dut.send_expect("ip link set %s vf 0 trust on" % self.dut_intf0, "#") self.dut.send_expect( "ip link set {} vf 0 mac {}".format(self.dut_intf0, self.vf_mac), "#" ) - self.sriov_vfs_port_0[0].bind_driver(self.vf_driver) + for port in self.sriov_vfs_port_0: + port.bind_driver(self.vf_driver) self.pmd_output = PmdOutput(self.dut) self.pkt = Packet() @@ -39,8 +41,8 @@ class TestICEDCFDataPath(TestCase): cores="1S/4C/1T", param="--txq=4 --rxq=4", prefix="vf", - ports=[self.used_vf_pci], - port_options={self.used_vf_pci: "cap=dcf"}, + ports=[self.used_vf0_pci, self.used_vf1_pci], + port_options={self.used_vf0_pci: "cap=dcf"}, ) def send_packets(self, packets, tx_port, count=1): @@ -125,6 +127,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 +155,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 +233,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): """