From: "Liu, Yong" <yong.liu@intel.com>
To: "Xu, HuilongX" <huilongx.xu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH V1] try to fix sometime dut port rx packets error
Date: Wed, 14 Dec 2016 15:18:35 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62D16944@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <DF2A19295B96364286FEB7F3DDA27A4668CF194B@SHSMSX101.ccr.corp.intel.com>
So I think it's your debug code. You need keep it locally and until find the solution for the real cause.
Again, you can try functions in packet module which I think is more reliable 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
>
> 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
>
> > -----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 later.
> >
> > 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 send
> > > packets.
> > > so we try send packets again when check dut not rx packets.
> > >
> > > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > > ---
> > > 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 = ''
> > > if checksum_test:
> > > checksum = 'chksum=0x1'
> > > -
> > > - self.tester.scapy_foreground()
> > > - self.tester.scapy_append('nutmac="%s"' % mac)
> > > - self.tester.scapy_append('sendp([Ether(dst=nutmac,
> > > src="52:00:00:00:00:00")/IP(len=%s)/UDP(%s)/Raw(load="\x50"*%s)],
> > > iface="%s")' % (
> > > - load_size, checksum, padding, interface))
> > > -
> > > - out = self.tester.scapy_execute()
> > > - time.sleep(.5)
> > > -
> > > - port0_stats = self.get_stats(self.dut_ports[0])
> > > - p0tx_pkts, p0tx_bytes = [port0_stats['TX-packets'],
> > > port0_stats['TX-bytes']]
> > > - port1_stats = self.get_stats(self.dut_ports[1])
> > > - p1rx_pkts, p1rx_err, p1rx_bytes = [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="%s"' % mac)
> > > + self.tester.scapy_append('sendp([Ether(dst=nutmac,
> > > src="52:00:00:00:00:00")/IP(len=%s)/UDP(%s)/Raw(load="\x50"*%s)],
> > > iface="%s")' % (
> > > + load_size, checksum, padding, interface))
> > > +
> > > + out = self.tester.scapy_execute()
> > > + time.sleep((i + 1) * 0.5)
> > > +
> > > + port0_stats = self.get_stats(self.dut_ports[0])
> > > + p0tx_pkts, p0tx_bytes = [port0_stats['TX-packets'],
> > > port0_stats['TX-bytes']]
> > > + port1_stats = self.get_stats(self.dut_ports[1])
> > > + p1rx_pkts, p1rx_err, p1rx_bytes = [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 -= gp0tx_pkts
> > > p0tx_bytes -= gp0tx_bytes
> > > --
> > > 1.9.3
prev parent reply other threads:[~2016-12-14 15:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 7:12 xu,huilong
2016-12-14 8:12 ` Liu, Yong
2016-12-14 9:11 ` Xu, HuilongX
2016-12-14 15:18 ` Liu, Yong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86228AFD5BCD8E4EBFD2B90117B5E81E62D16944@SHSMSX103.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=huilongx.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).