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 ECC38A054F; Tue, 18 Feb 2020 08:09:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D71731C1B4; Tue, 18 Feb 2020 08:09:37 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A07661C19B for ; Tue, 18 Feb 2020 08:09:36 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 23:09:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,455,1574150400"; d="scan'208";a="435758878" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga006.fm.intel.com with ESMTP; 17 Feb 2020 23:09:35 -0800 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 23:09:35 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 17 Feb 2020 23:09:34 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.222]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.98]) with mapi id 14.03.0439.000; Tue, 18 Feb 2020 15:09:31 +0800 From: "Tu, Lijuan" To: "Zhao, HaiyangX" , "dts@dpdk.org" CC: "Zhao, HaiyangX" Thread-Topic: [dts] [PATCH V1] framework/dut:optimize code Thread-Index: AQHV5hMzLS7qndMAvkmJ4HiucfaNoaggiI4w Date: Tue, 18 Feb 2020 07:09:31 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBCB560@SHSMSX101.ccr.corp.intel.com> References: <20200218042246.2994-1-haiyangx.zhao@intel.com> In-Reply-To: <20200218042246.2994-1-haiyangx.zhao@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] framework/dut:optimize code 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 Haiyang Zhao > Sent: Tuesday, February 18, 2020 12:23 PM > To: dts@dpdk.org > Cc: Zhao, HaiyangX > Subject: [dts] [PATCH V1] framework/dut:optimize code >=20 > *.test performance with trex support two port map methods, > add the pci map method. >=20 > Signed-off-by: Haiyang Zhao > --- > framework/dut.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/framework/dut.py b/framework/dut.py index 4f376f5..4b8bd3e > 100644 > --- a/framework/dut.py > +++ b/framework/dut.py > @@ -1149,7 +1149,8 @@ class Dut(Crb): > if peer is not None: > for remotePort in range(len(self.tester.ports_info)): > if self.tester.ports_info[remotePort]['type'].lower(= ) =3D=3D 'trex': > - if self.tester.ports_info[remotePort]['intf'].lo= wer() =3D=3D > peer.lower(): > + if self.tester.ports_info[remotePort]['intf'].lo= wer() =3D=3D > peer.lower() or \ > + self.tester.ports_info[remotePort]['pci'= ].lower() =3D=3D > peer.lower(): > hits[remotePort] =3D True > self.ports_map[dutPort] =3D remotePort > break > -- > 2.17.1