From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 6EE182B9D for ; Wed, 1 Mar 2017 14:30:44 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP; 01 Mar 2017 05:30:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,225,1484035200"; d="scan'208";a="231037158" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 01 Mar 2017 05:30:43 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 1 Mar 2017 05:30:43 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 1 Mar 2017 05:30:43 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Wed, 1 Mar 2017 21:30:41 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" CC: "Xu, HuilongX" Thread-Topic: [dts] [PATCH V1 2/2] add dyanmic config bonding rss hash test case Thread-Index: AQHSkm20dSSkB9zu7EaGRCsTDFwOcaF/+Wlw Date: Wed, 1 Mar 2017 13:30:40 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D6C3AC@SHSMSX103.ccr.corp.intel.com> References: <1488360320-42799-1-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1488360320-42799-1-git-send-email-huilongx.xu@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: Wed, 01 Mar 2017 13:30:44 -0000 Hi Huilong, Some comments below. Thanks, Marvin > -----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 >=20 > Signed-off-by: xu,huilong > --- > tests/TestSuite_pmdrss_hash.py | 35 ++++++++++++++++++++++++++++++++++- > 1 file changed, 34 insertions(+), 1 deletion(-) >=20 > 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") >=20 > def set_up(self): > """ > @@ -650,6 +650,39 @@ class TestPmdrssHash(TestCase): > self.send_packet_symmetric(itf, iptype) >=20 > self.dut.send_expect("quit", "# ", 30) Need blank line here. > + def test_dyanmic_rss_bond_config(self): Typo, should be dynamic. > + 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", "testpm= d> > ", 30) > + bond_device_id =3D int(re.search("port \d+", out).group().split(= " > ")[-1].strip()) > + self.verify(bond_device_id > 1, "not enought port for bonded > test") This criteria has been validated in set_up_all function, no need here. > + > + 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", "testpm= d>") > + > + 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", "testpm= d>") > + 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", "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_hash_function[-3:], "changed slave hash function failed") > + Not sure set and get is enough for validation, hash function not checked he= re. > + self.dut.send_expect("quit","# ", 30) > + >=20 > def tear_down(self): > """ > -- > 1.9.3