From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EBE222BA7 for ; Tue, 23 Feb 2016 01:54:50 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 22 Feb 2016 16:54:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,487,1449561600"; d="scan'208";a="908986700" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 22 Feb 2016 16:54:50 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Feb 2016 16:54:49 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Mon, 22 Feb 2016 16:54:49 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.4]) by shsmsx102.ccr.corp.intel.com ([169.254.2.172]) with mapi id 14.03.0248.002; Tue, 23 Feb 2016 08:54:48 +0800 From: "Liu, Yong" To: "Ding, HengX" , "dts@dpdk.org" Thread-Topic: [dts] [PATCH] framework: enable 100G ixia support Thread-Index: AQHRbXLJBJvVqBfW+kW9AFP5BCbtf584zb9A Date: Tue, 23 Feb 2016 00:54:47 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E144EF597@SHSMSX103.ccr.corp.intel.com> References: <1456112129-10395-1-git-send-email-hengx.ding@intel.com> In-Reply-To: <1456112129-10395-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-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGM2OTY2ODktNzllYi00ZGQ5LTkyYzUtZTM3ZjIzNGQ0NWNhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjQuMTAuMTkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9rR2ZvMEFrNUNIWENFYkpxSmd0TjduZEI5ZXJBa2tYTDFSWkZcLzdpVVVVPSJ9 x-ctpclassification: CTP_IC 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: Tue, 23 Feb 2016 00:54:51 -0000 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 sam= ple 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 >=20 > Signed-off-by: Ding Heng >=20 > 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..737a57e 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,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()) =3D=3D > 100000 and self.enable_rsfec =3D=3D 'enable': Add some descriptions for this judgment.=20 > + 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'])) >=20 > pl.append('[list %d %d %d]' % (self.chasId, item['card'], > item['port'])) >=20 > -- > 1.9.3