test suite reviews and discussions
 help / color / mirror / Atom feed
From: "xiao,qimai" <qimaix.xiao@intel.com>
To: dts@dpdk.org
Cc: "xiao,qimai" <qimaix.xiao@intel.com>
Subject: [dts] [PATCH V1] update case pmdrssreta to reduce runtime
Date: Sun, 28 Apr 2019 17:46:57 +0800	[thread overview]
Message-ID: <1556444817-16282-1-git-send-email-qimaix.xiao@intel.com> (raw)

optimize function of send package with scapy 

Signed-off-by: xiao,qimai <qimaix.xiao@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


             reply	other threads:[~2019-04-28  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28  9:46 xiao,qimai [this message]
2019-04-29  5:29 ` Peng, Yuan
2019-05-13  2:21 ` Tu, Lijuan

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=1556444817-16282-1-git-send-email-qimaix.xiao@intel.com \
    --to=qimaix.xiao@intel.com \
    --cc=dts@dpdk.org \
    /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).