test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] try to fix sometime dut port rx packets error
@ 2016-12-07  7:12 xu,huilong
  2016-12-14  8:12 ` Liu, Yong
  0 siblings, 1 reply; 4+ messages in thread
From: xu,huilong @ 2016-12-07  7:12 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1] try to fix sometime dut port rx packets error
  2016-12-07  7:12 [dts] [PATCH V1] try to fix sometime dut port rx packets error xu,huilong
@ 2016-12-14  8:12 ` Liu, Yong
  2016-12-14  9:11   ` Xu, HuilongX
  0 siblings, 1 reply; 4+ messages in thread
From: Liu, Yong @ 2016-12-14  8:12 UTC (permalink / raw)
  To: Xu, HuilongX, dts; +Cc: Xu, HuilongX

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1] try to fix sometime dut port rx packets error
  2016-12-14  8:12 ` Liu, Yong
@ 2016-12-14  9:11   ` Xu, HuilongX
  2016-12-14 15:18     ` Liu, Yong
  0 siblings, 1 reply; 4+ messages in thread
From: Xu, HuilongX @ 2016-12-14  9:11 UTC (permalink / raw)
  To: Liu, Yong, dts

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH V1] try to fix sometime dut port rx packets error
  2016-12-14  9:11   ` Xu, HuilongX
@ 2016-12-14 15:18     ` Liu, Yong
  0 siblings, 0 replies; 4+ messages in thread
From: Liu, Yong @ 2016-12-14 15:18 UTC (permalink / raw)
  To: Xu, HuilongX, dts

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-14 15:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-07  7:12 [dts] [PATCH V1] try to fix sometime dut port rx packets error xu,huilong
2016-12-14  8:12 ` Liu, Yong
2016-12-14  9:11   ` Xu, HuilongX
2016-12-14 15:18     ` Liu, Yong

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).