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 BC7E845E1C; Tue, 3 Dec 2024 12:25:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DE1B40272; Tue, 3 Dec 2024 12:25:08 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mails.dpdk.org (Postfix) with ESMTP id 7D47A40261 for ; Tue, 3 Dec 2024 12:25:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733225107; x=1764761107; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=frxLdHG5DD7RfnSMrt81w6JnrTPSXeopuM995uN+MrI=; b=GPxL8RzWW9CiLF69t39Fcw7/s6d9rKX7rZTsSQeTVoLbrj2ltzombptJ NCGgWDnXRP8k61v/bv+oGK3JZ66LXFinXzj8deHZU7WovXHUyxSg//FbO 6habL/Vy6h/YPaDiV67w3l3uwT1j1oOKEpBRNoEKWlnBKKf8zyiVrYzJo mg1a1QylMQOZheZzi94ZqPismhVEpPomGPVInuBmArbhk3ey5lU6LK1U+ cwe/oXDMrh+6YhZUtN5ElSJJuFjBs4ipxZgOpRRKbPxBa88/vazPz9mWi dYw+k0I1uhzlXctd0pPq6yE3e2H95wncCV8RdRxKFZYKie3lNxRguFia4 g==; X-CSE-ConnectionGUID: 6M7jT9GZRmeKfAHfU5Ksjw== X-CSE-MsgGUID: Puss+zC/ShWf5XnzDDhMAQ== X-IronPort-AV: E=McAfee;i="6700,10204,11274"; a="33582014" X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="33582014" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2024 03:25:04 -0800 X-CSE-ConnectionGUID: SxZWIm41SjOT8y74u7kr8Q== X-CSE-MsgGUID: Hwmeyhs5RzG+dIHh0jqpbg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,205,1728975600"; d="scan'208";a="93606970" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa008.fm.intel.com with ESMTP; 03 Dec 2024 03:25:03 -0800 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v2 0/2] Rewrite devbind Date: Tue, 3 Dec 2024 11:24:59 +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 usertools/dpdk-devbind.py | 1678 ++++++++++++++++++++----------------- 1 file changed, 911 insertions(+), 767 deletions(-) -- 2.43.5