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 0D8C9A0543; Thu, 22 Sep 2022 17:12:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CA2440156; Thu, 22 Sep 2022 17:12:18 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2049.outbound.protection.outlook.com [40.107.220.49]) by mails.dpdk.org (Postfix) with ESMTP id 0AF62400D7 for ; Thu, 22 Sep 2022 17:12:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dFYUYGK8C7sq1cvBSg8K8ylcIdMqCnMYibBy4fJE0iwZxeM27/2XZ5ZoWYZZv+/n9aErljvVpwq/neskroZumGJN/epj5S5sbUA5zGBb8Cokl8KBtt3mYF2vNJaM+uj6/layMPQSmiyxrD62DTsdWviGJPUGQ63VJ3LzAUR3gT2BmqpZEmBqG/t5fpnmmpmlMabHTNolWODTKImJJ7i1FCpT0h9GCtdT2Q2mqhsqjhr2ca85Lxfz0QPKh5LKsTOk5Kyh7m3PrUwb41IefSxuoGqJ0bJTpAdUwujo4A6bHYypd/X4s9K+U5R2B6bbUvN3+hCBEnrJuJqxj7MfIIBUGQ== 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=fEJ6ED1i3woCHHWpcKkqYI/l4sOrkFd+vgsIIy1AKSA=; b=JmpJWqi8nK8dvzQnf7FfA+1PKFnx+kg5N3bYtKd4OJBwjf2nFyoNBKMlNhs/yrSWLKiOJZf0KaWYa0N2QfCnhWctBpy536FGasJf6GZREtz+E6eGM6Rkf1C1pzPxWEEVv3+np4vxPRbcX+8kBW2TQn1OZxlg9jYVq523XcpjIWJaZsth8wTJLmY+iQrMhbwQV6AQOYuFR4s7U+YHpv3wj+/1l2QK9wSVViyHb0mWsyaff0t3jVrst1zZA4aa8EYCe0J8qJrTbV+7SCL8PQwHLQCCw0zu4hGgv6r3V+2e14RzQbNz+DqEcNPU65iZtTmmtlJQwsTlBqP2wFFK20eg5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 149.199.80.198) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=fail (p=quarantine sp=quarantine pct=100) action=quarantine header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fEJ6ED1i3woCHHWpcKkqYI/l4sOrkFd+vgsIIy1AKSA=; b=IzZm9aaszcAZgF24h24zYHy/D0JluzXKEQ8rlQZmAaN6uP/RkHghFdR0PFIS8R94UpN4v42HNq1AhZqG43PykP2jUL+cKHFmXvQGJlJtlboeq3fJOBL+izZpvj9/ECKoUC2G1DmJBi2DSUIcY9apUXrO7l+ENQ2WZ45pEVXZuWg= Received: from BN9PR03CA0587.namprd03.prod.outlook.com (2603:10b6:408:10d::22) by DM6PR02MB6745.namprd02.prod.outlook.com (2603:10b6:5:210::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.16; Thu, 22 Sep 2022 15:12:15 +0000 Received: from BN1NAM02FT010.eop-nam02.prod.protection.outlook.com (2603:10b6:408:10d:cafe::d5) by BN9PR03CA0587.outlook.office365.com (2603:10b6:408:10d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.19 via Frontend Transport; Thu, 22 Sep 2022 15:12:15 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 149.199.80.198) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=fail action=quarantine header.from=amd.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning amd.com discourages use of 149.199.80.198 as permitted sender) Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT010.mail.protection.outlook.com (10.13.2.128) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Thu, 22 Sep 2022 15:12:14 +0000 Received: from xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 22 Sep 2022 16:12:13 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Thu, 22 Sep 2022 16:12:13 +0100 Envelope-to: ferruh.yigit@xilinx.com, rjarry@redhat.com, dev@dpdk.org, olivier.matz@6wind.com, bruce.richardson@intel.com Received: from [10.71.194.74] (port=56410) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1obNs5-000362-7p; Thu, 22 Sep 2022 16:12:13 +0100 Message-ID: Date: Thu, 22 Sep 2022 16:12:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v5] usertools: rewrite pmdinfo Content-Language: en-US To: Robin Jarry , CC: Olivier Matz , Ferruh Yigit , Bruce Richardson References: <20220913105811.84384-1-robin@jarry.cc> <20220922115802.32744-1-rjarry@redhat.com> From: Ferruh Yigit In-Reply-To: <20220922115802.32744-1-rjarry@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1NAM02FT010:EE_|DM6PR02MB6745:EE_ X-MS-Office365-Filtering-Correlation-Id: 00983a8a-fe40-44c0-7072-08da9cacd514 X-MS-Exchange-SenderADCheck: 2 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yB3IndNAt1GMZjLOpI5H/xsGYwfjUAvIzYBu90iosRKFJV4irKnn0WOzNMk+7Ikf8yPe4+bzljze8BAWxUYXJQsvpM3hP5+ktmA20Pt62AAnwZxBcDbIeOfq0uHXea6uHiKpwHTo+qTSUncdbpIHOyhA3Qzi4oLpFhsTsw/mD5rRpTF62y9Lp3/nuU0m3XY21adSdmDWof8jkttotfGz4pVVxsAET1h3LlcjYn72VwG0CEkUiKBy1LXZNiGxOjtyo3Z94cGXemWUa3Wvf67ObxLI+ClNVRJHcByUDXb/7N6iYDIhFTBJ65cbAa/A6ynRdqZTFc+a3zUUcIwuMJwBgpr5F9Uqz5QL6NxfgqyztaJ0UVY+OQc7VXmYwMUcO/sTVYIj7ZDg4LdweHV/FRYWfConpAZHHkdvwVe9DZ+N2bCQeG5kEJ8j8cxO0xVGHQrAjEX4f95B7gsRDcpZz3G8McNTLFQFJCOeDiixkPOpi/91XRsLxdkguzDvGL9wtkvKtsRiuqra8GWWgKqZz5Nbj/ZM9yPk67xTugjdCHXWXCEpCF58/xzTvHJF1pmA+VDR5PEKiVSfuwNw1G8FCf1N4XmiMIL2jmxFbVjJkgRBVCLl5cND1HU5K5ce5s0xrMCXnIsy/b+9GwN7jk3IH+p5SIC1YQTsdghdyEXBRSKVlSVU3DitIEgzPMzkt+H3PXTgIHUw3D+ElrzMOS7pjS/QgF47zM78IHMTnjnQcIiiqTQSs6uZgS6ELnQ4/K9Awn9yQur6lJv+dEKYWT97RACFOoiAghnpSnWBmCIKmuLuO0UQyBE8g/x4ixngOpNwSvIVXBpknFDzSt4tib9xEBP8VA== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(39860400002)(396003)(136003)(451199015)(40470700004)(46966006)(35950700001)(44832011)(36756003)(82740400003)(47076005)(83380400001)(2906002)(70586007)(356005)(54906003)(31696002)(498600001)(86362001)(8676002)(4326008)(82310400005)(40460700003)(70206006)(8936002)(336012)(53546011)(2616005)(5660300002)(26005)(9786002)(7636003)(41300700001)(31686004)(110136005)(316002)(40480700001)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2022 15:12:14.7822 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00983a8a-fe40-44c0-7072-08da9cacd514 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT010.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB6745 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 9/22/2022 12:58 PM, 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: Ferruh Yigit