From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 5A879A05D3 for ; Tue, 23 Apr 2019 22:48:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FB8E1B441; Tue, 23 Apr 2019 22:48:13 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 93FA31B1FE for ; Tue, 23 Apr 2019 22:48:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2019 13:48:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,387,1549958400"; d="scan'208";a="145095540" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga003.jf.intel.com with ESMTP; 23 Apr 2019 13:48:10 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 23 Apr 2019 13:48:10 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 23 Apr 2019 13:48:10 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.164]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.21]) with mapi id 14.03.0415.000; Wed, 24 Apr 2019 04:48:08 +0800 From: "Tu, Lijuan" To: "thaq@marvell.com" , "dts@dpdk.org" CC: "fmasood@marvell.com" , "avijay@marvell.com" Thread-Topic: [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucation & rss key-size for cavium_a063. Thread-Index: AQHU+br1cF039F2HWU6jOxw5HykRDqZKODaw Date: Tue, 23 Apr 2019 20:48:07 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA65A5E@SHSMSX101.ccr.corp.intel.com> References: <1556013398-16026-1-git-send-email-thaq@marvell.com> In-Reply-To: <1556013398-16026-1-git-send-email-thaq@marvell.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWE4M2ViZTMtMWQ1Ny00MTY2LWEwNTItYmJmMGNjYmRiNWY3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoieWQyZXVIVStoMWw5aUlXUFFDSFFSMGN3cTUzUHdHajVhZHQ2eXBUZ2xJTDhYNVpMZExDdFlObU5HenNIditkNCJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucation & rss key-size for cavium_a063. X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of thaq@marvell.com > Sent: Tuesday, April 23, 2019 2:57 AM > To: dts@dpdk.org > Cc: fmasood@marvell.com; avijay@marvell.com; Thanseerulhaq > > Subject: [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucatio= n > & rss key-size for cavium_a063. >=20 > From: Thanseerulhaq >=20 > Added hash_index calucation for cavium_a063 adaptor which use > simple_xor algo. > Added rss key-size for cavium_a063 adaptor as 48. >=20 > Signed-off-by: Thanseerulhaq > --- > tests/TestSuite_pmdrssreta.py | 21 ++++++++++++++++++--- > 1 file changed, 18 insertions(+), 3 deletions(-) >=20 > diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.p= y > index 4a2bfd3..03c54a2 100644 > --- a/tests/TestSuite_pmdrssreta.py > +++ b/tests/TestSuite_pmdrssreta.py > @@ -37,6 +37,7 @@ import time > import random > import re > import utils > +import textwrap > testQueues =3D [2, 9, 16] > reta_entries =3D [] > reta_lines =3D [] > @@ -148,7 +149,16 @@ class TestPmdrssreta(TestCase): > i =3D 0 > for tmp_reta_line in reta_lines: > status =3D "false" > - if(self.nic in ["hi1822"]): > + if(self.nic in ["cavium_a063"]): > + # compute the hash result using simple XOR. > + hash_index_tmp =3D 0 > + index_tmp =3D tmp_reta_line["RSS hash"].strip("0x") > + index_tmp =3D textwrap.wrap(index_tmp,2) > + index_tmp =3D [hex(int(index,16)) for index in index_tmp= ] > + for index in index_tmp: > + hash_index_tmp =3D eval(str(hash_index_tmp)+'^'+inde= x) > + hash_index =3D int(hash_index_tmp) % 64 > + elif(self.nic in ["hi1822"]): > hash_index =3D int(tmp_reta_line["RSS hash"], 16) % 256 > elif (self.nic in ["niantic", "redrockcanyou", "atwood", > "boulderrapid"]): > # compute the hash result of five tuple into the 7 LSBs = value. > @@ -223,7 +233,12 @@ class TestPmdrssreta(TestCase): > self.verify("error" not in out, "Configuration of RSS ha= sh failed: > Invalid argument") >=20 > # configure the reta with specific mappings. > - if(self.nic in ["hi1822"]): > + if(self.nic in ["cavium_a063"]): > + for i in range(64): > + 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> ") > + elif(self.nic in ["hi1822"]): > for i in range(256): > reta_entries.insert(i, random.randint(0, queue -= 1)) > self.dut.send_expect( @@ -244,7 +259,7 @@ class > TestPmdrssreta(TestCase): > self.dut.send_expect("quit", "# ", 30) >=20 > def test_rss_key_size(self): > - nic_rss_key_size =3D {"fortville_eagle": 52, "fortville_spirit":= 52, > "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, "e1000= ": 40, > "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 5= 2, > "hi1822": 40} > + nic_rss_key_size =3D {"fortville_eagle": 52, "fortville_spirit": > + 52, "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, > + "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40, > + "fortpark_TLV": 52, "hi1822": 40, "cavium_a063": 48} > self.verify(self.nic in nic_rss_key_size.keys(), "Not supporte r= ss key > on %s" % self.nic) >=20 > dutPorts =3D self.dut.get_ports(self.nic) > -- > 1.8.3.1