From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0406A00C2; Wed, 28 Sep 2022 12:53:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 727554113D; Wed, 28 Sep 2022 12:53:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 0F2124113C for ; Wed, 28 Sep 2022 12:53:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664362401; x=1695898401; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=e8MJjuQIBazSNvwJgveASChfOcjpIKGPzz1L1Iu9pc0=; b=ElWaJ7Y9Z0jDCmdJ441GR1wMFhqVo2K1D8BJnJKUjuKPmVXsJGPyWA3s p9hGQy7wvp933kEqB1WH0WCGiE8w6Osi5bGvOBWjyn78lS6FDexdbOwbH qFI8drLIncAmbdw5Dak3F2bOKcwGHUVo/54q24V+nqczMRVnzGmOV5oh3 gQ4YmqUMSEsx5GDQvcSxrFBB5akwnJLRLlxuERUMHp+z7jYVJnO0MCC9q SRjrtGg/IHaZtMblbutmkIL7gZdh8VnsT3nO5bw6Vaqm+3nPugU+dFwKk KxgQiLUcgfrB1GWPHKzBpqZpHITQM3rrQRI/gkfjnnamuOCW6kPKQAp7i A==; X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="327936036" X-IronPort-AV: E=Sophos;i="5.93,351,1654585200"; d="scan'208";a="327936036" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2022 03:53:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="950659062" X-IronPort-AV: E=Sophos;i="5.93,351,1654585200"; d="scan'208";a="950659062" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 28 Sep 2022 03:53:19 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 03:53:19 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 03:53:19 -0700 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.2375.31 via Frontend Transport; Wed, 28 Sep 2022 03:53:19 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.169) 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.2375.31; Wed, 28 Sep 2022 03:53:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ag0d8zsZISwMvTZS9feAnG057WIWrHOoVNc4D+JcuBG1AKkkaBo2dJ8PSWRaroFU8g94XNOSjyNJ3l6Uqb+oE78asiHepnD1tX3zIyEWkSZ5Kch7rENVwLSW2rLIOELTVSiHIcVOzOzdiEIfSlDHVYwPAuPs6AGhcDMVcqpjEnEnoUhvRpmusH9RXhJi3tqyE3DI/UyE3oXNBan4/wVZUSi6OKhgKveTB+m+WQRgWr64+IJTRAGb6iVP8RRdWe2X6UfxipzjvNRhwJSfK1CISj6+Q2WvDPnH/9yMEhdA9Bkbh4CoDJrUfv2jDuvzdSr532JJl9Xodu2aFQEF1ddN3A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EIyLElrzj2f5F3tcvaN/LIvG4XGmJFyI4cU8bK/pCME=; b=oCSBwQaYrdvqKKP6/IXZTKEibghMTGYbdpmwbJlcPkcJ31UQdDHSttLEkFaJxV3QhqDP0Etkc4Vbu/8OzTLG2X0G+UTSyn2TBiHYEbgNU0n0yQ6qOJFGd93QO93rXs9RP+y6MEWp/HE2ssQE6wJW2LcJbmiK038hOCTWlZpi7pTPTqc4lvGZsPqo1bmOgIHOgfwWXoptRNLBTAoobnyLi6ro01YGxpKpU5W3FzCTs28bssrRgwOPyHvpaHfHSY2ZKaq34irPQxEcX7GJuxI0t/cCMsI0Xz1uWuc7MxV0DUT94bGJI0NJzskBA5Hrq1dPqCLk5EJnhl05P9CQr+ODnA== 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 Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by SA2PR11MB4779.namprd11.prod.outlook.com (2603:10b6:806:11a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.16; Wed, 28 Sep 2022 10:53:11 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::5582:9796:3aaa:aa1]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::5582:9796:3aaa:aa1%12]) with mapi id 15.20.5676.017; Wed, 28 Sep 2022 10:53:11 +0000 Date: Wed, 28 Sep 2022 11:53:04 +0100 From: Bruce Richardson To: Robin Jarry CC: , Olivier Matz , Ferruh Yigit Subject: Re: [PATCH v6] usertools: rewrite pmdinfo Message-ID: References: <20220913105811.84384-1-robin@jarry.cc> <20220926134438.10906-1-rjarry@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: LO4P123CA0075.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::8) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB1629:EE_|SA2PR11MB4779:EE_ X-MS-Office365-Filtering-Correlation-Id: 0d497ad1-4009-4802-0d0b-08daa13fa295 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5/sP3ZXobYdLsRqchQoiNkB0O3cZDG34oA78bNwfXjNg2586L7dHGiZ6z07Vn/Z/Jt78Rb6ElA0ZvfelqbM0nhOSKGfBiy7g0vVMPw4285onkjvLhyZbaw8OMc5BnVrScmHlQaYLnwRASw/K0yOT/Ih0JXgPiEmc1X5soMt8874RbGt9dIVJ3WbjDJ7PcLSgcgFBmeYOWzqDums8Bu8ZmK+mZwauSgoOjxdOyNRsufeGjsjH1hBx2/qFCaBwDUYDt8fjG/U41gJsiV9EabWFPCYpypml0zubL7ZUjESnd89zQMd40qCRIDzfI/AVIgD71IWvOO06hrNIG+KkPeD6OsKB5X93ghrpvr2i91ssl+8wmORy16Hyj4wtOTZjt1cc7HQCFSACj1UDwMSbiFk8L65AVD/mP4v5ZJMhDqayCyIYV+GkYg6gwAWl/ukO+wfcBBBlrStxTEmwY2aHPeVVzy0v4nFguIz5fdCU/XYxvYoMcBQBuIr3/qOK1F3ARVq2Gkkxb6JLUbtk+LZCWNaM7DtlVPNcZFujcXQ3kalyTfuuSwUptppYR+qtmEZtqowNgqi5zo4iMrLpa+lOt4iBJB+UW8IBAdymqHuG3sWMtjZ8+8BtZFmi493ceMoEAlm6CK/pYYC/npp36Fegipt+KMfo9fMsuNZp+rGIAbmQ7CMRca27fY6PCE33lBX3HnuxEat5I1hVakKFnHgJf+H+oQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(346002)(366004)(39860400002)(136003)(376002)(451199015)(186003)(83380400001)(6916009)(54906003)(316002)(8936002)(86362001)(66476007)(66556008)(8676002)(4326008)(6512007)(478600001)(26005)(41300700001)(2906002)(6486002)(6506007)(44832011)(38100700002)(66946007)(6666004)(5660300002)(82960400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?aIxZafADiBZ1V1U8j7kcKMFm75v73hnkGGRKtKVAuzbigdvJzGDIQWIXtjqb?= =?us-ascii?Q?SatV3eqyhaMqev+zUQ7rvUaHp2xbn5cM3al2HKW4L3lVD1Qh+usmBBJiwH09?= =?us-ascii?Q?SFyW5H1dmGePBR0lnD22ACKIbqhU1cQj7TThsfInp39RcvzEQCVYt5NuidEB?= =?us-ascii?Q?oqSfEQ0JXsj1UnTrVR29epzq2URj/EJ0Q4vPsu9p+4k1ssYaIRdo/7lM5Ohx?= =?us-ascii?Q?UhdNZ9+Lz3joqdMtqcin3KoLBthXgFpuLN9BDulBV/VDcbkNyeXF5LE9cojO?= =?us-ascii?Q?fJZKmZoloDwrXB5e0FLNZceUCh7U2u/1Tl64hAmHz1wrTjh6kepRX6OzVP0Z?= =?us-ascii?Q?PIJAl1N5u9Rf8vD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?Q?QDpKjWoe/f8Ea7uG+EnfxEPWImXszB/oS7XHj/mGhzoS7yY2YTp3aLsB8us4?= =?us-ascii?Q?ZuLWEtuWxETgcowQTZsPG66ox2ryZloqFerdxnmkpUukfjxgt0VzvxCTXY15?= =?us-ascii?Q?Ez0TqCa/Ra2fTahkjiWMYluoVAtfTa+iMuRm+r8San3511RHH1yocIO0utcU?= =?us-ascii?Q?Ig0h6s/vk+h8tVXqhWT3/dlQ8eQPhz29wd37oqL+xoxBjHW4Akx8f2QdAsCa?= =?us-ascii?Q?IO22UP0jEans5rD5VEfLYevgR3YH9qVwURS0CLo7Qb79lDOFm3GNnCqCJU8W?= =?us-ascii?Q?GVXc4ttdZmCMCdQLEkCv+KoiahnRI+kricJGVzXuHvRB+Edpm9RZLz8F31Fy?= =?us-ascii?Q?Qg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 0d497ad1-4009-4802-0d0b-08daa13fa295 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2022 10:53:11.1691 (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: L0PCbjlvWqoEfPUFshhSwtEa30503UVtJzK43r8Sb1E7K8uhSP2I55resfNZ8fG2hJS2RDXH9aJY38+pvbU5f6KD185VjB4OfOv03pJmNn0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR11MB4779 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Sep 28, 2022 at 08:51:39AM +0200, Robin Jarry wrote: > Bruce Richardson, Sep 26, 2022 at 17:17: > > > * fixed typo: /etc/ld.so.conf/*.conf -> /etc/ld.so.conf.d/*.conf > > > > I am a little uncertain about doing this parsing, and worried it may be a > > bit fragile. The main file for ld.so still is ld.so.conf, which, on my > > system anyway, does indeed just have an include for *.conf in the .d > > directory. However, is it possible that there are systems out there that > > still have entries in ld.so.conf and possibly elsewhere? > > > > I think my preference would still be to shell out to ldconfig and query its > > database, or to shell out to ldd to get the dependencies of a .so from > > there. I just think it may be more robust, but at the cost of running some > > shell commands. > > > > However, I don't feel strongly about this, so if others prefer the > > pure-python ld.so.conf parsing approach better, I'm ok with that. > > I was also concerned with parsing ld.so.conf files. However, I did not > find a way to get ldconfig simply to print the folders that are to be > analyzed. This would require some regexp parsing of ldconfig output: > > ldconfig -vNX 2>/dev/null | sed -nre 's,^(/.*): \(from .*\)$,\1,p' > > I don't know which way is the least hacky. > How about "ldconfig -p" and just using the list of libraries given to match against those requested in the elf file, rather than worrying about directories at all?