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 BEF222BF3 for ; Thu, 31 Aug 2017 07:46:31 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2017 22:46:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,451,1498546800"; d="scan'208";a="1212838424" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 30 Aug 2017 22:46:29 -0700 Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 22:46:29 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 30 Aug 2017 22:46:29 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.168]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Thu, 31 Aug 2017 13:46:27 +0800 From: "Xu, HuilongX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] fix link status interrupt failed case Thread-Index: AQHTIW9jqdhZHyxHJ0+NjMWmvU049qKd815A Date: Thu, 31 Aug 2017 05:46:27 +0000 Message-ID: References: <1503645095-90269-1-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62E957C3@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62E957C3@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 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 05:46:32 -0000 Hi yong, -----Original Message----- From: Liu, Yong=20 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 Huilong, Some comments and questions below. > -----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 >=20 > update list: > 1. update fortville nic test interrupt mode list 2. fix example setup=20 > failed 3. fix check port stats in example 4. fix check rx/tx packet=20 > get count number error >=20 > Signed-off-by: xu,huilong > --- > tests/TestSuite_link_status_interrupt.py | 34=20 > +++++++++++++++++++++++---- > ----- > 1 file changed, 25 insertions(+), 9 deletions(-) >=20 > 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_interru= pt") > 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") 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 > 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") >=20 > 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"' %=20 > (self.target, mode), "# ") > self.dut.bind_interfaces_linux() > - self.dut.send_expect(cmdline, "Aggregate statistics", 60= ) > + self.dut.send_expect(cmdline, "", 180) 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. > + out =3D self.dut.get_session_output(timeout=3D60) Function "get_session_output" just return all output after timeout. Normall= y 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. > + 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 : 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 -= -=20 > - p %s" % ( > self.coremask, self.dut.get_memory_channels(),=20 > mode, > self.portmask) > - self.dut.send_expect(cmdline, "Aggregate statistics", 60= ) > + self.dut.send_expect(cmdline, "statistics=20 > + statistics", > 120) 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=20 > @@ 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"' %=20 > (self.target, mode), "# ") @@ -129,11 +143,12 @@ class=20 > TestLinkStatusInterrupt(TestCase): > pkt_send =3D re.findall("Total packets sent:\s*(\d*)", o= ut) > 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=20 > + 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 -= -=20 > - p %s" % ( > self.coremask, self.dut.get_memory_channels(),=20 > mode, > self.portmask) > self.dut.send_expect(cmdline, "Aggregate statistics",=20 > 60) @@ -148,7 +163,8 @@ class TestLinkStatusInterrupt(TestCase): > pkt_send =3D re.findall("Total packets sent:\s*(\d*)", o= ut) > 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=20 > + 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) >=20 > -- > 1.9.3