Skip to content

argparse additions and rework

Bruce Richardson dpdk-dev 4 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest3 patches 1 replyApplied
  2. v33 patches 0 repliesSuperseded
  3. v23 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches5 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/3argparse: add support for string and boolean argsapp/test/test_argparse.c doc/guides/rel_notes/release_25_07.rst lib/argparse/rte_argparse.c +1 more+71 -10 replies
2/3argparse: make argparse EAL-args compatibleapp/test/test_argparse.c doc/guides/rel_notes/release_25_07.rst lib/argparse/rte_argparse.c +1 more+40 -230 replies
3/3argparse: use enums to remove max-value defines in listsapp/test/test_argparse.c doc/guides/prog_guide/argparse_lib.rst doc/guides/rel_notes/release_25_07.rst +4 more+283 -2320 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchChengwen Feng
1/3A-b
2/3A-b
3/3A-b

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

Read the v4 thread

Cover letter [PATCH v4 0/3] argparse additions and rework

This patchset is based off the work to adjust how we do argument parsing inside EAL. To enable argparse to be effectively used for EAL, we have new features and some changes in the first two patches, which are relatively small - though are ABI/API affecting.

These add support for saving off strings and boolean values, have argparse stop parsing at a "--", and finally have argparse return the number of arguments actually parsed on success.

The third patch is a bigger change. It was inspired by the fact that when adding the boolean and string support we had to update some "MAX" value defines used in the code. This is obviously not good from an ABI/API perspective, once the library becomes part of the stable ABI. In order to remove these MAX values, patch 3 looks to replace the #define values with enums - which means some rework splitting the various flags into separate categories, and similarly splitting the single "flags" field with separate fields specifying if an argument value is required, what type that value should have, and then a final smaller field for any additional modifiers.

v4: rebase on main to avoid CI errors

v3: additional doc updates to patch 3

v2: minor changes to patch 2

Bruce Richardson (3):
argparse: add support for string and boolean args
argparse: make argparse EAL-args compatible
argparse: use enums to remove max-value defines in lists

 app/test/test_argparse.c               | 229 ++++++++++++++-----------
 doc/guides/prog_guide/argparse_lib.rst |  36 ++--
 doc/guides/rel_notes/release_25_07.rst |  50 ++++++
 examples/dma/dmafwd.c                  |  20 +--
 examples/flow_filtering/main.c         |   4 +-
 lib/argparse/rte_argparse.c            | 184 ++++++++++++--------
 lib/argparse/rte_argparse.h            |  97 ++++++-----
 7 files changed, 379 insertions(+), 241 deletions(-)

--
2.48.1