[dts] [PATCH V1] update case pmdrssreta to reduce runtime

Tu, Lijuan lijuan.tu at intel.com
Mon May 13 04:21:02 CEST 2019


Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of xiao,qimai
> Sent: Sunday, April 28, 2019 5:47 PM
> To: dts at dpdk.org
> Cc: Xiao, QimaiX <qimaix.xiao at intel.com>
> Subject: [dts] [PATCH V1] update case pmdrssreta to reduce runtime
> 
> optimize function of send package with scapy
> 
> Signed-off-by: xiao,qimai <qimaix.xiao at intel.com>
> ---
>  tests/TestSuite_pmdrssreta.py | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
> index 03c54a2..9d29af8 100644
> --- a/tests/TestSuite_pmdrssreta.py
> +++ b/tests/TestSuite_pmdrssreta.py
> @@ -66,43 +66,43 @@ class TestPmdrssreta(TestCase):
>                  packet = r'sendp([Ether(dst="%s",
> src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")],
> iface="%s")' % (
>                      mac, i + 1, i + 2, itf)
>                  self.tester.scapy_append(packet)
> -                self.tester.scapy_execute()
> -                time.sleep(.5)
> +            self.tester.scapy_execute()
> +            time.sleep(.5)
>          elif tran_type == "IPV4&TCP":
>              for i in range(16):
>                  packet = r'sendp([Ether(dst="%s",
> src="02:00:00:00:00:00")/IP(src="192.168.0.%d",
> dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
>                      mac, i + 1, i + 2, itf)
>                  self.tester.scapy_append(packet)
> -                self.tester.scapy_execute()
> -                time.sleep(.5)
> +            self.tester.scapy_execute()
> +            time.sleep(.5)
>          elif tran_type == "IPV4&UDP":
>              for i in range(16):
>                  packet = r'sendp([Ether(dst="%s",
> src="02:00:00:00:00:00")/IP(src="192.168.0.%d",
> dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
>                      mac, i + 1, i + 2, itf)
>                  self.tester.scapy_append(packet)
> -                self.tester.scapy_execute()
> -                time.sleep(.5)
> +            self.tester.scapy_execute()
> +            time.sleep(.5)
>          elif tran_type == "IPV6":
>              for i in range(16):
>                  packet = r'sendp([Ether(dst="%s",
> src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d",
> dst="3ffe:2501:200:3::%d")], iface="%s")' % (
>                      mac, i + 1, i + 2, itf)
>                  self.tester.scapy_append(packet)
> -                self.tester.scapy_execute()
> -                time.sleep(.5)
> +            self.tester.scapy_execute()
> +            time.sleep(.5)
>          elif tran_type == "IPV6&TCP":
>              for i in range(16):
>                  packet = r'sendp([Ether(dst="%s",
> src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d",
> dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s")' % (
>                      mac, i + 1, i + 2, itf)
>                  self.tester.scapy_append(packet)
> -                self.tester.scapy_execute()
> -                time.sleep(.5)
> +            self.tester.scapy_execute()
> +            time.sleep(.5)
>          elif tran_type == "IPV6&UDP":
>              for i in range(16):
>                  packet = r'sendp([Ether(dst="%s",
> src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d",
> dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s")' % (
>                      mac, i + 1, i + 2, itf)
>                  self.tester.scapy_append(packet)
> -                self.tester.scapy_execute()
> -                time.sleep(.5)
> +            self.tester.scapy_execute()
> +            time.sleep(.5)
>          else:
>              print "\ntran_type error!\n"
>          out = self.dut.get_session_output(timeout=1)
> --
> 2.17.0



More information about the dts mailing list