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 4692945E06; Mon, 2 Dec 2024 16:09:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA56A402B7; Mon, 2 Dec 2024 16:09:39 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by mails.dpdk.org (Postfix) with ESMTP id 9B3EA400D6 for ; Mon, 2 Dec 2024 16:09:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733152179; x=1764688179; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=b/qmtMTTd0JYOiTWXFBwMRMR7ZdE7GSN3vU+fZMlBAI=; b=bya4JkVnhyMq6+fASqNcxKwARHI6BsgMuGxmdA/DhPTaoCnV2K5K9plW kSYboOWflvGZ7oC7Es4d7Wf3yEPDdZLuZw5Iuy28TQsOMzgpPXRpZoHN1 L9yr0KvZaioqYHIWecenMjhpK2zVatoljZLIR7KV1U979Wx4FBYQMz1O8 AuTZ/JgB5/u4kYRcYmWlO+TdFkWIn7HCb4eP9sTwl9rYa4C8Lb+nMa4J7 CYwZv3fnJwTAHD8PyV9I+Deqjnmkc/2/5ouA060JxUzIGuKJVL0o4CoJb Fb88SMrLW3VMRO8r1P+7HBCCJKjDMTCPgsACLoew6p6caACBOC4ng87i1 g==; X-CSE-ConnectionGUID: DxqV9gqzSKubCZeY1crh5Q== X-CSE-MsgGUID: lALD9/ZCQEW8Mtlycxacyg== X-IronPort-AV: E=McAfee;i="6700,10204,11274"; a="33459121" X-IronPort-AV: E=Sophos;i="6.12,202,1728975600"; d="scan'208";a="33459121" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2024 07:09:38 -0800 X-CSE-ConnectionGUID: MtMX6PKkTlavONkaReXshw== X-CSE-MsgGUID: 1BCK1FnOT3mBzt0iDJ54+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,202,1728975600"; d="scan'208";a="124069539" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa001.fm.intel.com with ESMTP; 02 Dec 2024 07:09:36 -0800 From: Anatoly Burakov To: dev@dpdk.org Subject: [PATCH v1 0/1] Rewrite devbind Date: Mon, 2 Dec 2024 15:09:33 +0000 Message-ID: X-Mailer: git-send-email 2.43.5 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. 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/ Anatoly Burakov (1): usertools/devbind: update coding style usertools/dpdk-devbind.py | 1736 +++++++++++++++++++++---------------- 1 file changed, 968 insertions(+), 768 deletions(-) -- 2.43.5