From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B51F058DF for ; Mon, 22 Feb 2016 04:35:38 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 21 Feb 2016 19:35:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,483,1449561600"; d="scan'208";a="918134417" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 21 Feb 2016 19:35:35 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u1M3ZXx3020262; Mon, 22 Feb 2016 11:35:33 +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 u1M3ZVWf010430; Mon, 22 Feb 2016 11:35:33 +0800 Received: (from hengdinx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u1M3ZV6D010426; Mon, 22 Feb 2016 11:35:31 +0800 From: Ding Heng To: dts@dpdk.org Date: Mon, 22 Feb 2016 11:35:29 +0800 Message-Id: <1456112129-10395-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: Mon, 22 Feb 2016 03:35:40 -0000 Signed-off-by: Ding Heng 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