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 9C37AA04FA; Tue, 17 Dec 2019 08:06:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F44D1BE9E; Tue, 17 Dec 2019 08:06:47 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id D07FD1BE9D for ; Tue, 17 Dec 2019 08:06:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Dec 2019 23:06:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,324,1571727600"; d="scan'208";a="240306090" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga004.fm.intel.com with ESMTP; 16 Dec 2019 23:06:44 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Dec 2019 23:06:44 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 16 Dec 2019 23:06:44 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.19]) by shsmsx102.ccr.corp.intel.com ([169.254.2.109]) with mapi id 14.03.0439.000; Tue, 17 Dec 2019 15:06:42 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V2] framework/pmd_output: fix issue of start_testpmd Thread-Index: AQHVsL1oKyEV8M1V1ESqqm+7gO8J2qe974ng Date: Tue, 17 Dec 2019 07:06:41 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB8282C@SHSMSX101.ccr.corp.intel.com> References: <1576108781-8380-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1576108781-8380-1-git-send-email-lihongx.ma@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-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmM3N2Q0MTctODJlMC00NGM0LWIzOTQtMGQ2OGYzMTAzNzJkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRFwvWEMzQ0FTdit6OXA1N2NtekcyWmNEck1Od2VuZDJ2TXRoYTN6eHM3ZEU5V1AycjJcL0p5U1hvMlFlUm9MTWZXIn0= 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 V2] framework/pmd_output: fix issue of start_testpmd 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 lihong > Sent: Thursday, December 12, 2019 8:00 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V2] framework/pmd_output: fix issue of start_testpm= d >=20 > 1. fix the regular match about file prefix string 2. fix issue about para= ms > analysis >=20 > Signed-off-by: lihong > --- > framework/pmd_output.py | 18 +++++++++++------- > 1 file changed, 11 insertions(+), 7 deletions(-) >=20 > diff --git a/framework/pmd_output.py b/framework/pmd_output.py index > 762f335..dd1e40d 100644 > --- a/framework/pmd_output.py > +++ b/framework/pmd_output.py > @@ -110,7 +110,7 @@ class PmdOutput(): > :return: > """ > re_w_pci_str =3D '\s?-w\\s+.+?:.+?:.+?\\..+?[,.*=3D\d+]?\s|\s?- > w\\s+.+?:.+?\\..+?[,.*=3D\d+]?\s' > - re_file_prefix_str =3D '--file-prefix[=3D\s+].+\s' > + re_file_prefix_str =3D '--file-prefix[\s*=3D]\S+\s' > re_b_pci_str =3D '\s?-b\\s+.+?:.+?:.+?\\..+?[,.*=3D\d+]?\s|\s?- > b\\s+.+?:.+?\\..+?[,.*=3D\d+]?\s' > eal_param =3D eal_param + ' ' > # pci_str_list eg: ['-w 0000:1a:00.0 ', '-w 0000:1a:00.1,queue= -num-per- > vf=3D4 ', '-w 0000:aa:bb.1,queue-num-per-vf=3D4 '] > @@ -156,21 +156,25 @@ class PmdOutput(): > def start_testpmd(self, cores=3D'default', param=3D'', eal_param=3D'= ', socket=3D0, > fixed_prefix=3DFalse, **config): > config['cores'] =3D cores > if eal_param =3D=3D '': > - # use configured ports > - config['ports'] =3D [self.dut.ports_info[i]['pci'] for i in > range(len(self.dut.ports_info))] > + # use configured ports if not set > + if 'ports' not in config.keys(): > + config['ports'] =3D [self.dut.ports_info[i]['pci'] for i > + in range(len(self.dut.ports_info))] > all_eal_param =3D > self.dut.create_eal_parameters(fixed_prefix=3Dfixed_prefix, socket=3Dsock= et, > **config) > else: > w_pci_list, port_options, b_pci_list, file_prefix, no_pci, o= ther_eal_str > =3D self.split_eal_param(eal_param) > if no_pci: > config['no_pci'] =3D no_pci > - elif not w_pci_list and not b_pci_list: > - config['ports'] =3D [self.dut.ports_info[i]['pci'] for i= in > range(len(self.dut.ports_info))] > - config['prefix'] =3D file_prefix > - else: > + if w_pci_list: > config['ports'] =3D w_pci_list > + if port_options: > config['port_options'] =3D port_options > + if b_pci_list: > config['b_ports'] =3D b_pci_list > + if file_prefix: > config['prefix'] =3D file_prefix > + > + if not w_pci_list and not b_pci_list and 'ports' not in conf= ig.keys(): > + config['ports'] =3D [self.dut.ports_info[i]['pci'] for i > + in range(len(self.dut.ports_info))] > part_eal_param =3D > self.dut.create_eal_parameters(fixed_prefix=3Dfixed_prefix, socket=3Dsock= et, > **config) > all_eal_param =3D part_eal_param + ' ' + other_eal_str >=20 > -- > 2.7.4