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 E9246A04B1; Thu, 5 Nov 2020 12:47:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D42B9C818; Thu, 5 Nov 2020 12:46:14 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0168EC7E8 for ; Thu, 5 Nov 2020 12:46:10 +0100 (CET) IronPort-SDR: HeeMbhhAxF6TO7ATMqBjYtlsUh0zTUbceH6QXKyPWUv7L3udgZybKPwkrdS4UbMoMXTjHVoFpR vhEsvNEUoiPw== X-IronPort-AV: E=McAfee;i="6000,8403,9795"; a="233533964" X-IronPort-AV: E=Sophos;i="5.77,453,1596524400"; d="scan'208";a="233533964" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 03:46:08 -0800 IronPort-SDR: PrBcj4YmLJKmJektDSe6ziMwcNawZQoVoc1r45ElivxJ4u5VuI3/5kJFdMjlqWVGE4QwrufmXG q8xDuiCcNzdQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,453,1596524400"; d="scan'208";a="363785852" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by FMSMGA003.fm.intel.com with ESMTP; 05 Nov 2020 03:46:08 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 5 Nov 2020 03:46:07 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 5 Nov 2020 03:46:07 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Thu, 5 Nov 2020 03:46:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LGFmeIHfuCnQkuw4WvH1ePdC4x7yAOjsHunzPpXSovE0Vt/BwqebFSfb8vnlVIqTubr98mSpd3iVSaACtu5GxhEtmMFGiKN7dXyfOxsNmPD3CmpRrdTPQX7LeumB/xs5VdMDWUQ+PjT7DcL3FBEUamgXOEEsKYyf3weiZR1OBOWhoHRSNAFiTx8dOyA2AJdQVBpVXdPl0KkbLG48HxNYZBvPIlmul5dbreFvCK6xElaSnNKSbKRH0OmvGYU6vplnt1jyvxvNTP81YYAmF54iYsO20jy7JS1n0YTvAkbXIDKQMh2TgF9tP1fhGI5VPAgr87n5YOu2EPdOvO73SZwGlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kqHIJMqJVbean/j4Z2itKIoJmFIouwQ+uSCIycvkZ6U=; b=BQL+Bply/TuMsVqJGENxGGNiomEe89mS83Tnm/8ZoGzqZORum1LKa+AoEu2JeudE5woj3MoRhqLb7JpLuGj8OKGgHlSS/G0+MKSNKLOuJOyVP+FWshDH63onDDSuLUVh6h6FcQjyzgFTT2SWTUU5Vn0c6/UfqM0Tjhm+z6eTJ0qzt7yH5dF+mUl2QRqNVA3P+SOSaZYfbdL01RDqOddZmyZasenQ83NTdws1zvADIZMctKqweC3GHbintM0FrZiLsSGh6lkmk0P16mjRMkRfWswAJeZbrDd5FA8+z/eqkrEqLCKHeUPtFkbypVXTUkQ0zCVo7AiPTxSaNzox9Ai7uQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kqHIJMqJVbean/j4Z2itKIoJmFIouwQ+uSCIycvkZ6U=; b=CJ5PEVXsijdtd8a7VGiLxcan81LeChrEH8Us9GxdSOp4e+8/wuAeROzBECofoKR4Qr6sSeBI4xociTigR+1UKYpzJ+Zip854TlewIT9KY9qKsYshz5hx6WI+ibkFfjJ0I/Tr8swTQd+EiEqwHkk3ZTVytpW2yV1RlJqMzAtVgb0= Received: from BYAPR11MB2901.namprd11.prod.outlook.com (2603:10b6:a03:91::23) by BYAPR11MB3397.namprd11.prod.outlook.com (2603:10b6:a03:1b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.30; Thu, 5 Nov 2020 11:46:01 +0000 Received: from BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::8d75:dadd:9af1:81ab]) by BYAPR11MB2901.namprd11.prod.outlook.com ([fe80::8d75:dadd:9af1:81ab%7]) with mapi id 15.20.3499.032; Thu, 5 Nov 2020 11:46:01 +0000 From: "Xu, Rosen" To: David Marchand , "dev@dpdk.org" CC: "Richardson, Bruce" , "robin.jarry@6wind.com" , "stephen@networkplumber.org" , "olivier.matz@6wind.com" , Neil Horman , "Andrew Rybchenko" , Luca Boccassi Thread-Topic: [PATCH v2] usertools: fix pmdinfo parsing Thread-Index: AQHWso6Xl+zPuB5TvkyOro0VHqNxa6m5bS3A Date: Thu, 5 Nov 2020 11:46:00 +0000 Message-ID: References: <20201103183906.8088-1-david.marchand@redhat.com> <20201104094033.29674-1-david.marchand@redhat.com> In-Reply-To: <20201104094033.29674-1-david.marchand@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.5.1.3 dlp-reaction: no-action x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmQ3NjI4NzctMzgzNS00NmU0LWJjYzUtY2Q3ZDFmZTZlZTMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZE1wZkJEK3Vvc0ZSUklMVjduXC81RFA1MFJVb2JUelZuOWVxR1wvNkJhZjJpNmJ3QWxPbUo4Q1dYVERuTFgrQW9DIn0= x-ctpclassification: CTP_NT authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e6706d99-a75d-453b-7bbb-08d881805e43 x-ms-traffictypediagnostic: BYAPR11MB3397: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hvPFfJfuhCmeybyQipIHd5vZxHi1UZn5B5hzMGFnvnUkXMw6Trj2rInOyQgXv3Cy2s1RUPpkmzUnck1E8PpcSfPIcytXIsxK4dPYMT99Y9Kd9Aetd+OKu6Q52FWdTY4MVydH/4JHr7CinVf0ZHUBgDQMHkZ3ZRBxRhTN/jS/RMFGUTeJrR9fiVYX3vVkfqe1ljg52perv1sbruUn9SWh3ObEqBl7tSjuFQeaV23Rgpx9G3lSWzlxEX0yawsbRUg3+Lb18Kg7WIupnvxy5MolJZA1yZeYvUhmJu63JlMFDQL7n+r73BeWcvB/V5C7GiueTddIAZwto0UgFiP8sg5rlw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2901.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(396003)(366004)(39860400002)(83380400001)(316002)(33656002)(2906002)(4326008)(8676002)(71200400001)(7696005)(110136005)(54906003)(26005)(52536014)(66476007)(64756008)(6506007)(66556008)(478600001)(5660300002)(186003)(53546011)(86362001)(8936002)(66946007)(55016002)(66446008)(76116006)(9686003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: UsAubnCJIzbqhvLy0PlSaCgctCda0SzmoHQqYY1sTzkZqubRrUexL2s2lyKcJpGJnw/3PoZ3Lgkv7dmyftZXBD08B5QprQGrDDOfX3VjnVyyM4MOinnDYPkuCJigsBypCSqvNaz7dRX/uTuT53LnA5wZxB2LGOKG/VvxT3tk0coT1RwAfzBswZnt6mQ/kiO6zqtXVDcQSIdQpzZRbntxOp74otqaRY7Up4fUepntg1WoARwGKY+5ivoLl3jH7emCTfyMjDscqyaR2VWTfM5Hqt303tR5qX2zW8hjQMbG6d6HAHWmeAF1T0gIKPTtuJqjqY5O8niuZ2+c11FHiB7U81MhTqRIjl5pdJtMsSb+PB/mlWC00+wJpwvDiQ660SukUBPjaYuET+lW0j4jpcIsALwWaggHCJMegMk+BbpCfwuf4LtoKkfhBj+L/enyF0s4XY8TYzNFORaPIUgQNpLNAQqiqmiwQ2Fzng5iBblpsApDl79lnNsJ/IAoQOoOAKiAjVkiAdq5+rPOekFJU7YdWVYMzpCqgX5CXdmUwxYTauuKw0vj3mdYHpraJSj1HuN0hrUbd1waBMBl0c07Y2o9ElEtQZXnIamgKYdXFmq3ZZusx54uwNZAuTFw+eBw4NdK50iP61BxO86uQrZASpwcQg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2901.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e6706d99-a75d-453b-7bbb-08d881805e43 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2020 11:46:00.9473 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ycCV9jpTZa0T/1hmFgVPorQI0hgSzx+NvZc4f7X59d5D6I3h0pQ/dg/vJV7ciKqIP9H0i5+HGJYYXp9TozxNmQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3397 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] usertools: fix pmdinfo parsing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, > -----Original Message----- > From: David Marchand > Sent: Wednesday, November 04, 2020 17:41 > To: dev@dpdk.org > Cc: Richardson, Bruce ; > robin.jarry@6wind.com; stephen@networkplumber.org; > olivier.matz@6wind.com; Neil Horman ; Xu, > Rosen ; Andrew Rybchenko > ; Luca Boccassi > Subject: [PATCH v2] usertools: fix pmdinfo parsing >=20 > This script inspects an ELF file (binary or shared library) and its linke= d > dependencies by following DT_NEEDED tags. > So far a simple librte_pmd prefix was used as a filter. > Now that we changed the driver library names, update this heuristic with = an > explicit list of all driver classes. >=20 > Fixes: a20b2c01a7a1 ("build: standardize component names and defines") >=20 > Signed-off-by: David Marchand > Acked-by: Robin Jarry > --- > Changelog since v1: > - moved driver classes list as a class variable and did some cosmetic > change for readibility, > - used dpdk_driver_classes variable name in the hope that someone > changing > meson will catch this script too, > - added bus, common, mempool and raw driver classes as some of them do > carry some pmdinfo stuff and were skipped so far but I found no > indication this skipping was intended, >=20 > --- > usertools/dpdk-pmdinfo.py | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) >=20 > diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index > 1661982791..55a55affde 100755 > --- a/usertools/dpdk-pmdinfo.py > +++ b/usertools/dpdk-pmdinfo.py > @@ -430,6 +430,20 @@ def get_dt_runpath(self, dynsec): > return force_unicode(tag.runpath) > return "" >=20 > + dpdk_driver_classes =3D ( > + 'baseband', > + 'bus', > + 'common', > + 'compress', > + 'crypto', > + 'event', > + 'mempool', > + 'net', > + 'raw', > + 'regex', > + 'vdpa', > + ) > + > def process_dt_needed_entries(self): > """ Look to see if there are any DT_NEEDED entries in the binary > And process those if there are @@ -450,7 +464,11 @@ def > process_dt_needed_entries(self): > for tag in dynsec.iter_tags(): > # pyelftools may return byte-strings, force decode them > if force_unicode(tag.entry.d_tag) =3D=3D 'DT_NEEDED': > - if 'librte_pmd' in force_unicode(tag.needed): > + words =3D force_unicode(tag.needed).split('_') > + if len(words) < 3: > + continue > + prefix, drv_class =3D words[:2] > + if prefix =3D=3D 'librte' and drv_class in self.dpdk_dri= ver_classes: > library =3D search_file(force_unicode(tag.needed), > runpath + ":" + ldlibpath + > ":/usr/lib64:/lib64:/usr/lib:/= lib") > -- > 2.23.0 Acked-by: Rosen Xu