From patchwork Thu Jun 15 16:49:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 128734 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 7151B42CC4; Thu, 15 Jun 2023 10:38:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A9DB40FAE; Thu, 15 Jun 2023 10:38:29 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 1BC8B40E0F for ; Thu, 15 Jun 2023 10:38:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686818308; x=1718354308; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=IaZLmLAqh/K5LIMN0H3IeJBxUb3HM4PRKoNbxImyGrc=; b=WBNTY9Ynlu9+3auVsZnIZATelmfql5o47hi98ApT12MPb/mXxWOf9+wZ neA57HqvCpRU7vDKiIQAKYH7dBTJB1Zkk6fJCHrijWMoHPJ9rdIdBTRi+ iNC43KIuv0biTbSeupCwWTwOGTo5xuHwv+mBfC9SBX2fndxY8RsKRDX4A mUXhPV7f0sF6SzZetEcTmwI2drWbZbfStUONQcfVNYyvOa1AFYwjaGEll xCLkyXSj5Mv3jystnJDJRUqJuuuOAkiMTeuD2jKRg+J0FyCY178+oL44C rmb3nbtWwDU6OJ42VQZNu8D3QX8+Q/OOavkQapK+geIj5qkAKTG9wPFjo Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="362234928" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="362234928" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 01:38:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10741"; a="1042559599" X-IronPort-AV: E=Sophos;i="6.00,244,1681196400"; d="scan'208";a="1042559599" Received: from unknown (HELO localhost.localdomain) ([10.239.252.96]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 01:38:10 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Subject: [dts][PATCH V1] ice_dcf_data_path:modify check point to adapt dpdk changed Date: Thu, 15 Jun 2023 16:49:47 +0000 Message-Id: <20230615164947.1206897-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. Signed-off-by: Zhimin Huang --- 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): """