From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D017120F for ; Wed, 14 Dec 2016 16:18:40 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 14 Dec 2016 07:18:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,347,1477983600"; d="scan'208";a="202536381" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga004.fm.intel.com with ESMTP; 14 Dec 2016 07:18:39 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 14 Dec 2016 07:18:39 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.11]) by shsmsx102.ccr.corp.intel.com ([169.254.2.54]) with mapi id 14.03.0248.002; Wed, 14 Dec 2016 23:18:35 +0800 From: "Liu, Yong" To: "Xu, HuilongX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH V1] try to fix sometime dut port rx packets error Thread-Index: AQHSUFkjh0ZWOWS9Ak25TD2et1SbTKEHIecwgAAQkCCAAGbZQA== Date: Wed, 14 Dec 2016 15:18:35 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D16944@SHSMSX103.ccr.corp.intel.com> References: <1481094722-24921-1-git-send-email-huilongx.xu@intel.com> <86228AFD5BCD8E4EBFD2B90117B5E81E62D166CB@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: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzI3MTU3ZjUtZWYyOS00OTk2LTkwNmYtNWVmYjQ4OTQyYmMwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlcwUnNZTkJpaTNkRXpuRXdTN0p2NUE1MDJcLzdqZXN1NCtDNjFET0lqNkJRPSJ9 x-ctpclassification: CTP_IC 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 15:18:41 -0000 So I think it's your debug code. You need keep it locally and until find th= e solution for the real cause. Again, you can try functions in packet module which I think is more reliabl= e than scapy console. Thanks, Marvin > -----Original Message----- > From: Xu, HuilongX > Sent: Wednesday, December 14, 2016 5:11 PM > To: Liu, Yong; dts@dpdk.org > Subject: RE: [dts] [PATCH V1] try to fix sometime dut port rx packets > error >=20 > Hi yong, > This is only a try bug fix, because the issue can't reproduce. But some > time it will > Generate. So I want send packet again. > Thanks a lot >=20 > > -----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 > > > > Huilong, > > > > 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 late= r. > > > > Marvin > > > > > -----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 sen= d > > > 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