[dts] [PATCH]fix: set 100g ixia configuration disable

Qian Xu qian.q.xu at intel.com
Mon Mar 7 09:56:52 CET 2016


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 at 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



More information about the dts mailing list