* [dts] [PATCH]fix: set 100g ixia configuration disable
@ 2016-03-07 8:56 Qian Xu
2016-03-08 3:35 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: Qian Xu @ 2016-03-07 8:56 UTC (permalink / raw)
To: dts
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH]fix: set 100g ixia configuration disable
2016-03-07 8:56 [dts] [PATCH]fix: set 100g ixia configuration disable Qian Xu
@ 2016-03-08 3:35 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2016-03-08 3:35 UTC (permalink / raw)
To: Xu, Qian Q, dts
Applied. Thanks.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Qian Xu
> Sent: Monday, March 07, 2016 4:57 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH]fix: set 100g ixia configuration disable
>
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-08 3:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-07 8:56 [dts] [PATCH]fix: set 100g ixia configuration disable Qian Xu
2016-03-08 3:35 ` Liu, Yong
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).