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 97568A0554; Tue, 18 Feb 2020 05:23:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 46ED41D8CE; Tue, 18 Feb 2020 05:23:22 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id A63C31D565 for ; Tue, 18 Feb 2020 05:23:20 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2020 20:23:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,455,1574150400"; d="scan'208";a="348618399" Received: from cy-optiplex-5060.sh.intel.com ([10.240.179.63]) by fmsmga001.fm.intel.com with ESMTP; 17 Feb 2020 20:23:18 -0800 From: Haiyang Zhao To: dts@dpdk.org Cc: Haiyang Zhao Date: Tue, 18 Feb 2020 12:22:44 +0800 Message-Id: <20200218042246.2994-1-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [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" *.test performance with trex support two port map methods, add the pci map method. Signed-off-by: Haiyang Zhao --- framework/dut.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() == 'trex': - if self.tester.ports_info[remotePort]['intf'].lower() == peer.lower(): + if self.tester.ports_info[remotePort]['intf'].lower() == peer.lower() or \ + self.tester.ports_info[remotePort]['pci'].lower() == peer.lower(): hits[remotePort] = True self.ports_map[dutPort] = remotePort break -- 2.17.1