From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3A3645683 for ; Mon, 13 Jul 2015 07:51:18 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 12 Jul 2015 22:51:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,459,1432623600"; d="scan'208";a="763271808" Received: from kmsmsx152.gar.corp.intel.com ([172.21.73.87]) by orsmga002.jf.intel.com with ESMTP; 12 Jul 2015 22:51:16 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by KMSMSX152.gar.corp.intel.com (172.21.73.87) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 13 Jul 2015 13:51:14 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.46]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.246]) with mapi id 14.03.0224.002; Mon, 13 Jul 2015 13:51:13 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] add rss hash key size case Thread-Index: AQHQvS7sEICnSjy1F0ykN2A8uP0F0p3Y5FLg Date: Mon, 13 Jul 2015 05:51:12 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10E6019C@SHSMSX103.ccr.corp.intel.com> References: <1436766205-4943-1-git-send-email-huilongx.xu@intel.com> In-Reply-To: <1436766205-4943-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] add rss hash key size 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, 13 Jul 2015 05:51:18 -0000 Huilong, There should be one new line before function test_rss_key_size. And one com= ment about log message. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu > Sent: Monday, July 13, 2015 1:43 PM > To: dts@dpdk.org > Subject: [dts] add rss hash key size case >=20 > From: huilong xu >=20 >=20 > Signed-off-by: huilong xu > --- > tests/TestSuite_pmdrssreta.py | 24 ++++++++++++++++++++++++ > 1 files changed, 24 insertions(+), 0 deletions(-) >=20 > diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.p= y > index 60f340d..1749889 100644 > --- a/tests/TestSuite_pmdrssreta.py > +++ b/tests/TestSuite_pmdrssreta.py > @@ -241,6 +241,30 @@ class TestPmdrssreta(TestCase): > self.send_packet(itf, iptype) >=20 > self.dut.send_expect("quit", "# ", 30) > + def test_rss_key_size(self): > + nic_rss_key_size =3D {"fortville_eagle":52, "fortville_spirit":5= 2, > "fortville_spirit_single":52, "niantic": 40, "e1000": 40} > + dutPorts =3D self.dut.get_ports(self.nic) > + localPort =3D self.tester.get_local_port(dutPorts[0]) > + itf =3D self.tester.get_interface(localPort) > + self.dut.kill_all() > + self.dut.send_expect("./%s/app/testpmd -c fffff -n %d -- -i -- > coremask=3D0xffffe --rxq=3D2 --txq=3D2" % (self.target, > self.dut.get_memory_channels()), "testpmd> ", 120) > + self.dut.send_expect("start", "testpmd> ", 120) > + out =3D self.dut.send_expect("show port info all", "testpmd> ", = 120) > + self.dut.send_expect("quit", "# ", 30) > + print out > + > + pattern =3D re.compile("Hash key size in bytes:\s(\d+)") > + m =3D pattern.search(out) > + if m is not None: > + size =3D m.group(1) > + print "******************" > + print size > + print self.nic Can you optimize this simple print to more meaningful sentence, like "Niant= ic Rss size should be 40 and testpmd reported 40". > + print nic_rss_key_size[self.nic] > + if (nic_rss_key_size[self.nic] =3D=3D int(size)): > + self.verify(True, "pass") > + else: > + self.verify(False, "fail") >=20 > def tear_down(self): > """ > -- > 1.7.4.4