From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id CB63A2C5 for ; Mon, 15 May 2017 03:09:02 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 May 2017 18:09:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,342,1491289200"; d="scan'208";a="856764192" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 14 May 2017 18:09:01 -0700 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 14 May 2017 18:09:01 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 14 May 2017 18:09:00 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.193]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Mon, 15 May 2017 09:08:58 +0800 From: "Xu, HuilongX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH 2/2] add link bond slave dynamic config test case Thread-Index: AQHSyv8MyuyMBRTCp0O4J+5fFoTa2qH0mRGw Date: Mon, 15 May 2017 01:08:57 +0000 Message-ID: References: <1494575072-44798-1-git-send-email-huilongx.xu@intel.com> <1494575072-44798-11-git-send-email-huilongx.xu@intel.com> <59157823.2030805@intel.com> In-Reply-To: <59157823.2030805@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 2/2] add link bond slave dynamic config test case 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: , X-List-Received-Date: Mon, 15 May 2017 01:09:03 -0000 Hi yong, Thanks a lot=20 > -----Original Message----- > From: Liu, Yong > Sent: Friday, May 12, 2017 4:54 PM > To: Xu, HuilongX; dts@dpdk.org > Subject: Re: [dts] [PATCH 2/2] add link bond slave dynamic config test ca= se >=20 > Huilong, > Some comments below. >=20 > On 05/12/2017 03:44 PM, xu,huilong wrote: > > update list: > > 1 add link bond slave dynamic config test case > > 2 use two port for this suite > > > > Signed-off-by: xu,huilong > > --- > > tests/TestSuite_pmdrss_hash.py | 32 > +++++++++++++++++++++++++++++--- > > 1 file changed, 29 insertions(+), 3 deletions(-) > > > > diff --git a/tests/TestSuite_pmdrss_hash.py > > b/tests/TestSuite_pmdrss_hash.py index 78ae34d..fd032f4 100644 > > --- a/tests/TestSuite_pmdrss_hash.py > > +++ b/tests/TestSuite_pmdrss_hash.py > > @@ -417,10 +417,10 @@ class TestPmdrssHash(TestCase): > > """ > > > > self.verify(self.nic in ["fortville_eagle", "fortville_spirit= ", > > - "fortville_spirit_single", "redrockcanyou", "atwoo= d", > "boulderrapid", "fortpark_TLV"], > > + "fortville_spirit_single", "redrockcanyou", > > + "atwood", "boulderrapid", "fortpark_TLV","fortville_25g"], >=20 > Here contain pep8 issue, please check with pep8 tool. Yes, I will update this in next version. > > "NIC Unsupported: " + str(self.nic)) > > global reta_num > > - if self.nic in ["fortville_eagle", "fortville_spirit", "fortvi= lle_spirit_single", > "fortpark_TLV"]: > > + if self.nic in ["fortville_eagle", "fortville_spirit", "fortvi= lle_spirit_single", > "fortpark_TLV","fortville_25g"]: > > reta_num =3D 512 > > elif self.nic in ["niantic"]: > > reta_num =3D 128 > > @@ -429,7 +429,7 @@ class TestPmdrssHash(TestCase): > > else: > > self.verify(False, "NIC Unsupported:%s" % str(self.nic)) > > ports =3D self.dut.get_ports(self.nic) > > - self.verify(len(ports) >=3D 1, "Not enough ports available") > > + self.verify(len(ports) >=3D 2, "Not enough ports available") > We are trying to limit port usage, is this case must use two ports? Yes, because this case must use two ports. One ports config rss by manual. = Another port will auto sync rss config. >=20 > > > > def set_up(self): > > """ > > @@ -651,6 +651,32 @@ class TestPmdrssHash(TestCase): > > > > self.dut.send_expect("quit", "# ", 30) > > > > + def test_dynamic_rss_bond_config(self): > > + self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i --txqfl= ags=3D0" % > self.target, "testpmd> ", 120) > > + out =3D self.dut.send_expect("create bonded device 3 0", "test= pmd> ", > 30) > > + bond_device_id =3D int(re.search("port \d+", out).group().spli= t(" ")[- > 1].strip()) > > + self.verify(bond_device_id > 1, "not enought port for bonded > > + test") >=20 > Please add some space line between different blocks. And add one > comment line to describe the code block. > It will more readable and easier for later maintenance. Yes, I will updte next version. > > + 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) > > + out =3D self.dut.send_expect("get_hash_global_config 0", "test= pmd>") > > + slave0_hash_function =3D re.search("Hash function is .+", > out).group().split(" ")[-1].strip() > > + out =3D self.dut.send_expect("get_hash_global_config 1", "test= pmd>") > > + slave1_hash_function =3D re.search("Hash function is .+", > out).group().split(" ")[-1].strip() > > + self.verify(slave0_hash_function =3D=3D slave1_hash_function, = "default > 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 > > + self.dut.send_expect("set_hash_global_config 0 %s ipv4-other > enable" % new_hash_function, "testpmd>") > > + out =3D self.dut.send_expect("get_hash_global_config 0", "test= pmd>") > > + 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", "test= pmd>") > > + 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_fu= nction, > "bond slave auto sync hash function failed") > > + self.verify(slave0_new_hash_function[-3:].lower() =3D=3D > new_hash_function[-3:], "changed slave hash function failed") > > + self.dut.send_expect("remove bonding slave 0 %d" % > bond_device_id, "testpmd>", 30) > > + self.dut.send_expect("remove bonding slave 1 %d" % > bond_device_id, "testpmd>", 30) > > + self.dut.send_expect("quit","# ", 30) > > def tear_down(self): > > """ > > Run after each test case.