From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id DDF0645E08;
	Mon,  2 Dec 2024 17:54:11 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 72F1240270;
	Mon,  2 Dec 2024 17:54:11 +0100 (CET)
Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com
 [209.85.214.172])
 by mails.dpdk.org (Postfix) with ESMTP id AEB624025D
 for <dev@dpdk.org>; Mon,  2 Dec 2024 17:54:10 +0100 (CET)
Received: by mail-pl1-f172.google.com with SMTP id
 d9443c01a7336-21271dc4084so34671145ad.2
 for <dev@dpdk.org>; Mon, 02 Dec 2024 08:54:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1733158449;
 x=1733763249; darn=dpdk.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:from:to:cc:subject:date
 :message-id:reply-to;
 bh=YonMwghWuh6qHTas4VSdYQUbSFupzkPOUIEBjtHbvcg=;
 b=da7ONPDpNYXKSUGrgDoeJllmBHJtmj2Vsr/gjRZy3kjem9krU8YF79pVGmi7jUa2BV
 CaAizl27SP2ZNGMNLpj5zaKdwx3XTdz+b8g7Ux1QpQWBpQMUnc+fujHF2jQrQEHAIeWQ
 4KXkArj4hHP+WhX8DJBZe8hZMTbCGxPg3v8WSuPO4PjeFA+caKlaoC+C8VmPexchQ2Gx
 TwH9sULsD5/7dA4dDfaYx65pKfPmOBHN/QVcTel8smLa0N+ozfdvHsa5mmvoiwnTyoPh
 IWpRATqg7y1ugJwY4XYf2Qcv9SMQXPA71haNO+IEYK0BgYR7BI5clj6rc9PJMCzqJ+Y0
 PNMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1733158449; x=1733763249;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=YonMwghWuh6qHTas4VSdYQUbSFupzkPOUIEBjtHbvcg=;
 b=mMZSs3bXNGGXz9+x9DHhRipqTYTzvszkynGy7T97ejO/pvXhPrpYIJqlVb6TkhRzsd
 R1ZTbuHkZCk6Dlxk+fWjT+MqSgAMm9H3WXucLGisrn3dM3MAI9xKvjlqooLVKH6qHduF
 4ugkVxnw9WVCQtYsqFV5J0NXIdCmNTFphYbiBt92ESuE9wy+ZFB8M/Oo5+G8xBxzFAsN
 daYuYErxvIuyT5QdFU+/FJumdZTxURuGNchVhfEunpBLFVgXZLb11iZw5iTwXI9u0GuF
 LkZcyykaCxYRZKMd/L18gK3m2PBGrpC7S9xy3kBhDDnm7C4gRw9stHv3jSxcnapOpTLt
 rnKQ==
X-Gm-Message-State: AOJu0Yx2JtwEKj8HiJTcIQbfO5953wriKQTiJcLADEsAH1EPRnFmPK7h
 e4w4pTiiX3qyWrrXYS+pm0eg7+JvYOFZQUVQ6ef7V9FezeGY5Jge2RpcTmPtmwQ=
X-Gm-Gg: ASbGncvDOrMMCV2WDzbDVKHyrQW4nlWrI/2HecCvsVTVy6TEMytTFa99hREoD+m6cdt
 VyCDTUFtyogoaKI6tEJ1a9woIhypnkdEIUxfk1zp08Y/wAWmdCkN+uaRSAyryTwNJZ7U0cM0XBX
 cFXVCmlGn99u2wrq84bdj2aBWI78xm+wktWutQmqUQQSY1vjcSJowYk655xgUnrXe+rlGamUQXj
 i6HyQzwB05xe6mghkqKRSxVqx3VLqup6edsa7fpaiVNFIie++zBXcV6fgd8dH8/YJ1OHd5Bgk1f
 jSvKzcbhbdgGWwUIo1KB7LnAJzQ=
X-Google-Smtp-Source: AGHT+IH7R0jUvqQ/30DCF3yGJzfP785paRHgjPe+slKVXwXHCfpnKEthx80DlqfZOCUBfmWJYyZvIA==
X-Received: by 2002:a17:903:2444:b0:215:713a:5fe5 with SMTP id
 d9443c01a7336-215713a6530mr123983325ad.34.1733158449409; 
 Mon, 02 Dec 2024 08:54:09 -0800 (PST)
Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-2155157c2cfsm50663855ad.115.2024.12.02.08.54.08
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 02 Dec 2024 08:54:09 -0800 (PST)
Date: Mon, 2 Dec 2024 08:54:07 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v1 0/1] Rewrite devbind
Message-ID: <20241202085407.39af0b74@hermes.local>
In-Reply-To: <cover.1733151400.git.anatoly.burakov@intel.com>
References: <cover.1733151400.git.anatoly.burakov@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Mon,  2 Dec 2024 15:09:33 +0000
Anatoly Burakov <anatoly.burakov@intel.com> wrote:

> 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(-)
> 

Looks good, but needs to be rebased to current 24.11