From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, lijuan.tu@intel.com, yingyax.han@intel.com,
zhaoyan.chen@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V1]framework/pktgen_base: fix rfc2544 return value missing zero
Date: Tue, 20 Aug 2019 15:47:58 +0800 [thread overview]
Message-ID: <1566287278-25897-2-git-send-email-yufengx.mo@intel.com> (raw)
In-Reply-To: <1566287278-25897-1-git-send-email-yufengx.mo@intel.com>
loss rate
fix rfc2544 return value missing zero loss rate.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
framework/pktgen_base.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/framework/pktgen_base.py b/framework/pktgen_base.py
index e9d3fcb..4bb2afb 100644
--- a/framework/pktgen_base.py
+++ b/framework/pktgen_base.py
@@ -269,7 +269,8 @@ class PacketGenerator(object):
# return data is the same with dts/etgen format
# In fact, multiple link peer have multiple loss rate value,
# here only pick one
- return result.values()[0]
+ tx_num, rx_num = result.values()[0][1:]
+ return rate_percent, tx_num, rx_num
_options = deepcopy(options)
while not status and rate_percent > 0:
rate_percent = rate_percent - rate_step
@@ -288,7 +289,10 @@ class PacketGenerator(object):
# use last result as return data to keep the same with dts/etgen format
# In fact, multiple link peer have multiple loss rate value,
# here only pick one
- return loss_rate_table[-1][1].values()[0]
+ last_result = loss_rate_table[-1]
+ rate_percent = last_result[0]
+ tx_num, rx_num = last_result[1].values()[0][1:]
+ return rate_percent, tx_num, rx_num
def measure_rfc2544_with_pps(self, stream_ids=[], options={}):
"""
--
1.9.3
next prev parent reply other threads:[~2019-08-20 7:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 7:47 [dts] [PATCH V1]dts/pktgen: fix rfc2544 return value missing zero loss rate yufengmx
2019-08-20 7:47 ` yufengmx [this message]
2019-08-20 8:50 ` [dts] [PATCH V1]framework/pktgen_base: fix rfc2544 return value missing zero Han, YingyaX
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=1566287278-25897-2-git-send-email-yufengx.mo@intel.com \
--to=yufengx.mo@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@intel.com \
--cc=yingyax.han@intel.com \
--cc=zhaoyan.chen@intel.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).