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 CA75A45E2D; Wed, 4 Dec 2024 10:47:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3D7440B9D; Wed, 4 Dec 2024 10:47:42 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by mails.dpdk.org (Postfix) with ESMTP id 4EB1B40648 for ; Wed, 4 Dec 2024 10:47:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733305662; x=1764841662; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=L4Ix7e5KkBN8GpPScqSTVgTEY99rGoOHKFas+gNBnw8=; b=dwUDCe98aB8eHntudjELmdT+jYWqd6peOL0JhqUZZte7TulMz6PlInjr mVje8Ij/NnVCbrnzRQsXeqXIiLihVmS5DKbJcuRM429ryt451bIWoVFmp Fh3AAwQmtt2/gt0C7wEAZ9jBoNm8cyBEAv9TwxnadT/Te1KC+HCoFl7vL aJLIjmW3dxGtn2b4SjPWN0+sClthjsu8i19zUlbLOP/jnptBMQyRuGiZ2 4KXrH0h3y1uhrjojSnweQJiolsFPSNgEa/IwQfkESidSzVT+IhhGYTCT2 0/h868aRb3FYUMFDpfwATCuDTIF3jvV+IfnM9SnB9V9oYwmYDWlrOJfax w==; X-CSE-ConnectionGUID: TdUg9akPQR6F79sa2t8NHQ== X-CSE-MsgGUID: JvNS1xtcSqq/avuwOylIJQ== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="44589645" X-IronPort-AV: E=Sophos;i="6.12,207,1728975600"; d="scan'208";a="44589645" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2024 01:47:41 -0800 X-CSE-ConnectionGUID: agWP2U7ESR25eRcn4zM2Wg== X-CSE-MsgGUID: nnC2H6XFQ5OZ/1MdTV0eXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,207,1728975600"; d="scan'208";a="124543836" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa002.jf.intel.com with ESMTP; 04 Dec 2024 01:47:40 -0800 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v3 0/2] Rewrite devbind Date: Wed, 4 Dec 2024 09:47:36 +0000 Message-ID: X-Mailer: git-send-email 2.43.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 It has been suggested [1] that a major cleanup/rewrite of devbind would be beneficial in terms of long term maintainability of the code. I was in a coding mood over the weekend, and so I've went ahead and rewritten devbind. Note that this is one giant patch, rather than a series of patches adjusting existing code. Making it a patch series is possible, however the internal code architecture diverges quite significantly from the original devbind script due to its copious usage of string operations/pattern matching and global variables, so it is unclear whether subdividing this patch would be worth the effort. Instead, as has been suggested [2], the patchset now consists of creating a new file, followed by a removal of old file and rename of the new file. It is expected that this will be squashed on apply. The script has become slightly bigger - 1000 lines instead of 800, however I would argue that since most of that increase is infrastructure, comments, and sacrificing code golf for code readability (such as expanding one-liners into multiple lines), the trade-off between being able to read and reason about what happens in the script is worth the added line count. [1] https://patches.dpdk.org/project/dpdk/patch/c2bf00195c2d43833a831a9cc9346b4606d6ea2e.1723810613.git.anatoly.burakov@intel.com/ [2] https://patches.dpdk.org/project/dpdk/cover/cover.1733151400.git.anatoly.burakov@intel.com/ Anatoly Burakov (2): usertools/devbind: update coding style usertools/devbind: replace devbind doc/guides/tools/devbind.rst | 11 + usertools/dpdk-devbind.py | 1683 ++++++++++++++++++---------------- 2 files changed, 924 insertions(+), 770 deletions(-) -- 2.43.5