From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2A93A0524; Tue, 25 Feb 2020 10:07:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E7DED1BFB1; Tue, 25 Feb 2020 10:07:48 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5FD392C4F for ; Tue, 25 Feb 2020 10:07:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2020 01:07:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,483,1574150400"; d="scan'208";a="255889292" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 25 Feb 2020 01:07:46 -0800 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 25 Feb 2020 01:07:46 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.225]) with mapi id 14.03.0439.000; Tue, 25 Feb 2020 17:07:44 +0800 From: "Tu, Lijuan" To: "Mo, YufengX" , "dts@dpdk.org" , "Ma, LihongX" , "Chen, Zhaoyan" CC: "Mo, YufengX" Thread-Topic: [dts] [PATCH V1 1/1] framework/pktgen: add tester port mapping Thread-Index: AQHV666zFjtl8BnOJ0+4UvGwXHDsLqgrnrAA Date: Tue, 25 Feb 2020 09:07:43 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCE003@SHSMSX101.ccr.corp.intel.com> References: <20200225074307.17136-1-yufengx.mo@intel.com> <20200225074307.17136-2-yufengx.mo@intel.com> In-Reply-To: <20200225074307.17136-2-yufengx.mo@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 1/1] framework/pktgen: add tester port mapping 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of yufengmx > Sent: Tuesday, February 25, 2020 3:43 PM > To: dts@dpdk.org; Ma, LihongX ; Chen, Zhaoyan > > Cc: Mo, YufengX > Subject: [dts] [PATCH V1 1/1] framework/pktgen: add tester port mapping >=20 >=20 > Since tester port scanning work flow change, non-functional port mapping > config will be ignored. > Add tester port mapping if no port in ports info. >=20 > Signed-off-by: yufengmx > --- > framework/tester.py | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) >=20 > diff --git a/framework/tester.py b/framework/tester.py index > a858081..6e92847 100644 > --- a/framework/tester.py > +++ b/framework/tester.py > @@ -366,6 +366,7 @@ class Tester(Crb): > ''' packet generator port setting > Currently, trex run on tester node > ''' > + new_ports_info =3D [] > pktgen_ports_info =3D self.pktgen.get_ports() > for pktgen_port_info in pktgen_ports_info: > pktgen_port_type =3D pktgen_port_info['type'] @@ -383,6 +384= ,22 @@ > class Tester(Crb): > port_info['type'] =3D pktgen_port_type > port_info['mac'] =3D pktgen_mac > break > + # Since tester port scanning work flow change, non-functiona= l port > + # mapping config will be ignored. Add tester port mapping if= no > + # port in ports info > + else: > + addr_array =3D pktgen_pci.split(':') > + port =3D GetNicObj(self, addr_array[0], addr_array[1], a= ddr_array[2]) > + new_ports_info.append({ > + 'port': port, > + 'intf': pktgen_port_name, > + 'type': pktgen_port_type, > + 'pci': pktgen_pci, > + 'mac': pktgen_mac, > + 'ipv4': None, > + 'ipv6': None }) > + if new_ports_info: > + self.ports_info =3D self.ports_info + new_ports_info >=20 > def scan_ports(self): > """ > -- > 2.21.0