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 32E17A0543; Thu, 22 Sep 2022 14:03:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DF2C40156; Thu, 22 Sep 2022 14:03:39 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id BF52B400D7 for ; Thu, 22 Sep 2022 14:03:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663848217; x=1695384217; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=aIM4LOPc8fdHMmPaIO/4wwoIsIWDCY1ZUR2zeEVcXWM=; b=Ny/TvtMwStqw3Xe5+ge3G0pYmCw6ugN5HlPKnNlkkEhPEXsYAbS21VLj pcrHrvNvYjAFPnnGvlngwQsXW1hob5nM+Dx06V2by5Dgseb7WoaMz9OON uXJd/rXfESFcUDxXYMw2IDxrzPw/Jwo9LiW106mJu6B2NPkM64TkkH5Mn uaIv4aGejATswwQiq8PuuPfgY2v7+Ou9d4pUuP27iUTIbloKq9JfhQvA/ zGSNj22AXGg1fOTOdpMowx1ezfdnCcibb5QczuMczWtLJFiZa0GJL2oDM ZfSWk2XJf6ss4RaNjH05wXKBxW3ZIp1j0QsgaEII7Px6OlVqcHwRLvhSI g==; X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="298993463" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="298993463" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 05:03:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="615180522" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga007.jf.intel.com with ESMTP; 22 Sep 2022 05:03:34 -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; Thu, 22 Sep 2022 05:03:34 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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 via Frontend Transport; Thu, 22 Sep 2022 05:03:34 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.107) 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; Thu, 22 Sep 2022 05:03:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HZcIKakUhD0kYpLu/vblgmaVuZfRQ5PAH8J3s5eHk1yu42tdN1x/y27CprvsUBvUX21KBWL6SItvlHPo6NQ/WcwVVemlTidXtdXrb+DCLwbTQygEi7z5ePin5M6XYuRA/ThOtxNBdzBhP2X5/5HGvwSe6HKH81frvhLVpAhOQFyMfR8PGNfFekJ5rLzq4g/2ea2wTYiOp6FKMyL/7L4+44/nL177XxBLjCQsbLpP939FbHymlDalnzvXB3BkIo7pCxf6AnAxhaOfDvy7FSR5ecWsoAIdmyFobDwPwGCnlMMS/YPLgEaCo/PJm3tmGSX803pjHlKs6njmFh7SzHK0bQ== 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=AC0iz/Bf9rsrb7Xn3RfH/j6KjvTYJ0lDwHMUmdkO3p4=; b=eqQEBMiHuGm3zNbk3h9IEQpvpaxrcLIxtfMp1x/59FZBzcvNGZ2lK/pFr7BDsgzgoOk6VTaAx3Mur8az77pUh4DDTSY6sEPpBB5PcJkfr03YAP9U2MXxQLM7V9oxmKn4vUgef42VFG7hVmEQNcfGIkqvjglWEn+wwW/Fdlv/PwNHR3JGdjQZ1CG5ipnML5yiiSHyqaWvCCCt7ENjqCgYP+QJL32ygfJFXKZTXBURkGZ1rY19zVBmqsob+ej2VUWTf2qvCsGA1v+uWKInBQmSypNOvLnTD5wwLzu0h1K0qIbOiiA+WajtiWb62ksDivMIy0xo6uYAPN3P9XCZs91rjw== 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 MW5PR11MB5908.namprd11.prod.outlook.com (2603:10b6:303:194::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.19; Thu, 22 Sep 2022 12:03:31 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::13c:8120:d994:16d2]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::13c:8120:d994:16d2%6]) with mapi id 15.20.5654.017; Thu, 22 Sep 2022 12:03:31 +0000 Date: Thu, 22 Sep 2022 13:03:25 +0100 From: Bruce Richardson To: Robin Jarry CC: , Olivier Matz , Ferruh Yigit Subject: Re: [PATCH v5] usertools: rewrite pmdinfo Message-ID: References: <20220913105811.84384-1-robin@jarry.cc> <20220922115802.32744-1-rjarry@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220922115802.32744-1-rjarry@redhat.com> X-ClientProxiedBy: DB6PR0402CA0010.eurprd04.prod.outlook.com (2603:10a6:4:91::20) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB1629:EE_|MW5PR11MB5908:EE_ X-MS-Office365-Filtering-Correlation-Id: 534f5011-f443-416c-c862-08da9c9277c0 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: wzIXA87+Yt1h/OALQnIE/mba8+BZoOZoLzXdvbCjOWEix2s8Jr8C0pJ9u8DfL014YqmtbcY6iNgJjFhbF6q9/Nu0rbAq1q4qpieaML21lO67i21q565RNvS8yF7Vb1t9jj3vBFBQMQjP1CAuFaUEGVSOUuRT6eWAhKCIV6X2NL33R3xuEttA/UZnUw1lGmXRrEUpOhzenq4EHmqSCVL53wwlJLrdw8vJG/7o3s+HipBlsS5Bzt2moxjG7BTkEtKwfU80AQj5yMPmjZlGhsE3Ywds/v0dcUcdXfjwTmMA0iHqUTvHWAf+qDlaoIPKgnY1ArPWST9+NdmJVo+wAUpAOR/20CdXxs8AmctIzZyrFgC3lLOqkA2aNM3SuhiLU+YQC/zejw9LXiitpRs7Df5m9hUdDng9AANYbF9MG9/vU3IdETFRLP7C2Dlngp34jOlXSeAcx1jQFi7TAnbjbKWccvVlLbWF/K1gr+es52DAu3LCykC3JM29PCjx2gC/tNkA0+UnuuBJq7jA/wtrZgPLTb4Li5kki3OZl6c9lHpT3j0NZP+2oBN9aaotIJbyaTiEPvMk88eNlPvfk0zUrJndCfpI9X1+QbBFZ/3cFvW/RcGKPdNmrKLwhq4FdRQI+l/WTYAUvsMI43KIM+hu/uwDJfKmGm/wFgDTFQBN6K+9ctGDfF2w0cWNN7wZFJqUG78SopXKGE4QY/PucqMfY5LOcQ== 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)(376002)(366004)(39860400002)(396003)(136003)(346002)(451199015)(6512007)(26005)(2906002)(38100700002)(6486002)(82960400001)(44832011)(5660300002)(6506007)(478600001)(66476007)(86362001)(83380400001)(41300700001)(6666004)(66946007)(186003)(316002)(4326008)(66556008)(6916009)(8936002)(54906003)(8676002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ALTks7bP1BilSRQ665LgQNohE6FNvn0A9fxlzxA8j5xvxz5ti0FCfqIj2ief?= =?us-ascii?Q?x/UfayDytSP6ywdr81Nc7o4qTRsF5/RrfAUMD3DRuvq8+cy5bSoAHzRQejsA?= =?us-ascii?Q?fHq1Hwl9UshgFaYHXe1KEnN+QK3FLypP3s/Pk7Eb8cHWBj4pkWZiR6wAkRir?= =?us-ascii?Q?rSIzTCrOidcWre3SZVEA3oXklGiegzORvo8GJ3xf3r/rxgRvit+ngpJgb44x?= =?us-ascii?Q?Vki7rA2GSntFr2d1CDN4i3X0VzglIoRayb/1YPodsUMMKt4XOGFTimuN+gQn?= =?us-ascii?Q?Jfg5NJLvJYIJzhHEd1khOTnbsDrENeHgDclvCq1V2zPYP9JyzLpxCzLCMiF9?= =?us-ascii?Q?OYGMIEyeAmDoIXiVVeikQ/rA4+RvfClyuvvOnAr+EZ8tOkqjHGOsKbXKcH2n?= =?us-ascii?Q?zPYNzLPwYphI51Z6cColQHladrdk0ZB76pVg/ddgCOPOy9fBOgCX4DG8ajz/?= =?us-ascii?Q?GX/AD25GVL9LGEd0TgFdeierTIhmEPHJie0ZkDMhXIvQA4FWkYco4YGYkmD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lbcI8dcW8xYcikP4AUImLxNt7XBQzesI//c?= =?us-ascii?Q?J9QTlA4gnbo9k+wE4MpXWdOPCIr2nEw+iWc6wIo/LmprZPa30uJ4NbPifUZ2?= =?us-ascii?Q?bhkAt3jhxjsOGna6mJG6m1XKSiYqJoyzvr1EnBPguEGJJQ4wXpCR+D/TWkPw?= =?us-ascii?Q?6wjCfdKUowYUwohjL/xW+sX3AW0Ld+PZ8h7ExAUWkZQsdlVkBBlJRSj+5TM7?= =?us-ascii?Q?3YX43LWR95q1PggUFzv/7BE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 534f5011-f443-416c-c862-08da9c9277c0 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2022 12:03:31.7127 (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: SCZVSBaluH4vmr/ubqq7/ILC6lgK1oB1kH0sAqB6CrXC+BU37ZICfmhY/hA+1sv6cuymHkDQD24PFcJqlK7en6UY0ZTlBiblBI2TF0LbB6k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR11MB5908 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 Thu, Sep 22, 2022 at 01:58:02PM +0200, Robin Jarry wrote: > dpdk-pmdinfo.py does not produce any parseable output. The -r/--raw flag > merely prints multiple independent JSON lines which cannot be fed > directly to any JSON parser. Moreover, the script complexity is rather > high for such a simple task: extracting PMD_INFO_STRING from .rodata ELF > sections. Rewrite it so that it can produce valid JSON. > > Remove the PCI database parsing for PCI-ID to Vendor-Device names > conversion. This should be done by external scripts (if really needed). > > The script passes flake8, black, isort and pylint checks. > > I have tested this with a matrix of python/pyelftools versions: > > pyelftools > 0.22 0.23 0.24 0.25 0.26 0.27 0.28 0.29 > 3.6 ok ok ok ok ok ok ok ok > 3.7 ok ok ok ok ok ok ok ok > Python 3.8 ok ok ok ok ok ok ok ok > 3.9 ok ok ok ok ok ok ok ok > 3.10 fail fail fail fail ok ok ok ok > > All failures with python 3.10 are related to the same issue: > > File "elftools/construct/lib/container.py", line 5, in > from collections import MutableMapping > ImportError: cannot import name 'MutableMapping' from 'collections' > > Python 3.10 support is only available since pyelftools 0.26. The script > will only work with Python 3.6 and later. Update the minimal system > requirements, docs and release notes. > > Cc: Olivier Matz > Cc: Ferruh Yigit > Cc: Bruce Richardson > Signed-off-by: Robin Jarry Acked-by: Bruce Richardson