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 1730A2C00 for ; Thu, 31 Aug 2017 08:28:41 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2017 23:28:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,451,1498546800"; d="scan'208";a="895780519" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 30 Aug 2017 23:28:40 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 23:28:40 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 23:28:39 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.219]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.98]) with mapi id 14.03.0319.002; Thu, 31 Aug 2017 14:28:37 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] fix link status interrupt failed case Thread-Index: AQHTHXFJbiyVW3x01EaRrLuXqKJLOKKcobwwgADWPoCAAJC9gA== Date: Thu, 31 Aug 2017 06:28:37 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62E961FB@SHSMSX103.ccr.corp.intel.com> References: <1503645095-90269-1-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E957C3@SHSMSX103.ccr.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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] fix link status interrupt 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: Thu, 31 Aug 2017 06:28:42 -0000 Hi Huilong, Some answers inline. > -----Original Message----- > From: Xu, HuilongX > Sent: Thursday, August 31, 2017 1:46 PM > To: Liu, Yong ; dts@dpdk.org > Subject: RE: [dts] [PATCH V1] fix link status interrupt failed case >=20 > Hi yong, >=20 > -----Original Message----- > From: Liu, Yong > Sent: Wednesday, August 30, 2017 5:07 PM > To: Xu, HuilongX ; dts@dpdk.org > Cc: Xu, HuilongX > Subject: RE: [dts] [PATCH V1] fix link status interrupt failed case >=20 > Huilong, > Some comments and questions below. >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > > Sent: Friday, August 25, 2017 3:12 PM > > To: dts@dpdk.org > > Cc: Xu, HuilongX > > Subject: [dts] [PATCH V1] fix link status interrupt failed case > > > > update list: > > 1. update fortville nic test interrupt mode list 2. fix example setup > > failed 3. fix check port stats in example 4. fix check rx/tx packet > > get count number error > > > > Signed-off-by: xu,huilong > > --- > > tests/TestSuite_link_status_interrupt.py | 34 > > +++++++++++++++++++++++---- > > ----- > > 1 file changed, 25 insertions(+), 9 deletions(-) > > > > diff --git a/tests/TestSuite_link_status_interrupt.py > > b/tests/TestSuite_link_status_interrupt.py > > index ae205cc..2249cf1 100644 > > --- a/tests/TestSuite_link_status_interrupt.py > > +++ b/tests/TestSuite_link_status_interrupt.py > > @@ -61,6 +61,15 @@ class TestLinkStatusInterrupt(TestCase): > > out =3D > self.dut.build_dpdk_apps("./examples/link_status_interrupt") > > self.verify("Error" not in out, "compilation error 1") > > self.verify("No such file" not in out, "compilation error 2") > > + # fortville NIC not support legacy intr mode > > + if self.nic in ["fortville_eagle", "fortville_spirit", > > + "fortville_spirt_single", "fortville_25g"]: > > + self.basic_intr_mode =3D ["msix"] > > + else: > > + self.basic_intr_mode =3D ["msix", "legacy"] > > + # vfio support msi intr mode > > + if self.drivername =3D=3D "vfio-pci": > > + self.basic_intr_mode.append("msi") >=20 >=20 > Please add link of dpdk release note in the commit log. > This is a linux kernel issue, I will add kernel patch url next version >=20 Just dpdk release note is enough, just let other guys known where to get de= tail information. > > > > def set_link_status_and_verify(self, dutPort, status): > > """ > > @@ -71,7 +80,9 @@ class TestLinkStatusInterrupt(TestCase): > > self.tester.send_expect("ifconfig %s %s" % > > (self.intf, status.lower()), "# ", 10) > > verify_point =3D "Port %s Link %s" % (dutPort, status) > > - self.dut.send_expect("", verify_point, 60) > > + > > + out =3D self.dut.get_session_output(timeout=3D60) > > + self.verify(verify_point in out,"link status update error") > > > > def set_up(self): > > """ > > @@ -86,20 +97,23 @@ class TestLinkStatusInterrupt(TestCase): > > if self.drivername =3D=3D "igb_uio": > > cmdline =3D self.path + " -c %s -n %s -- -p %s " % ( > > self.coremask, self.dut.get_memory_channels(), > > self.portmask) > > - for mode in ["legacy", "msix"]: > > + for mode in self.basic_intr_mode: > > self.dut.send_expect("rmmod -f igb_uio", "#", 20) > > self.dut.send_expect( > > 'insmod %s/kmod/igb_uio.ko "intr_mode=3D%s"' % > > (self.target, mode), "# ") > > self.dut.bind_interfaces_linux() > > - self.dut.send_expect(cmdline, "Aggregate statistics", > 60) > > + self.dut.send_expect(cmdline, "", 180) >=20 > If there's nothing to check in output, you can use function > "self.dut.send_command(timeout=3Dtime)". > And 180 seconds is too long, what is waiting for? > I will use send_command to replace send_expect, and example setup need > more time, because this example will print info in loop mode. >=20 > > + out =3D self.dut.get_session_output(timeout=3D60) >=20 > Function "get_session_output" just return all output after timeout. > Normally we will use default value, why enlarge time out value to 60 > seconds? > Infor "Port statistics" form example by loop mode, so need more time. Could you add some variable for the loop time?=20 In my mind 60 seconds is too long, maybe this sample just require for such = time. Please use some constant value to emphasis that the output interval of this= sample is special. > > + self.verify("Port statistics" in out, "setup example > > error") > > + time.sleep(10) > > self.set_link_status_and_verify(self.dut_ports[0], > 'Down') > > self.set_link_status_and_verify(self.dut_ports[0], 'Up= ') > > self.dut.send_expect("^C", "#", 60) > > elif self.drivername =3D=3D "vfio-pci": > > - for mode in ["legacy", "msi", "msix"]: > > + for mode in self.basic_intr_mode : >=20 > Pep issue here, please modify it. > I will update it at next version > > cmdline =3D self.path + " -c %s -n %s --vfio-intr=3D%s= -- > > - p %s" % ( > > self.coremask, self.dut.get_memory_channels(), > > mode, > > self.portmask) > > - self.dut.send_expect(cmdline, "Aggregate statistics", > 60) > > + self.dut.send_expect(cmdline, "statistics > > + statistics", > > 120) >=20 >=20 > A bit tricky here, why double "statistics" here? > I will update it next version > > self.set_link_status_and_verify(self.dut_ports[0], > 'Down') > > self.set_link_status_and_verify(self.dut_ports[0], 'Up= ') > > self.dut.send_expect("^C", "#", 60) @@ -112,7 +126,7 > > @@ class TestLinkStatusInterrupt(TestCase): > > if self.drivername =3D=3D "igb_uio": > > cmdline =3D self.path + " -c %s -n %s -- -p %s " % ( > > self.coremask, self.dut.get_memory_channels(), > > self.portmask) > > - for mode in ["legacy", "msix"]: > > + for mode in self.basic_intr_mode: > > self.dut.send_expect("rmmod -f igb_uio", "#", 20) > > self.dut.send_expect( > > 'insmod %s/kmod/igb_uio.ko "intr_mode=3D%s"' % > > (self.target, mode), "# ") @@ -129,11 +143,12 @@ class > > TestLinkStatusInterrupt(TestCase): > > pkt_send =3D re.findall("Total packets sent:\s*(\d*)", > out) > > pkt_received =3D re.findall( > > "Total packets received:\s*(\d*)", out) > > - self.verify(pkt_send =3D=3D pkt_received =3D=3D '1', > > + # example will print rx/tx packet info by loop so > > + only > > check last one > > + self.verify(pkt_send[-1] =3D=3D pkt_received[-1] =3D= =3D '1', > > "Error: sent packets !=3D received packets= ") > > self.dut.send_expect("^C", "#", 60) > > elif self.drivername =3D=3D "vfio-pci": > > - for mode in ["legacy", "msi", "msix"]: > > + for mode in self.basic_intr_mode: > > cmdline =3D self.path + " -c %s -n %s --vfio-intr=3D%s= -- > > - p %s" % ( > > self.coremask, self.dut.get_memory_channels(), > > mode, > > self.portmask) > > self.dut.send_expect(cmdline, "Aggregate statistics", > > 60) @@ -148,7 +163,8 @@ class TestLinkStatusInterrupt(TestCase): > > pkt_send =3D re.findall("Total packets sent:\s*(\d*)", > out) > > pkt_received =3D re.findall( > > "Total packets received:\s*(\d*)", out) > > - self.verify(pkt_send =3D=3D pkt_received =3D=3D '1', > > + # example will print rx/tx packet info by loop so > > + only > > check last one > > + self.verify(pkt_send[-1] =3D=3D pkt_received[-1] =3D= =3D '1', > > "Error: sent packets !=3D received packets= ") > > self.dut.send_expect("^C", "#", 60) > > > > -- > > 1.9.3