From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 027AF69FC for ; Tue, 23 Feb 2016 03:03:49 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP; 22 Feb 2016 18:03:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,487,1449561600"; d="scan'208";a="892217966" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 22 Feb 2016 18:03:47 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u1N23iGK023912; Tue, 23 Feb 2016 10:03:44 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u1N23fIg022642; Tue, 23 Feb 2016 10:03:43 +0800 Received: (from hengdinx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u1N23fgI022638; Tue, 23 Feb 2016 10:03:41 +0800 From: Ding Heng To: dts@dpdk.org Date: Tue, 23 Feb 2016 10:03:40 +0800 Message-Id: <1456193020-22606-1-git-send-email-hengx.ding@intel.com> X-Mailer: git-send-email 1.7.4.1 Cc: Ding Heng Subject: [dts] [PATCH] framework: enable 100G ixia support X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Feb 2016 02:03:50 -0000 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 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