From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 6FA482BE0 for ; Fri, 26 Feb 2016 04:06:34 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 25 Feb 2016 19:06:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,498,1449561600"; d="scan'208";a="895036710" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 25 Feb 2016 19:06:15 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Feb 2016 19:06:06 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 25 Feb 2016 19:06:06 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.24]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.42]) with mapi id 14.03.0248.002; Fri, 26 Feb 2016 11:06:01 +0800 From: "Liu, Yong" To: "Ding, HengX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] framework: enable 100G ixia support Thread-Index: AQHRbd5/IOCyeQCEJEmPW0BZ/FEOJZ89qXZQ Date: Fri, 26 Feb 2016 03:06:00 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E144FC369@SHSMSX103.ccr.corp.intel.com> References: <1456193020-22606-1-git-send-email-hengx.ding@intel.com> In-Reply-To: <1456193020-22606-1-git-send-email-hengx.ding@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "Ding, HengX" Subject: Re: [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: Fri, 26 Feb 2016 03:06:35 -0000 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 >=20 > 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. >=20 > Signed-off-by: Ding Heng >=20 > 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=3D6.62 > ixia_ip=3Dxxx.xxx.xxx.xxx > @@ -11,3 +12,4 @@ ixia_ports=3D > card=3D1,port=3D2; > card=3D1,port=3D3; > card=3D1,port=3D4; > +ixia_enable_rsfec=3Ddisable > 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"] =3D int(m.group(2)) > ixia_ports.append(ixia_port) > ixia_group['Ports'] =3D ixia_ports > + elif key =3D=3D 'ixia_enable_rsfec': > + ixia_group['enable_rsfec'] =3D value >=20 > 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): >=20 > self.ixiaVersion =3D ixiaPorts[ixiaRef]["Version"] > self.ports =3D ixiaPorts[ixiaRef]["Ports"] > + self.enable_rsfec =3D ixiaPorts[ixiaRef]['enable_rsfec'] >=20 > 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 =3D None > + for port in self.ports: > + port['speed'] =3D 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']), '%') >=20 > 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()) =3D=3D= 100000 > and self.enable_rsfec =3D=3D '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'])) >=20 > pl.append('[list %d %d %d]' % (self.chasId, item['card'], > item['port'])) >=20 > -- > 1.9.3