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 B4FC51F5 for ; Mon, 15 May 2017 03:27:18 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 14 May 2017 18:27:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,342,1491289200"; d="scan'208";a="1169173705" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 14 May 2017 18:27:15 -0700 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 14 May 2017 18:27:14 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 14 May 2017 18:27:13 -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:27:12 +0800 From: "Xu, HuilongX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V2] fix user space ethtool failed case Thread-Index: AQHSywDuIq9t8IGT70OAbYcRF3FOWKH0md3A Date: Mon, 15 May 2017 01:27:10 +0000 Message-ID: References: <1494575072-44798-1-git-send-email-huilongx.xu@intel.com> <1494575072-44798-7-git-send-email-huilongx.xu@intel.com> <59157B43.50101@intel.com> In-Reply-To: <59157B43.50101@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 V2] fix user space ethtool failed 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:27:19 -0000 > -----Original Message----- > From: Liu, Yong > Sent: Friday, May 12, 2017 5:07 PM > To: Xu, HuilongX; dts@dpdk.org > Subject: Re: [dts] [PATCH V2] fix user space ethtool failed case >=20 > Huilong, some comments below. >=20 > On 05/12/2017 03:44 PM, xu,huilong wrote: > > 1. update user space ethtool compile error, becauese the example path > > update in dpdk already 2. kernel space ethtool dump nic eeprom file siz= e > differnet dpdk user space ethtool, so should > > cat out dpdk ethtool dump nic eeprom file and the file size same wi= th > kernel ethtool. then use > > file md5 check the file is same > > > > Signed-off-by: xu,huilong > > --- > > tests/TestSuite_userspace_ethtool.py | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/tests/TestSuite_userspace_ethtool.py > > b/tests/TestSuite_userspace_ethtool.py > > index 937a9e5..36ff104 100644 > > --- a/tests/TestSuite_userspace_ethtool.py > > +++ b/tests/TestSuite_userspace_ethtool.py > > @@ -61,7 +61,7 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > > self.verify("Error" not in out, "compilation error 1") > > self.verify("No such file" not in out, "compilation error > > 2") > > > > - path =3D "./examples/ethtool/ethtool-app/ethtool-app/%s/ethtoo= l" % > self.target > > + path =3D "./examples/ethtool/ethtool-app/%s/ethtool" % > > + self.target > > self.cmd =3D "%s -c f -n %d" % (path, > > self.dut.get_memory_channels()) > > > > # pause frame basic configuration @@ -370,7 +370,9 @@ class > > TestUserspaceEthtool(TestCase, IxiaPacketGenerator): > > self.dut.send_expect("ethtool --eeprom-dump %s raw on > %= s" % > (intf, ethtool_eeprom), "# ") > > # wait for file ready > > time.sleep(2) > > - portinfo['ethtool_eeprom'] =3D ethtool_eeprom > > + dpdk_eeprom_size =3D int(self.dut.send_expect('ls -all %s' > > + % portinfo['eeprom_file'], '# ').split(' ')[4].strip()) > There's one simple command "stat -c \%s file" to strip file size. I will update it next version >=20 > > + self.dut.send_expect('dd if=3D%s of=3D%s bs=3D%d count=3D1= ' % > (ethtool_eeprom, "ethtool_eeprom_%d_cat.bin" % index, > dpdk_eeprom_size), "#") > > + portinfo['ethtool_eeprom'] =3D "ethtool_eeprom_%d_cat.bin" > > + % index > > # bind to original driver > > portinfo['net_dev'].bind_driver(portinfo['ori_driver']) > > > > @@ -499,8 +501,10 @@ class TestUserspaceEthtool(TestCase, > IxiaPacketGenerator): > > for index in range(len(self.ports)): > > port =3D self.ports[index] > > ori_rx_pkts, _ =3D self.strip_portstats(index) > > + time.sleep(10) > > # stop port > > self.dut.send_expect("stop %d" % index, "EthApp>") > > + time.sleep(10) >=20 > Sleep 20 seconds seem too long, please explain why need this. For Fortville nic when port stats change, should more = time to update link stats.=20 Update link stats maybe need 5 seconds in manual test= , so we will sleep 10 seconds=20 For every ports stats update in test case. > > # check packet not forwarded when port is stop > > pkt =3D Packet() > > tester_port =3D self.tester.get_local_port(port)