test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] packetgen: Corrected return values and parameters of loss function
@ 2019-01-17  7:25 Phanendra Vukkisala
  2019-01-30  3:18 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: Phanendra Vukkisala @ 2019-01-17  7:25 UTC (permalink / raw)
  To: dts; +Cc: Vijaya Bhaskar Annayyolla, Faisal Masood, Phanendra Vukkisala

From: pvukkisala <pvukkisala@marvell.com>

Updated return values of loss function of packetgen to match with IXIA loss function
Removed passing delay argument to packetgen loss as it is not required.

Signed-off-by: phanendra,vukkisala <pvukkisala@marvell.com>
---
 framework/etgen.py  |    2 +-
 framework/tester.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/etgen.py b/framework/etgen.py
index 2856a28..6c85384 100644
--- a/framework/etgen.py
+++ b/framework/etgen.py
@@ -158,7 +158,7 @@ class SoftwarePacketGenerator():
     def loss(self, portList, ratePercent):
         (bps_rx, bps_tx, _) = self.packet_generator(portList, ratePercent)
         assert bps_tx != 0
-        return (float(bps_tx) - float(bps_rx)) / float(bps_tx)
+        return (float(bps_tx) - float(bps_rx)) / float(bps_tx), float(bps_tx), float(bps_rx)
 
 
 class IxiaPacketGenerator(SSHConnection):
diff --git a/framework/tester.py b/framework/tester.py
index 4e651a1..e1416d8 100755
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -535,7 +535,7 @@ class Tester(Crb):
         elif not self.check_port_list(portList):
             self.logger.warning("exception by mixed port types")
             return None
-        return self.packet_gen.loss(portList, ratePercent, delay)
+        return self.packet_gen.loss(portList, ratePercent)
 
     def traffic_generator_latency(self, portList, ratePercent=100, delay=5):
         """
-- 
1.7.9.5

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

* Re: [dts] [PATCH] packetgen: Corrected return values and parameters of loss function
  2019-01-17  7:25 [dts] [PATCH] packetgen: Corrected return values and parameters of loss function Phanendra Vukkisala
@ 2019-01-30  3:18 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-01-30  3:18 UTC (permalink / raw)
  To: Phanendra Vukkisala, dts; +Cc: Vijaya Bhaskar Annayyolla, Faisal Masood

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Phanendra Vukkisala
> Sent: Thursday, January 17, 2019 3:26 PM
> To: dts@dpdk.org
> Cc: Vijaya Bhaskar Annayyolla <avijay@marvell.com>; Faisal Masood
> <fmasood@marvell.com>; Phanendra Vukkisala <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] packetgen: Corrected return values and parameters of
> loss function
> 
> From: pvukkisala <pvukkisala@marvell.com>
> 
> Updated return values of loss function of packetgen to match with IXIA loss
> function Removed passing delay argument to packetgen loss as it is not required.
> 
> Signed-off-by: phanendra,vukkisala <pvukkisala@marvell.com>
> ---
>  framework/etgen.py  |    2 +-
>  framework/tester.py |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/framework/etgen.py b/framework/etgen.py index 2856a28..6c85384
> 100644
> --- a/framework/etgen.py
> +++ b/framework/etgen.py
> @@ -158,7 +158,7 @@ class SoftwarePacketGenerator():
>      def loss(self, portList, ratePercent):
>          (bps_rx, bps_tx, _) = self.packet_generator(portList, ratePercent)
>          assert bps_tx != 0
> -        return (float(bps_tx) - float(bps_rx)) / float(bps_tx)
> +        return (float(bps_tx) - float(bps_rx)) / float(bps_tx),
> + float(bps_tx), float(bps_rx)
> 
> 
>  class IxiaPacketGenerator(SSHConnection):
> diff --git a/framework/tester.py b/framework/tester.py index
> 4e651a1..e1416d8 100755
> --- a/framework/tester.py
> +++ b/framework/tester.py
> @@ -535,7 +535,7 @@ class Tester(Crb):
>          elif not self.check_port_list(portList):
>              self.logger.warning("exception by mixed port types")
>              return None
> -        return self.packet_gen.loss(portList, ratePercent, delay)
> +        return self.packet_gen.loss(portList, ratePercent)
> 
>      def traffic_generator_latency(self, portList, ratePercent=100, delay=5):
>          """
> --
> 1.7.9.5

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

end of thread, other threads:[~2019-01-30  3:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17  7:25 [dts] [PATCH] packetgen: Corrected return values and parameters of loss function Phanendra Vukkisala
2019-01-30  3:18 ` Tu, Lijuan

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