From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E9A342BB1 for ; Thu, 2 Mar 2017 09:14:07 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Mar 2017 00:14:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,230,1484035200"; d="scan'208";a="70708653" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga005.jf.intel.com with ESMTP; 02 Mar 2017 00:14:06 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 2 Mar 2017 00:14:06 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Thu, 2 Mar 2017 16:14:04 +0800 From: "Xu, HuilongX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1 2/2] add dyanmic config bonding rss hash test case Thread-Index: AQHSkm2dDcWlrY5VRE6V6qdMbMa1eKF/dRIAgAG+87A= Date: Thu, 2 Mar 2017 08:14:03 +0000 Message-ID: References: <1488360320-42799-1-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D6C3AC@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D6C3AC@SHSMSX103.ccr.corp.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 V1 2/2] add dyanmic config bonding rss hash 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: Thu, 02 Mar 2017 08:14:08 -0000 > -----Original Message----- > From: Liu, Yong > Sent: Wednesday, March 01, 2017 9:31 PM > To: Xu, HuilongX; dts@dpdk.org > Cc: Xu, HuilongX > Subject: RE: [dts] [PATCH V1 2/2] add dyanmic config bonding rss hash tes= t > case >=20 > Hi Huilong, >=20 > Some comments below. >=20 > Thanks, > Marvin >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > > Sent: Wednesday, March 01, 2017 5:25 PM > > To: dts@dpdk.org > > Cc: Xu, HuilongX > > Subject: [dts] [PATCH V1 2/2] add dyanmic config bonding rss hash test > > case > > > > Signed-off-by: xu,huilong > > --- > > tests/TestSuite_pmdrss_hash.py | 35 > > ++++++++++++++++++++++++++++++++++- > > 1 file changed, 34 insertions(+), 1 deletion(-) > > > > diff --git a/tests/TestSuite_pmdrss_hash.py > > b/tests/TestSuite_pmdrss_hash.py index 78ae34d..5ab8b6b 100644 > > --- a/tests/TestSuite_pmdrss_hash.py > > +++ b/tests/TestSuite_pmdrss_hash.py > > @@ -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") > > > > def set_up(self): > > """ > > @@ -650,6 +650,39 @@ class TestPmdrssHash(TestCase): > > self.send_packet_symmetric(itf, iptype) > > > > self.dut.send_expect("quit", "# ", 30) >=20 > Need blank line here. Thanks, I will send V2 patch and fix it >=20 >=20 > > + def test_dyanmic_rss_bond_config(self): >=20 > Typo, should be dynamic. Thanks I will send V2 patch and fix it >=20 >=20 > > + self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i -- > > txqflags=3D0" % self.target, "testpmd> ", 120) > > + out =3D self.dut.send_expect("create bonded device 3 0", > > + "testpmd> > > ", 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 > This criteria has been validated in set_up_all function, no need here. Yes, I will remove it in V2 patch >=20 > > + > > + 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", > > + "testpmd>") > > + > > + 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_function, > > "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") > > + > Not sure set and get is enough for validation, hash function not checked = here. This case only check update slave0 hash function, and slave1 will auto sync= hash function. So there are two check point.=20 First point: salv0 and slav1 hash function must same Second point: slav0 hash function update successful. >=20 > > + self.dut.send_expect("quit","# ", 30) > > + > > > > def tear_down(self): > > """ > > -- > > 1.9.3