From patchwork Mon Nov 8 07:09:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 103924 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 E68EAA0C4C; Mon, 8 Nov 2021 08:10:22 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C2A1410E4; Mon, 8 Nov 2021 08:10:22 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id C549B40040 for ; Mon, 8 Nov 2021 08:10:20 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10161"; a="219376598" X-IronPort-AV: E=Sophos;i="5.87,217,1631602800"; d="scan'208";a="219376598" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2021 23:10:20 -0800 X-IronPort-AV: E=Sophos;i="5.87,217,1631602800"; d="scan'208";a="502896053" Received: from unknown (HELO localhost.localdomain) ([10.240.183.163]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 07 Nov 2021 23:10:18 -0800 From: Yu Jiang To: yuan.peng@intel.com, dts@dpdk.org Cc: Yu Jiang Date: Mon, 8 Nov 2021 15:09:55 +0800 Message-Id: <1636355396-12864-2-git-send-email-yux.jiang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1636355396-12864-1-git-send-email-yux.jiang@intel.com> References: <1636355396-12864-1-git-send-email-yux.jiang@intel.com> Subject: [dts] [PATCH V3 1/2] test_plans/pmdrss_hash: replace legacy filter with rte_flow 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 Sender: "dts" According to dpdk commit 81db321da("ethdev: remove legacy HASH filter type support"), remove legacy hash filter to use rte_flow api replace. Signed-off-by: Yu Jiang --- test_plans/pmdrss_hash_test_plan.rst | 46 +++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/test_plans/pmdrss_hash_test_plan.rst b/test_plans/pmdrss_hash_test_plan.rst index c0430a0..48a61e5 100644 --- a/test_plans/pmdrss_hash_test_plan.rst +++ b/test_plans/pmdrss_hash_test_plan.rst @@ -95,9 +95,20 @@ Testpmd configuration - 16 RX/TX queues per port testpmd command: set verbose 8 -#. set hash functions, can choose symmetric or not, choose port and packet type:: - - testpmd command: set_hash_global_config 0 toeplitz ipv4-other enable +#. set hash functions, can choose symmetric or not, choose port, rss type and packet type:: + + Toeplitz hash function: toeplitz + testpmd command: + flow create ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv4 / end actions rss types ipv4-frag end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end func toeplitz queues end / end + flow create ingress pattern eth / ipv6 / end actions rss types ipv6-frag end queues end func toeplitz queues end / end #. start packet receive:: @@ -129,8 +140,18 @@ Test Case: test_toeplitz_symmetric The same with the above steps, pay attention to "set hash function", should use:: - set_hash_global_config 0 toeplitz ipv4-other enable - set_sym_hash_ena_per_port 0 enable + Symmetric Toeplitz hash function: symmetric_toeplitz + testpmd command: + flow create ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv4 / end actions rss types ipv4-frag end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end func symmetric_toeplitz queues end / end + flow create ingress pattern eth / ipv6 / end actions rss types ipv6-frag end queues end func symmetric_toeplitz queues end / end And send packets with the same flow in different direction:: @@ -142,7 +163,20 @@ And the hash value and queue should be the same for these two flow . Test Case: test_simple ======================= -The same as the above test case "test_toeplitz". Just pay attention to set the hash function to "simple xor" +The same as the above test case "test_toeplitz". Just pay attention to set the hash function to "simple xor":: + + simple XOR hash function: simple_xor + testpmd command: + flow create ingress pattern eth / ipv4 / sctp / end actions rss types ipv4-sctp end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv4 / end actions rss types ipv4-other end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv4 / end actions rss types ipv4-frag end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv6 / end actions rss types ipv6-other end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv6 / sctp / end actions rss types ipv6-sctp end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv6 / tcp / end actions rss types ipv6-tcp end queues end func simple_xor queues end / end + flow create ingress pattern eth / ipv6 / end actions rss types ipv6-frag end queues end func simple_xor queues end / end Test Case: test_simple_symmetric ================================= From patchwork Mon Nov 8 07:09:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 103925 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 A62DCA0C4B; Mon, 8 Nov 2021 08:10:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E0E140E5A; Mon, 8 Nov 2021 08:10:33 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 4218340040 for ; Mon, 8 Nov 2021 08:10:31 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10161"; a="219376600" X-IronPort-AV: E=Sophos;i="5.87,217,1631602800"; d="scan'208";a="219376600" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2021 23:10:22 -0800 X-IronPort-AV: E=Sophos;i="5.87,217,1631602800"; d="scan'208";a="502896062" Received: from unknown (HELO localhost.localdomain) ([10.240.183.163]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 07 Nov 2021 23:10:20 -0800 From: Yu Jiang To: yuan.peng@intel.com, dts@dpdk.org Cc: Yu Jiang Date: Mon, 8 Nov 2021 15:09:56 +0800 Message-Id: <1636355396-12864-3-git-send-email-yux.jiang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1636355396-12864-1-git-send-email-yux.jiang@intel.com> References: <1636355396-12864-1-git-send-email-yux.jiang@intel.com> Subject: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter with rte_flow 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 Sender: "dts" According to dpdk commit 81db321da("ethdev: remove legacy HASH filter type support"), remove legacy hash filter to use rte_flow api replace. Signed-off-by: Yu Jiang Tested-by: Yu Jiang --- tests/TestSuite_pmdrss_hash.py | 52 +++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py index 2ff98cb..9eb17cf 100644 --- a/tests/TestSuite_pmdrss_hash.py +++ b/tests/TestSuite_pmdrss_hash.py @@ -41,6 +41,7 @@ import re import time import framework.utils as utils +from framework.test_case import skip_unsupported_nic queue = 16 reta_entries = [] @@ -411,33 +412,18 @@ class TestPmdrssHash(TestCase): self.verify( sum(result) == 0, "the symmetric RSS hash function failed!") + @skip_unsupported_nic(["columbiaville_25g", "columbiaville_100g", "niantic", "foxville"]) def set_up_all(self): """ Run at the start of each test suite. """ - self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g","fortville_eagle", "fortville_spirit", - "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "niantic", "carlsville", "foxville"], - "NIC Unsupported: " + str(self.nic)) global reta_num global iptypes global queue - if self.nic in ["foxville"]: - queue = 4 if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "carlsville"]: reta_num = 512 - elif self.nic in ["niantic", "foxville"]: - reta_num = 128 - iptypes = {'ipv4-other': 'ip', - 'ipv4-frag': 'ip', - 'ipv4-udp': 'udp', - 'ipv4-tcp': 'tcp', - 'ipv6-other': 'ip', - 'ipv6-udp': 'udp', - 'ipv6-tcp': 'tcp', - 'ipv6-frag': 'ip' - } else: self.verify(False, "NIC Unsupported:%s" % str(self.nic)) ports = self.dut.get_ports(self.nic) @@ -453,9 +439,13 @@ class TestPmdrssHash(TestCase): self.coremask = utils.create_mask(cores) def test_toeplitz(self): + """ + Test Case: test_toeplitz + """ dutPorts = self.dut.get_ports(self.nic) localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) + rule_action = 'func toeplitz queues end / end' global reta_num global iptypes @@ -474,8 +464,14 @@ class TestPmdrssHash(TestCase): "set nbcore %d" % (queue + 1), "testpmd> ") self.dut.send_expect("port stop all", "testpmd> ") - self.dut.send_expect( - "set_hash_global_config 0 toeplitz %s enable" % iptype, "testpmd> ") + self.dut.send_expect("flow flush 0", "testpmd> ") + rule_cmd = f'flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}' + if 'sctp' in iptype or 'udp' in iptype or 'tcp' in iptype: + rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /') + if 'ipv6' in iptype: + rule_cmd = rule_cmd.replace('ipv4', 'ipv6') + outx = self.dut.send_expect(rule_cmd, "testpmd> ") + self.verify("created" in outx, "Create flow failed") self.dut.send_expect("port start all", "testpmd> ") out = self.dut.send_expect( "port config all rss %s" % rsstype, "testpmd> ") @@ -491,6 +487,9 @@ class TestPmdrssHash(TestCase): self.dut.send_expect("quit", "# ", 30) def test_toeplitz_symmetric(self): + """ + Test Case: test_toeplitz_symmetric + """ dutPorts = self.dut.get_ports(self.nic) localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) @@ -519,7 +518,8 @@ class TestPmdrssHash(TestCase): rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /') if 'ipv6' in iptype: rule_cmd = rule_cmd.replace('ipv4', 'ipv6') - self.dut.send_expect(rule_cmd, "testpmd> ") + outx = self.dut.send_expect(rule_cmd, "testpmd> ") + self.verify("created" in outx, "Create flow failed") self.dut.send_expect("port start all", "testpmd> ") out = self.dut.send_expect( "port config all rss %s" % rsstype, "testpmd> ") @@ -537,9 +537,13 @@ class TestPmdrssHash(TestCase): self.dut.send_expect("quit", "# ", 30) def test_simple(self): + """ + Test Case: test_simple + """ dutPorts = self.dut.get_ports(self.nic) localPort = self.tester.get_local_port(dutPorts[0]) itf = self.tester.get_interface(localPort) + rule_action = 'func simple_xor queues end / end' global reta_num global iptypes @@ -560,8 +564,14 @@ class TestPmdrssHash(TestCase): self.dut.send_expect("port stop all", "testpmd> ") # some nic not support change hash algorithm - self.dut.send_expect( - "set_hash_global_config 0 simple_xor %s enable" % iptype, "testpmd> ") + self.dut.send_expect("flow flush 0", "testpmd> ") + rule_cmd = f'flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}' + if 'sctp' in iptype or 'udp' in iptype or 'tcp' in iptype: + rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /') + if 'ipv6' in iptype: + rule_cmd = rule_cmd.replace('ipv4', 'ipv6') + outx = self.dut.send_expect(rule_cmd, "testpmd> ") + self.verify("created" in outx, "Create flow failed") self.dut.send_expect("port start all", "testpmd> ") out = self.dut.send_expect( "port config all rss %s" % rsstype, "testpmd> ")