DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] argparse additions and rework
@ 2025-05-27  9:21 Bruce Richardson
  2025-05-27  9:21 ` [PATCH 1/3] argparse: add support for string and boolean args Bruce Richardson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Bruce Richardson @ 2025-05-27  9:21 UTC (permalink / raw)
  To: dev; +Cc: Chengwen Feng, Bruce Richardson

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.

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               | 235 ++++++++++++++-----------
 doc/guides/rel_notes/release_25_07.rst |  49 ++++++
 examples/dma/dmafwd.c                  |  20 +--
 examples/flow_filtering/main.c         |   4 +-
 lib/argparse/rte_argparse.c            | 184 ++++++++++++-------
 lib/argparse/rte_argparse.h            |  91 +++++-----
 6 files changed, 352 insertions(+), 231 deletions(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-29 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-27  9:21 [PATCH 0/3] argparse additions and rework Bruce Richardson
2025-05-27  9:21 ` [PATCH 1/3] argparse: add support for string and boolean args Bruce Richardson
2025-05-27  9:21 ` [PATCH 2/3] argparse: make argparse EAL-args compatible Bruce Richardson
2025-05-27  9:21 ` [PATCH 3/3] argparse: use enums to remove max-value defines in lists Bruce Richardson
2025-05-29 15:09 ` [PATCH 0/3] argparse additions and rework Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).