From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DDC5A2E8B for ; Fri, 8 Sep 2017 11:25:35 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Sep 2017 02:25:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,360,1500966000"; d="scan'208";a="146935712" Received: from dpdk-test47.sh.intel.com ([10.67.118.152]) by orsmga005.jf.intel.com with ESMTP; 08 Sep 2017 02:25:33 -0700 From: wang fei To: dts@dpdk.org Cc: wang fei Date: Fri, 8 Sep 2017 19:58:19 +0800 Message-Id: <1504871899-39547-1-git-send-email-feix.y.wang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] add a fuction to support ixia sending fixed number of packets X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 09:25:36 -0000 Signed-off-by: wang fei --- 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