From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 974553DC for ; Wed, 14 Dec 2016 10:11:27 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 14 Dec 2016 01:11:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,346,1477983600"; d="scan'208";a="42438371" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga006.fm.intel.com with ESMTP; 14 Dec 2016 01:11:26 -0800 Received: from fmsmsx155.amr.corp.intel.com (10.18.116.71) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 14 Dec 2016 01:11:26 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX155.amr.corp.intel.com (10.18.116.71) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 14 Dec 2016 01:11:26 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.97]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.77]) with mapi id 14.03.0248.002; Wed, 14 Dec 2016 17:11:21 +0800 From: "Xu, HuilongX" To: "Liu, Yong" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] try to fix sometime dut port rx packets error Thread-Index: AQHSUFkjh0ZWOWS9Ak25TD2et1SbTKEHIecwgAAQkCA= Date: Wed, 14 Dec 2016 09:11:20 +0000 Message-ID: References: <1481094722-24921-1-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D166CB@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <86228AFD5BCD8E4EBFD2B90117B5E81E62D166CB@SHSMSX103.ccr.corp.intel.com> Accept-Language: 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] try to fix sometime dut port rx packets error 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, 14 Dec 2016 09:11:28 -0000 Hi yong, This is only a try bug fix, because the issue can't reproduce. But some tim= e it will Generate. So I want send packet again. Thanks a lot > -----Original Message----- > From: Liu, Yong > Sent: Wednesday, December 14, 2016 4:12 PM > To: Xu, HuilongX; dts@dpdk.org > Cc: Xu, HuilongX > Subject: RE: [dts] [PATCH V1] try to fix sometime dut port rx packets > error >=20 > Huilong, >=20 > Packet transmission should be reliable in DTS, otherwise all cases can't > trust with the result. > If send packet by scapy console is not so reliable, please try with > packet module. We plan to replace scapy command with packet module later. >=20 > Marvin >=20 > > -----Original Message----- > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong > > Sent: Wednesday, December 07, 2016 3:12 PM > > To: dts@dpdk.org > > Cc: Xu, HuilongX > > Subject: [dts] [PATCH V1] try to fix sometime dut port rx packets > error > > > > some time dut rx packet error, we guess the root case about scapy send > > packets. > > so we try send packets again when check dut not rx packets. > > > > Signed-off-by: xu,huilong > > --- > > tests/TestSuite_pmd.py | 30 +++++++++++++++++------------- > > 1 file changed, 17 insertions(+), 13 deletions(-) > > > > diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py > > index 7b9e6b5..e8a65e5 100644 > > --- a/tests/TestSuite_pmd.py > > +++ b/tests/TestSuite_pmd.py > > @@ -342,19 +342,23 @@ class TestPmd(TestCase,IxiaPacketGenerator): > > checksum =3D '' > > if checksum_test: > > checksum =3D 'chksum=3D0x1' > > - > > - self.tester.scapy_foreground() > > - self.tester.scapy_append('nutmac=3D"%s"' % mac) > > - self.tester.scapy_append('sendp([Ether(dst=3Dnutmac, > > src=3D"52:00:00:00:00:00")/IP(len=3D%s)/UDP(%s)/Raw(load=3D"\x50"*%s)], > > iface=3D"%s")' % ( > > - load_size, checksum, padding, interface)) > > - > > - out =3D self.tester.scapy_execute() > > - time.sleep(.5) > > - > > - port0_stats =3D self.get_stats(self.dut_ports[0]) > > - p0tx_pkts, p0tx_bytes =3D [port0_stats['TX-packets'], > > port0_stats['TX-bytes']] > > - port1_stats =3D self.get_stats(self.dut_ports[1]) > > - p1rx_pkts, p1rx_err, p1rx_bytes =3D [port1_stats['RX-packets']= , > > port1_stats['RX-errors'], port1_stats['RX-bytes']] > > + for i in range(3): > > + self.tester.scapy_foreground() > > + self.tester.scapy_append('nutmac=3D"%s"' % mac) > > + self.tester.scapy_append('sendp([Ether(dst=3Dnutmac, > > src=3D"52:00:00:00:00:00")/IP(len=3D%s)/UDP(%s)/Raw(load=3D"\x50"*%s)], > > iface=3D"%s")' % ( > > + load_size, checksum, padding, interface)) > > + > > + out =3D self.tester.scapy_execute() > > + time.sleep((i + 1) * 0.5) > > + > > + port0_stats =3D self.get_stats(self.dut_ports[0]) > > + p0tx_pkts, p0tx_bytes =3D [port0_stats['TX-packets'], > > port0_stats['TX-bytes']] > > + port1_stats =3D self.get_stats(self.dut_ports[1]) > > + p1rx_pkts, p1rx_err, p1rx_bytes =3D [port1_stats['RX- > packets'], > > port1_stats['RX-errors'], port1_stats['RX-bytes']] > > + #dut port rx packets already > > + if (p1rx_pkts - gp1rx_pkts): > > + break > > + time.sleep(i) > > > > p0tx_pkts -=3D gp0tx_pkts > > p0tx_bytes -=3D gp0tx_bytes > > -- > > 1.9.3