* [dts] [PATCH] framework: enable 100G ixia support
@ 2016-02-22 3:35 Ding Heng
2016-02-23 0:54 ` Liu, Yong
0 siblings, 1 reply; 4+ messages in thread
From: Ding Heng @ 2016-02-22 3:35 UTC (permalink / raw)
To: dts; +Cc: Ding Heng
Signed-off-by: Ding Heng <hengx.ding@intel.com>
diff --git a/framework/config.py b/framework/config.py
index 10624f0..37606de 100644
--- a/framework/config.py
+++ b/framework/config.py
@@ -282,6 +282,8 @@ class IxiaConf(UserConf):
ixia_port["port"] = int(m.group(2))
ixia_ports.append(ixia_port)
ixia_group['Ports'] = ixia_ports
+ elif key == 'ixia_enable_rsfec':
+ ixia_group['enable_rsfec'] = value
if 'Version' not in ixia_group:
print 'ixia configuration file request ixia_version option!!!'
diff --git a/framework/etgen.py b/framework/etgen.py
index 364499c..737a57e 100644
--- a/framework/etgen.py
+++ b/framework/etgen.py
@@ -155,6 +155,7 @@ class IxiaPacketGenerator(SSHConnection):
self.ixiaVersion = ixiaPorts[ixiaRef]["Version"]
self.ports = ixiaPorts[ixiaRef]["Ports"]
+ self.enable_rsfec = ixiaPorts[ixiaRef]['enable_rsfec']
self.logger.info(self.ixiaVersion)
self.logger.info(self.ports)
@@ -171,6 +172,11 @@ class IxiaPacketGenerator(SSHConnection):
if not self.tcl_server_login():
self.close()
self.session = None
+ for port in self.ports:
+ port['speed'] = self.get_line_rate(self.chasId, port)
+
+ def get_line_rate(self, chasid, port):
+ return self.send_expect("stat getLineSpeed %s %s %s" % (chasid, port['card'], port['port']), '%')
def get_ip_address(self):
return self.tester.get_ip_address()
@@ -406,6 +412,12 @@ class IxiaPacketGenerator(SSHConnection):
for item in pList:
self.add_tcl_cmd("port setFactoryDefaults chasId %d %d" % (
item['card'], item['port']))
+ if int(self.get_line_rate(self.chasId, item).strip()) == 100000 and self.enable_rsfec == 'enable':
+ self.add_tcl_cmd("port config -ieeeL1Defaults 0")
+ #self.add_tcl_cmd("ixWritePortsToHardware portList")
+ self.add_tcl_cmd("port config -autonegotiate false")
+ self.add_tcl_cmd("port config -enableRsFec true")
+ self.add_tcl_cmd("port set %d %d %d" % (self.chasId, item['card'], item['port']))
pl.append('[list %d %d %d]' % (self.chasId, item['card'], item['port']))
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH] framework: enable 100G ixia support
2016-02-22 3:35 [dts] [PATCH] framework: enable 100G ixia support Ding Heng
@ 2016-02-23 0:54 ` Liu, Yong
0 siblings, 0 replies; 4+ messages in thread
From: Liu, Yong @ 2016-02-23 0:54 UTC (permalink / raw)
To: Ding, HengX, dts; +Cc: Ding, HengX
Heng, could you add more comments for this patch. We need to know that how to support ixia 100G port.
In this patch, there will be change in ixia.cfg. Please also update the sample of ixia cfg.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Ding Heng
> Sent: Monday, February 22, 2016 11:35 AM
> To: dts@dpdk.org
> Cc: Ding, HengX
> Subject: [dts] [PATCH] framework: enable 100G ixia support
>
> Signed-off-by: Ding Heng <hengx.ding@intel.com>
>
> diff --git a/framework/config.py b/framework/config.py
> index 10624f0..37606de 100644
> --- a/framework/config.py
> +++ b/framework/config.py
> @@ -282,6 +282,8 @@ class IxiaConf(UserConf):
> ixia_port["port"] = int(m.group(2))
> ixia_ports.append(ixia_port)
> ixia_group['Ports'] = ixia_ports
> + elif key == 'ixia_enable_rsfec':
> + ixia_group['enable_rsfec'] = value
>
> if 'Version' not in ixia_group:
> print 'ixia configuration file request ixia_version
> option!!!'
> diff --git a/framework/etgen.py b/framework/etgen.py
> index 364499c..737a57e 100644
> --- a/framework/etgen.py
> +++ b/framework/etgen.py
> @@ -155,6 +155,7 @@ class IxiaPacketGenerator(SSHConnection):
>
> self.ixiaVersion = ixiaPorts[ixiaRef]["Version"]
> self.ports = ixiaPorts[ixiaRef]["Ports"]
> + self.enable_rsfec = ixiaPorts[ixiaRef]['enable_rsfec']
>
> self.logger.info(self.ixiaVersion)
> self.logger.info(self.ports)
> @@ -171,6 +172,11 @@ class IxiaPacketGenerator(SSHConnection):
> if not self.tcl_server_login():
> self.close()
> self.session = None
> + for port in self.ports:
> + port['speed'] = self.get_line_rate(self.chasId, port)
> +
> + def get_line_rate(self, chasid, port):
> + return self.send_expect("stat getLineSpeed %s %s %s" % (chasid,
> port['card'], port['port']), '%')
>
> def get_ip_address(self):
> return self.tester.get_ip_address()
> @@ -406,6 +412,12 @@ class IxiaPacketGenerator(SSHConnection):
> for item in pList:
> self.add_tcl_cmd("port setFactoryDefaults chasId %d %d" % (
> item['card'], item['port']))
> + if int(self.get_line_rate(self.chasId, item).strip()) ==
> 100000 and self.enable_rsfec == 'enable':
Add some descriptions for this judgment.
> + self.add_tcl_cmd("port config -ieeeL1Defaults 0")
> + #self.add_tcl_cmd("ixWritePortsToHardware portList")
> + self.add_tcl_cmd("port config -autonegotiate false")
> + self.add_tcl_cmd("port config -enableRsFec true")
> + self.add_tcl_cmd("port set %d %d %d" % (self.chasId,
> item['card'], item['port']))
>
> pl.append('[list %d %d %d]' % (self.chasId, item['card'],
> item['port']))
>
> --
> 1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH] framework: enable 100G ixia support
2016-02-23 2:03 Ding Heng
@ 2016-02-26 3:06 ` Liu, Yong
0 siblings, 0 replies; 4+ messages in thread
From: Liu, Yong @ 2016-02-26 3:06 UTC (permalink / raw)
To: Ding, HengX, dts; +Cc: Ding, HengX
Applied. Thanks.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Ding Heng
> Sent: Tuesday, February 23, 2016 10:04 AM
> To: dts@dpdk.org
> Cc: Ding, HengX
> Subject: [dts] [PATCH] framework: enable 100G ixia support
>
> If we need ixia work in 100G mode we need to set enable Rs-Fec.
> This configure will take effect only if ieee default and auto negotiation
> set to false.
>
> Signed-off-by: Ding Heng <hengx.ding@intel.com>
>
> diff --git a/conf/ixia.cfg b/conf/ixia.cfg
> index 92fd496..8874801 100644
> --- a/conf/ixia.cfg
> +++ b/conf/ixia.cfg
> @@ -3,6 +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 Group]
> ixia_version=6.62
> ixia_ip=xxx.xxx.xxx.xxx
> @@ -11,3 +12,4 @@ ixia_ports=
> card=1,port=2;
> card=1,port=3;
> card=1,port=4;
> +ixia_enable_rsfec=disable
> diff --git a/framework/config.py b/framework/config.py
> index 10624f0..37606de 100644
> --- a/framework/config.py
> +++ b/framework/config.py
> @@ -282,6 +282,8 @@ class IxiaConf(UserConf):
> ixia_port["port"] = int(m.group(2))
> ixia_ports.append(ixia_port)
> ixia_group['Ports'] = ixia_ports
> + elif key == 'ixia_enable_rsfec':
> + ixia_group['enable_rsfec'] = value
>
> if 'Version' not in ixia_group:
> print 'ixia configuration file request ixia_version
> option!!!'
> diff --git a/framework/etgen.py b/framework/etgen.py
> index 364499c..e272fd6 100644
> --- a/framework/etgen.py
> +++ b/framework/etgen.py
> @@ -155,6 +155,7 @@ class IxiaPacketGenerator(SSHConnection):
>
> self.ixiaVersion = ixiaPorts[ixiaRef]["Version"]
> self.ports = ixiaPorts[ixiaRef]["Ports"]
> + self.enable_rsfec = ixiaPorts[ixiaRef]['enable_rsfec']
>
> self.logger.info(self.ixiaVersion)
> self.logger.info(self.ports)
> @@ -171,6 +172,11 @@ class IxiaPacketGenerator(SSHConnection):
> if not self.tcl_server_login():
> self.close()
> self.session = None
> + for port in self.ports:
> + port['speed'] = self.get_line_rate(self.chasId, port)
> +
> + def get_line_rate(self, chasid, port):
> + return self.send_expect("stat getLineSpeed %s %s %s" % (chasid,
> port['card'], port['port']), '%')
>
> def get_ip_address(self):
> return self.tester.get_ip_address()
> @@ -406,6 +412,13 @@ class IxiaPacketGenerator(SSHConnection):
> for item in pList:
> self.add_tcl_cmd("port setFactoryDefaults chasId %d %d" % (
> 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':
> + self.add_tcl_cmd("port config -ieeeL1Defaults 0")
> + self.add_tcl_cmd("port config -autonegotiate false")
> + self.add_tcl_cmd("port config -enableRsFec true")
> + self.add_tcl_cmd("port set %d %d %d" % (self.chasId,
> item['card'], item['port']))
>
> pl.append('[list %d %d %d]' % (self.chasId, item['card'],
> item['port']))
>
> --
> 1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dts] [PATCH] framework: enable 100G ixia support
@ 2016-02-23 2:03 Ding Heng
2016-02-26 3:06 ` Liu, Yong
0 siblings, 1 reply; 4+ messages in thread
From: Ding Heng @ 2016-02-23 2:03 UTC (permalink / raw)
To: dts; +Cc: Ding Heng
If we need ixia work in 100G mode we need to set enable Rs-Fec.
This configure will take effect only if ieee default and auto negotiation
set to false.
Signed-off-by: Ding Heng <hengx.ding@intel.com>
diff --git a/conf/ixia.cfg b/conf/ixia.cfg
index 92fd496..8874801 100644
--- a/conf/ixia.cfg
+++ b/conf/ixia.cfg
@@ -3,6 +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 Group]
ixia_version=6.62
ixia_ip=xxx.xxx.xxx.xxx
@@ -11,3 +12,4 @@ ixia_ports=
card=1,port=2;
card=1,port=3;
card=1,port=4;
+ixia_enable_rsfec=disable
diff --git a/framework/config.py b/framework/config.py
index 10624f0..37606de 100644
--- a/framework/config.py
+++ b/framework/config.py
@@ -282,6 +282,8 @@ class IxiaConf(UserConf):
ixia_port["port"] = int(m.group(2))
ixia_ports.append(ixia_port)
ixia_group['Ports'] = ixia_ports
+ elif key == 'ixia_enable_rsfec':
+ ixia_group['enable_rsfec'] = value
if 'Version' not in ixia_group:
print 'ixia configuration file request ixia_version option!!!'
diff --git a/framework/etgen.py b/framework/etgen.py
index 364499c..e272fd6 100644
--- a/framework/etgen.py
+++ b/framework/etgen.py
@@ -155,6 +155,7 @@ class IxiaPacketGenerator(SSHConnection):
self.ixiaVersion = ixiaPorts[ixiaRef]["Version"]
self.ports = ixiaPorts[ixiaRef]["Ports"]
+ self.enable_rsfec = ixiaPorts[ixiaRef]['enable_rsfec']
self.logger.info(self.ixiaVersion)
self.logger.info(self.ports)
@@ -171,6 +172,11 @@ class IxiaPacketGenerator(SSHConnection):
if not self.tcl_server_login():
self.close()
self.session = None
+ for port in self.ports:
+ port['speed'] = self.get_line_rate(self.chasId, port)
+
+ def get_line_rate(self, chasid, port):
+ return self.send_expect("stat getLineSpeed %s %s %s" % (chasid, port['card'], port['port']), '%')
def get_ip_address(self):
return self.tester.get_ip_address()
@@ -406,6 +412,13 @@ class IxiaPacketGenerator(SSHConnection):
for item in pList:
self.add_tcl_cmd("port setFactoryDefaults chasId %d %d" % (
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':
+ self.add_tcl_cmd("port config -ieeeL1Defaults 0")
+ self.add_tcl_cmd("port config -autonegotiate false")
+ self.add_tcl_cmd("port config -enableRsFec true")
+ self.add_tcl_cmd("port set %d %d %d" % (self.chasId, item['card'], item['port']))
pl.append('[list %d %d %d]' % (self.chasId, item['card'], item['port']))
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-26 3:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22 3:35 [dts] [PATCH] framework: enable 100G ixia support Ding Heng
2016-02-23 0:54 ` Liu, Yong
2016-02-23 2:03 Ding Heng
2016-02-26 3:06 ` 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).