[dts] [PATCH V1] try to fix sometime dut port rx packets error
Xu, HuilongX
huilongx.xu at intel.com
Wed Dec 14 10:11:20 CET 2016
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 at 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 at dpdk.org] On Behalf Of xu,huilong
> > Sent: Wednesday, December 07, 2016 3:12 PM
> > To: dts at 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 at 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
More information about the dts
mailing list