[PATCH v2 0/3] argparse additions and rework
fengchengwen
fengchengwen at huawei.com
Wed Jun 4 03:37:10 CEST 2025
Thanks for this patchset, Bruce.
Series-acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 2025/6/3 23:32, Bruce Richardson wrote:
> 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.
>
> v2: minor changes to patch 2 (see log at end of that patch)
>
> 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/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 | 94 +++++-----
> 6 files changed, 355 insertions(+), 226 deletions(-)
>
> --
> 2.48.1
>
More information about the dev
mailing list