test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use
@ 2017-09-20 12:31 wang fei
  2017-09-22  5:51 ` Liu, Yong
  0 siblings, 1 reply; 3+ messages in thread
From: wang fei @ 2017-09-20 12:31 UTC (permalink / raw)
  To: dts; +Cc: wang fei

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

diff --git a/framework/tester.py b/framework/tester.py
index e7fb6bc..78202d0 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -491,6 +491,17 @@ class Tester(Crb):
 
         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 during runTime time.
+        Be note that this function is only used for nic_single_core_perf test case, not for common use
+        """
+        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):
         """
         Run throughput performance test on specified ports.
-- 
2.7.4

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

* Re: [dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use
  2017-09-20 12:31 [dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use wang fei
@ 2017-09-22  5:51 ` Liu, Yong
  2017-09-22  5:59   ` Wang, FeiX Y
  0 siblings, 1 reply; 3+ messages in thread
From: Liu, Yong @ 2017-09-22  5:51 UTC (permalink / raw)
  To: Wang, FeiX Y, dts; +Cc: Wang, FeiX Y

Fei,
Please make sure your code align to pep style.
I still has question for parameter "runTime", this value is depend on rate, total number and link rate.
I think the only value for this parameter is to make sure all packets transmitted.
Why not just check how many packets emitted and return when equal to parameter "packetNum".

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of wang fei
> Sent: Wednesday, September 20, 2017 8:31 PM
> To: dts@dpdk.org
> Cc: Wang, FeiX Y <feix.y.wang@intel.com>
> Subject: [dts] [Patch V1] framework/tester.py : add this function to
> support ixia to send fixed number of packets during certain period it is
> only for test_suite nic_single_core_perf, not for common use
> 
> Signed-off-by: wang fei <feix.y.wang@intel.com>
> ---
>  framework/tester.py | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/framework/tester.py b/framework/tester.py
> index e7fb6bc..78202d0 100644
> --- a/framework/tester.py
> +++ b/framework/tester.py
> @@ -491,6 +491,17 @@ class Tester(Crb):
> 
>          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 during runTime
> time.
> +        Be note that this function is only used for nic_single_core_perf
> test case, not for common use
> +        """
> +        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):
>          """
>          Run throughput performance test on specified ports.
> --
> 2.7.4

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

* Re: [dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use
  2017-09-22  5:51 ` Liu, Yong
@ 2017-09-22  5:59   ` Wang, FeiX Y
  0 siblings, 0 replies; 3+ messages in thread
From: Wang, FeiX Y @ 2017-09-22  5:59 UTC (permalink / raw)
  To: Liu, Yong, dts

Hi, Yong

Yes ,that's right,  the value " runtime" is only to make sure all the packets configured to be transmitted out within the period.
Ok, then I will add a check to see if the actual transmitted packets is as configured.

Thanks

fei  

-----Original Message-----
From: Liu, Yong 
Sent: Friday, September 22, 2017 1:51 PM
To: Wang, FeiX Y <feix.y.wang@intel.com>; dts@dpdk.org
Cc: Wang, FeiX Y <feix.y.wang@intel.com>
Subject: RE: [dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use

Fei,
Please make sure your code align to pep style.
I still has question for parameter "runTime", this value is depend on rate, total number and link rate.
I think the only value for this parameter is to make sure all packets transmitted.
Why not just check how many packets emitted and return when equal to parameter "packetNum".

Thanks,
Marvin

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of wang fei
> Sent: Wednesday, September 20, 2017 8:31 PM
> To: dts@dpdk.org
> Cc: Wang, FeiX Y <feix.y.wang@intel.com>
> Subject: [dts] [Patch V1] framework/tester.py : add this function to 
> support ixia to send fixed number of packets during certain period it 
> is only for test_suite nic_single_core_perf, not for common use
> 
> Signed-off-by: wang fei <feix.y.wang@intel.com>
> ---
>  framework/tester.py | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/framework/tester.py b/framework/tester.py index 
> e7fb6bc..78202d0 100644
> --- a/framework/tester.py
> +++ b/framework/tester.py
> @@ -491,6 +491,17 @@ class Tester(Crb):
> 
>          return out.rpartition('[')[0]
> 
> +    def
> traffic_generator_send_packets(self,portList,ratePercent,packetNum,del
> ay=5
> ,runTime=60):
> +        """
> +        send fixed number of packets on specified ports during 
> + runTime
> time.
> +        Be note that this function is only used for 
> + nic_single_core_perf
> test case, not for common use
> +        """
> +        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):
>          """
>          Run throughput performance test on specified ports.
> --
> 2.7.4

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

end of thread, other threads:[~2017-09-22  5:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20 12:31 [dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use wang fei
2017-09-22  5:51 ` Liu, Yong
2017-09-22  5:59   ` Wang, FeiX Y

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