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 28CAF45E2D; Wed, 4 Dec 2024 10:45:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3A0C40B9D; Wed, 4 Dec 2024 10:45:56 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 992E140648 for ; Wed, 4 Dec 2024 10:45:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733305555; x=1764841555; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=n6zwHepKbRf5/3ZnZR0N3mY1uEkKCDIebTyxkj4ZclQ=; b=SaqHuqm0bVkZZZPE9wJrHecXHbRXQP0O66x/MDEmkpdjAcyK1ird8/jE bQW3RB6B2moICk386f8YgcrYS7fN/goTIdc0VwOPXFT3E9PkZVvYcYUMb GApVfBCh+fgpCTP59gEhJ9GxI3uIcR9SnTOWK02mG6N6Jk/UqXC+N6CfY t02L/pHSC9MsC3nLCXGXDXW5PF/QuZuxJB+76mkQaoA8VMpdzU8QSiWz7 rhTv9Hp/Ni7U/C/wfQ863UzUvQcLYwZBZViBtMuk3KlORkwZtui1FwgPO CQQfYHoyB+8cZg61sxPq1Ptw9EFM6w3RezVa1pD5vIxmQPC0LQUQ7Y3pn A==; X-CSE-ConnectionGUID: 6t44XswdQMuHxbt4GnjQqw== X-CSE-MsgGUID: ptG8kY1ySfeeWFI47ytlEg== X-IronPort-AV: E=McAfee;i="6700,10204,11275"; a="58965610" X-IronPort-AV: E=Sophos;i="6.12,207,1728975600"; d="scan'208";a="58965610" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2024 01:45:53 -0800 X-CSE-ConnectionGUID: wDy6S1n7QuCdjutUPO2FUw== X-CSE-MsgGUID: ioEoaL/fTvagCNQsALtBbw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,207,1728975600"; d="scan'208";a="98785398" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by orviesa004.jf.intel.com with ESMTP; 04 Dec 2024 01:45:53 -0800 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v3 0/1] Rewrite devbind Date: Wed, 4 Dec 2024 09:45:49 +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 (1): usertools/devbind: replace devbind usertools/dpdk-devbind-new.py | 995 ------------------- usertools/dpdk-devbind.py | 1683 ++++++++++++++++++--------------- 2 files changed, 913 insertions(+), 1765 deletions(-) delete mode 100755 usertools/dpdk-devbind-new.py -- 2.43.5