test suite reviews and discussions
 help / color / mirror / Atom feed
From: Qian Xu <qian.q.xu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH]fix: set 100g ixia configuration disable
Date: Mon,  7 Mar 2016 16:56:52 +0800	[thread overview]
Message-ID: <1457341012-18743-1-git-send-email-qian.q.xu@intel.com> (raw)

This patch fix an issue that if the ixia.cfg doesn't set the enable_rsfec. 
1. Change the enable_rsfec to force100g for better understanding. 
2. Set force100g disable if user didn't set the value in config file. 

Signed-off-by: Qian Xu <qian.q.xu@intel.com>

diff --git a/conf/ixia.cfg b/conf/ixia.cfg
index 8874801..9deba60 100644
--- a/conf/ixia.cfg
+++ b/conf/ixia.cfg
@@ -3,7 +3,7 @@
 # Version  : IXIA TCL server version
 # IP       : IXIA server IP address
 # Ports    : [IXIA port list]
-# ixia_enable_rsfec: We need to set this to enable if we need IXIA port work in 100G mode.
+# ixia_force100g: We need to set this to enable if we need IXIA port work in 100G mode.
 [IXIA Group]
 ixia_version=6.62
 ixia_ip=xxx.xxx.xxx.xxx
@@ -12,4 +12,4 @@ ixia_ports=
     card=1,port=2;
     card=1,port=3;
     card=1,port=4;
-ixia_enable_rsfec=disable
+ixia_force100g=disable
diff --git a/framework/etgen.py b/framework/etgen.py
index e272fd6..081155c 100644
--- a/framework/etgen.py
+++ b/framework/etgen.py
@@ -155,7 +155,11 @@ class IxiaPacketGenerator(SSHConnection):
 
         self.ixiaVersion = ixiaPorts[ixiaRef]["Version"]
         self.ports = ixiaPorts[ixiaRef]["Ports"]
-        self.enable_rsfec = ixiaPorts[ixiaRef]['enable_rsfec']
+        
+        if ixiaPorts[ixiaRef].has_key('force100g'): 
+            self.enable100g = ixiaPorts[ixiaRef]['force100g']
+        else:
+            self.enable100g = 'disable' 
 
         self.logger.info(self.ixiaVersion)
         self.logger.info(self.ports)
@@ -414,7 +418,7 @@ class IxiaPacketGenerator(SSHConnection):
                 item['card'], item['port']))
             #if the line rate is 100G and we need this port work in 100G mode,
             #we need to add some configure to make it so.
-            if int(self.get_line_rate(self.chasId, item).strip()) == 100000 and self.enable_rsfec == 'enable':
+            if int(self.get_line_rate(self.chasId, item).strip()) == 100000 and self.enable100g == 'enable':
                 self.add_tcl_cmd("port config -ieeeL1Defaults 0")
                 self.add_tcl_cmd("port config -autonegotiate false")
                 self.add_tcl_cmd("port config -enableRsFec true")
-- 
2.1.0

             reply	other threads:[~2016-03-07  8:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07  8:56 Qian Xu [this message]
2016-03-08  3:35 ` 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=1457341012-18743-1-git-send-email-qian.q.xu@intel.com \
    --to=qian.q.xu@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).