test suite reviews and discussions
 help / color / mirror / Atom feed
From: wang fei <feix.y.wang@intel.com>
To: dts@dpdk.org
Cc: wang fei <feix.y.wang@intel.com>
Subject: [dts] [PATCH V1] add a fuction to support ixia sending fixed number of packets
Date: Fri,  8 Sep 2017 19:58:19 +0800	[thread overview]
Message-ID: <1504871899-39547-1-git-send-email-feix.y.wang@intel.com> (raw)

Signed-off-by: wang fei <feix.y.wang@intel.com>
---
 framework/tester.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/framework/tester.py b/framework/tester.py
index e7fb6bc..84f254f 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -490,6 +490,16 @@ class Tester(Crb):
         self.logger.info('SCAPY Result:\n' + out + '\n\n\n')
 
         return out.rpartition('[')[0]
+    
+    def traffic_generator_send_packets(self,portList,ratePercent,packetNum,delay=5,runTime=60):
+        """
+        send fixed number of packets on specified ports
+        """
+        if self.check_port_list(portList, 'ixia'):
+            return self.ixia_packet_gen.send_packets(portList, ratePercent, packetNum,delay,runTime)
+        if not self.check_port_list(portList):
+            self.logger.warning("exception by mixed port types")
+            return None
 
     def traffic_generator_throughput(self, portList, rate_percent=100, delay=5):
         """
-- 
2.7.4

                 reply	other threads:[~2017-09-08  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1504871899-39547-1-git-send-email-feix.y.wang@intel.com \
    --to=feix.y.wang@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).