Skip to content

Rewrite devbind

Anatoly Burakov dpdk-dev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/22 patches 2 repliesIn review
  2. v3 posting 1/21 patch 1 replySuperseded
  3. v22 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch5 repliesSuperseded

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usertools/devbind: update coding styledoc/guides/tools/devbind.rst usertools/dpdk-devbind-new.py+1006 -00 replies
2/2usertools/devbind: replace devbindusertools/dpdk-devbind-new.py usertools/dpdk-devbind.py+913 -17650 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchStephen Hemminger
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] Rewrite devbind

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/[email protected]/

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(-)
Signature · 1 line
2.43.5