test suite reviews and discussions
 help / color / mirror / Atom feed
From: Phanendra Vukkisala <pvukkisala@marvell.com>
To: "dts@dpdk.org" <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
Date: Thu, 17 Jan 2019 07:25:41 +0000	[thread overview]
Message-ID: <1547709909-9116-1-git-send-email-pvukkisala@marvell.com> (raw)

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

             reply	other threads:[~2019-01-17  7:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17  7:25 Phanendra Vukkisala [this message]
2019-01-30  3:18 ` 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=1547709909-9116-1-git-send-email-pvukkisala@marvell.com \
    --to=pvukkisala@marvell.com \
    --cc=avijay@marvell.com \
    --cc=dts@dpdk.org \
    --cc=fmasood@marvell.com \
    /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).