test suite reviews and discussions
 help / color / mirror / Atom feed
From: Xiaonan Zhang <xiaonanx.zhang@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH] framework support get oversize for performance
Date: Mon, 26 Jan 2015 17:19:12 +0800	[thread overview]
Message-ID: <1422263952-32225-1-git-send-email-xiaonanx.zhang@intel.com> (raw)

From: "xiaonanx.zhang" <xiaonanx.zhang@intel.com>

modify get_transmission_results function in framework etgen.py
use ixia api stat cget -oversize to get Oversize and CRC Errors

add return get oversize condition

Signed-off-by: xiaonanx.zhang <xiaonanx.zhang@intel.com>
---
 framework/etgen.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/framework/etgen.py b/framework/etgen.py
index 2f2e975..f2da4ab 100644
--- a/framework/etgen.py
+++ b/framework/etgen.py
@@ -581,13 +581,18 @@ class IxiaPacketGenerator(SSHConnection):
             out = self.send_expect("stat cget -bitsReceived", '% ', 10)
             self.logger.debug("port %d bits rate:" % (port) + out)
             bpsRate += int(out.strip())
+            out = self.send_expect("stat cget -oversize", '%', 10)
+            oversize += int(out.strip())
 
         self.logger.info("Rate: %f Mpps" % (rate * 1.0 / 1000000))
         self.logger.info("Mbps rate: %f Mbps" % (bpsRate * 1.0 / 1000000))
 
         self.send_expect("ixStopTransmit portList", "%", 30)
 
-        return (bpsRate, rate)
+        if rate == 0 and oversize > 0:
+            return (bpsRate, oversize)
+        else:
+            return (bpsRate, rate)
 
     def config_ixia_dcb_init(self, rxPort, txPort):
         """
-- 
1.9.3

             reply	other threads:[~2015-01-26  9:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26  9:19 Xiaonan Zhang [this message]
2015-01-27  1:34 ` Liu, Yong
2015-01-27  2:45   ` Zhang, XiaonanX
2015-01-27  3:06     ` Liu, Yong

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=1422263952-32225-1-git-send-email-xiaonanx.zhang@intel.com \
    --to=xiaonanx.zhang@intel.com \
    --cc=dts@dpdk.org \
    /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).