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 923ABA00C2; Mon, 26 Sep 2022 13:55:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 849EE4113D; Mon, 26 Sep 2022 13:55:11 +0200 (CEST) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 6815D40695 for ; Mon, 26 Sep 2022 13:55:09 +0200 (CEST) Received: by mail-wr1-f43.google.com with SMTP id n15so9840547wrq.5 for ; Mon, 26 Sep 2022 04:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=JB3VwN6S4P7/8MzgosJrN5h+Wr3ZpJGYzUL60HKyCcw=; b=B/+iu5danyLFMS82G3bigtyObMuTgxMc1WqKTiqD6vP7TPQO38oV1qOSmmodyLA2wf l3euojHcuIxXrfMeWq6hYsHhKl+h3KS/FJAsKl3YwluhlGjMk01Ca2v87lJlM7KOjdsA /tciEo5xNCr201J4XMhusHh4ubrVIlMdnnW+Vd9GsoZVsOfHrI0ApvskFP+oUGZ+A5O4 AsknypsHe8TZ7jnxdLMA+9n8sVEB+ef4NfuPtAUaFoBUa+8u/1yoF/saZB5qMokO3n/H i/r+e9wAD1lpSALevjba/wLHVrblLuyRuui10joLJVmslyaP5tqddI+olqzPENaPYOwv /EKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=JB3VwN6S4P7/8MzgosJrN5h+Wr3ZpJGYzUL60HKyCcw=; b=41b8ByycllBid240y5M1ijeTYrQZGVEorueh0c2Sg4rCP/8w4saW1D3GYwhqzRKifH omjYizvNvdS+hYdjvmbzOzqX4LWTQs4aOtu5H9jNmYIxWnjWkGL4DIGFH0OKOKp6Mlna KbjmCcMSOG82W7mlBSXOUJbBdO89duvFPaNL/OrBtfhNUVBOI8U25FwImx91JgoARCxE q7OTDWcUxXv/V9Mg7f3jNF7zTHde124M+v8AErxuZfqvujQvfHSAh27jl8tLYoZui1Bl 7C/rRC8stJP+NrsoPICdCYACGMKFzOKxk01aGbSthC0K7UucYUUTvWypdg9cHP3S/GFf Lb0w== X-Gm-Message-State: ACrzQf3vAn/TuOFQKioPX/kU9Hmn7AqCfTHYvsnyKCJeOdnVuF4YeqCw EfU/1zpGnSpR+Fqw4yG3nRh21w== X-Google-Smtp-Source: AMsMyM7shHPTbFAsGF6qTceUCYqczNyBB/CCUhsHrvjZlRAYRwYdPNXUz+MpRvmCCvQiMHU2OdMi3g== X-Received: by 2002:adf:dc8d:0:b0:228:6e44:9861 with SMTP id r13-20020adfdc8d000000b002286e449861mr13590579wrj.452.1664193309083; Mon, 26 Sep 2022 04:55:09 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id u15-20020a05600c19cf00b003a2f2bb72d5sm13612653wmq.45.2022.09.26.04.55.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Sep 2022 04:55:08 -0700 (PDT) Date: Mon, 26 Sep 2022 13:55:07 +0200 From: Olivier Matz To: Robin Jarry Cc: dev@dpdk.org, Ferruh Yigit , Bruce Richardson Subject: Re: [PATCH v5] usertools: rewrite pmdinfo Message-ID: References: <20220913105811.84384-1-robin@jarry.cc> <20220922115802.32744-1-rjarry@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220922115802.32744-1-rjarry@redhat.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 Tested-by: Olivier Matz