From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3BA91A0C53; Fri, 3 Sep 2021 07:22:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 112014013F; Fri, 3 Sep 2021 07:22:21 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 5FCCB40041 for ; Fri, 3 Sep 2021 07:22:19 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10095"; a="217470514" X-IronPort-AV: E=Sophos;i="5.85,264,1624345200"; d="scan'208";a="217470514" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2021 22:22:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,264,1624345200"; d="scan'208";a="429499393" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga003.jf.intel.com with ESMTP; 02 Sep 2021 22:22:18 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 2 Sep 2021 22:22:17 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Fri, 3 Sep 2021 13:22:15 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.010; Fri, 3 Sep 2021 13:22:15 +0800 From: "Tu, Lijuan" To: "Jiang, YuX" , "dts@dpdk.org" CC: "Jiang, YuX" , "Lin, Xueqin" Thread-Topic: [dts] [PATCH V2 1/2] tests/pmdrss_hash: replace legacy filter with rte flow Thread-Index: AQHXn+6u2sp4IjwYVUWw5QBkkZjOh6uRxd2A Date: Fri, 3 Sep 2021 05:22:14 +0000 Message-ID: <84eadd9889464ee5bafbda231c3254ee@intel.com> References: <1630582503-23756-1-git-send-email-yux.jiang@intel.com> <1630582503-23756-2-git-send-email-yux.jiang@intel.com> In-Reply-To: <1630582503-23756-2-git-send-email-yux.jiang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V2 1/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" dynamic_rss_bond_config and pmdrss, they don't have any relatives, please = split them, thanks. Does simple_symmetric support all nics? Does pmdrss_hash support all nics? If yes, could you please update test pla= n too The test plan says, it is Fortville specific. Test plan description should= all also be updated, it is align with the fact. > -----Original Message----- > From: dts On Behalf Of Yu Jiang > Sent: 2021=1B$BG/=1B(B9=1B$B7n=1B(B2=1B$BF|=1B(B 19:35 > To: dts@dpdk.org > Cc: Jiang, YuX > Subject: [dts] [PATCH V2 1/2] tests/pmdrss_hash: replace legacy filter wi= th rte > flow >=20 > According to dpdk commit 81db321da("ethdev: remove legacy HASH filter typ= e > support"), Modify pmdrss_hash test plan and script: > 1, remove cases dynamic_rss_bond_config&simple_symmetric which are not > support. > 2, pmdrss_hash: replace legacy HASH filter with rte_flow. >=20 > Signed-off-by: Yu Jiang > --- > conf/test_case_checklist.json | 53 --------------------- > tests/TestSuite_pmdrss_hash.py | 105 ++++++++----------------------------= ----- > 2 files changed, 20 insertions(+), 138 deletions(-) >=20 > diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.jso= n index > 4726aac..02a222b 100644 > --- a/conf/test_case_checklist.json > +++ b/conf/test_case_checklist.json > @@ -876,31 +876,6 @@ > "Comments": "the nic not support this case" > } > ], > - "dynamic_rss_bond_config": [ > - { > - "OS": [ > - "ALL" > - ], > - "NIC": [ > - "powerville", > - "kawela_4", > - "springville", > - "ironpond", > - "springfountain", > - "twinpond", > - "niantic", > - "fortville_spirit_single", > - "fortpark_TLV", > - "fortpark_BASE-T", > - "foxville" > - ], > - "Target": [ > - "ALL" > - ], > - "Bug ID": "", > - "Comments": "the nic not support this case,(x722 know ND iss= ue,DPDK- > 15118)" > - } > - ], > "pmdrss_reta": [ > { > "OS": [ > @@ -1489,34 +1464,6 @@ > "Comments": "nic not support this case" > } > ], > - "simple_symmetric": [ > - { > - "OS": [ > - "ALL" > - ], > - "NIC": [ > - "ALL" > - ], > - "Target": [ > - "ALL" > - ], > - "Bug ID": "DPDK-8410", > - "Comments": "DPDK-8410, won't fix; skip this case" > - }, > - { > - "OS": [ > - "ALL" > - ], > - "NIC": [ > - "foxville" > - ], > - "Target": [ > - "ALL" > - ], > - "Bug ID": "", > - "Comments": "the nic not support this case" > - } > - ], > "toeplitz": [ > { > "OS": [ > diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash= .py > index 9ea6f9a..8e1b79b 100644 > --- a/tests/TestSuite_pmdrss_hash.py > +++ b/tests/TestSuite_pmdrss_hash.py > @@ -453,6 +453,7 @@ class TestPmdrssHash(TestCase): > dutPorts =3D self.dut.get_ports(self.nic) > localPort =3D self.tester.get_local_port(dutPorts[0]) > itf =3D self.tester.get_interface(localPort) > + rule_action =3D 'func toeplitz queues end / end' > global reta_num > global iptypes >=20 > @@ -471,8 +472,14 @@ class TestPmdrssHash(TestCase): > "set nbcore %d" % (queue + 1), "testpmd> ") >=20 > 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 =3D f'flow create 0 ingress pattern eth / ipv4 / en= d actions rss > types {iptype} end queues end {rule_action}' > + if 'sctp' in iptype or 'udp' in iptype or 'tcp' in iptype: > + rule_cmd =3D rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rs= stype} /') > + if 'ipv6' in iptype: > + rule_cmd =3D rule_cmd.replace('ipv4', 'ipv6') > + outx =3D self.dut.send_expect(rule_cmd, "testpmd> ") > + self.verify("created" in outx, "Create flow failed") > self.dut.send_expect("port start all", "testpmd> ") > out =3D self.dut.send_expect( > "port config all rss %s" % rsstype, "testpmd> ") @@ -516= ,7 +523,8 @@ > class TestPmdrssHash(TestCase): > rule_cmd =3D rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rs= stype} /') > if 'ipv6' in iptype: > rule_cmd =3D rule_cmd.replace('ipv4', 'ipv6') > - self.dut.send_expect(rule_cmd, "testpmd> ") > + outx =3D self.dut.send_expect(rule_cmd, "testpmd> ") > + self.verify("created" in outx, "Create flow failed") > self.dut.send_expect("port start all", "testpmd> ") > out =3D self.dut.send_expect( > "port config all rss %s" % rsstype, "testpmd> ") @@ -537= ,6 +545,7 @@ > class TestPmdrssHash(TestCase): > dutPorts =3D self.dut.get_ports(self.nic) > localPort =3D self.tester.get_local_port(dutPorts[0]) > itf =3D self.tester.get_interface(localPort) > + rule_action =3D 'func simple_xor queues end / end' > global reta_num > global iptypes >=20 > @@ -557,8 +566,14 @@ class TestPmdrssHash(TestCase): >=20 > 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 =3D f'flow create 0 ingress pattern eth / ipv4 / en= d actions rss > types {iptype} end queues end {rule_action}' > + if 'sctp' in iptype or 'udp' in iptype or 'tcp' in iptype: > + rule_cmd =3D rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rs= stype} /') > + if 'ipv6' in iptype: > + rule_cmd =3D rule_cmd.replace('ipv4', 'ipv6') > + outx =3D self.dut.send_expect(rule_cmd, "testpmd> ") > + self.verify("created" in outx, "Create flow failed") > self.dut.send_expect("port start all", "testpmd> ") > out =3D self.dut.send_expect( > "port config all rss %s" % rsstype, "testpmd> ") @@ -572= ,86 +587,6 > @@ class TestPmdrssHash(TestCase): >=20 > self.dut.send_expect("quit", "# ", 30) >=20 > - def test_simple_symmetric(self): > - > - dutPorts =3D self.dut.get_ports(self.nic) > - localPort =3D self.tester.get_local_port(dutPorts[0]) > - itf =3D self.tester.get_interface(localPort) > - global reta_num > - global iptypes > - self.dut.kill_all() > - > - # test with different rss queues > - self.dut.send_expect( > - "%s %s -- -i --rxq=3D%d --txq=3D%d" % > - (self.path, self.eal_para, queue, queue), "testpmd> ", 120) > - > - for iptype, rsstype in list(iptypes.items()): > - self.dut.send_expect("set verbose 8", "testpmd> ") > - self.dut.send_expect("set fwd rxonly", "testpmd> ") > - self.dut.send_expect("set promisc all off", "testpmd> ") > - self.dut.send_expect( > - "set nbcore %d" % (queue + 1), "testpmd> ") > - > - self.dut.send_expect("port stop all", "testpmd> ") > - self.dut.send_expect( > - "set_hash_global_config 0 simple_xor %s enable" % iptype= , "testpmd> > ") > - self.dut.send_expect( > - "set_sym_hash_ena_per_port 0 enable", "testpmd> ") > - self.dut.send_expect("port start all", "testpmd> ") > - > - out =3D self.dut.send_expect( > - "port config all rss %s" % rsstype, "testpmd> ") > - self.verify("error" not in out, "Configuration of RSS hash f= ailed: Invalid > argument") > - # configure the reta with specific mappings. > - for i in range(reta_num): > - reta_entries.insert(i, random.randint(0, queue - 1)) > - self.dut.send_expect( > - "port config 0 rss reta (%d,%d)" % (i, reta_entries[= i]), "testpmd> ") > - self.send_packet_symmetric(itf, iptype) > - > - self.dut.send_expect("quit", "# ", 30) > - > - def test_dynamic_rss_bond_config(self): > - > - # setup testpmd and finish bond config > - self.verify(self.nic in ["columbiaville_25g", > "columbiaville_100g","fortville_eagle", "fortville_spirit", > - "fortpark_TLV","fortpark_BASE-T", "fortville_25g", "= carlsville", > "foxville"], > - "NIC Unsupported: " + str(self.nic)) > - > - self.dut.send_expect("%s %s -- -i" % (self.path, self.eal_para),= "testpmd> ", > 120) > - self.dut.send_expect("set promisc all off", "testpmd> ") > - out =3D self.dut.send_expect("create bonded device 3 0", "testpm= d> ", 30) > - bond_device_id =3D int(re.search("port \d+", out).group().split(= " ")[-1].strip()) > - > - self.dut.send_expect("add bonding slave 0 %d" % bond_device_id, > "testpmd>", 30) > - self.dut.send_expect("add bonding slave 1 %d" % bond_device_id, > "testpmd>", 30) > - > - # get slave device default rss hash algorithm > - out =3D self.dut.send_expect("get_hash_global_config 0", "testpm= d>") > - slave0_hash_function =3D re.search("Hash function is .+", out).g= roup().split(" > ")[-1].strip() > - out =3D self.dut.send_expect("get_hash_global_config 1", "testpm= d>") > - slave1_hash_function =3D re.search("Hash function is .+", out).g= roup().split(" > ")[-1].strip() > - self.verify(slave0_hash_function =3D=3D slave1_hash_function, "d= efault hash > function not match") > - > - new_hash_function =3D "" > - for hash_function in ["toeplitz", "simple_xor"]: > - if slave0_hash_function[-3:].lower() !=3D hash_function[-3:]= : > - new_hash_function =3D hash_function > - # update slave 0 rss hash algorithm and get slave 0 and slave 1 = rss new hash > algorithm > - self.dut.send_expect("set_hash_global_config 0 %s ipv4-other ena= ble" % > new_hash_function, "testpmd>") > - out =3D self.dut.send_expect("get_hash_global_config 0", "testpm= d>") > - slave0_new_hash_function =3D re.search("Hash function is .+", > out).group().split(" ")[-1].strip() > - out =3D self.dut.send_expect("get_hash_global_config 1", "testpm= d>") > - slave1_new_hash_function =3D re.search("Hash function is .+", > out).group().split(" ")[-1].strip() > - > - self.verify(slave0_new_hash_function =3D=3D slave1_new_hash_func= tion, > "bond slave auto sync hash function failed") > - self.verify(slave0_new_hash_function[-3:].lower() =3D=3D new_has= h_function[- > 3:], "changed slave hash function failed") > - > - self.dut.send_expect("remove bonding slave 0 %d" % bond_device_i= d, > "testpmd>", 30) > - self.dut.send_expect("remove bonding slave 1 %d" % bond_device_i= d, > "testpmd>", 30) > - self.dut.send_expect("quit","# ", 30) > - > def tear_down(self): > """ > Run after each test case. > -- > 2.7.4