DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v3 0/8] add new command line argument parsing library
@ 2023-12-07 16:18 Euan Bourke
  2023-12-07 16:18 ` [PATCH v3 1/8] arg_parser: new library for command line parsing Euan Bourke
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Euan Bourke @ 2023-12-07 16:18 UTC (permalink / raw)
  To: dev; +Cc: Euan Bourke

A recent thread on the mailing list[1] discussed corelist and coremask
parsing and the idea of a new library dedicated to command line parsing
was mentioned[2]. This patchset adds the library, along with the new
APIs, and edits the existing EAL, DLB2 driver and some example
application functions to use these APIs, rather than each implementing
their own copies.

The new APIs work similar to the existing functions in EAL, however
instead of filling a core array like this:
[1, -1, -1, 2, 3] (a non -1 refers to an 'active core' at that index)
It fills it like this:
[0, 3, 4] (with the value at each index being an 'active core').

The new APIs will also return the number of cores contained in the
passed corelist/coremask, so in the above example, 3 would be returned.

New in the v3, is a heuristic parser which searches for key markers in
the core string, returning a enum value based off this search to
indicate if a parameter is likely a coremask or a corelist. This
heuristic function is also wrapped in a parser function allowing
apps to handle both coremasks and corelists simultaneously.

[1] https://mails.dpdk.org/archives/dev/2023-November/280957.html
[2] https://mails.dpdk.org/archives/dev/2023-November/280966.html


v3:
* new 'combined core string parser' and 'heuristic parser'
* changes to eventdev_pipeline and l3fwd-power example applications
* various struct optimisations in arg_parser.c
* fix for windows build relating to RTE_SWAP()
* minor changes for issues flagged during review

v2:
* changes to EAL service core related parsers to call API.
* various optimisations in core_bit related functions in arg_parser.c.
* add lib to list for windows build.
* minor changes for issues flagged during review.

Euan Bourke (8):
  arg_parser: new library for command line parsing
  arg_parser: add new coremask parsing API
  eal: add support for new arg parsing library
  eal: update to service core related parsers
  event/dlb2: add new arg parsing library API support
  arg_parser: added common core string and heuristic parsers
  examples/eventdev_pipeline: update to call arg parser API
  examples/l3fwd-power: update to call arg parser API

 .mailmap                                     |   1 +
 MAINTAINERS                                  |   4 +
 doc/api/doxy-api-index.md                    |   3 +-
 doc/api/doxy-api.conf.in                     |   1 +
 drivers/event/dlb2/dlb2_priv.h               |   4 +-
 drivers/event/dlb2/pf/base/dlb2_resource.c   |  51 ++--
 examples/eventdev_pipeline/main.c            |  65 +----
 examples/eventdev_pipeline/pipeline_common.h |   1 +
 examples/l3fwd-power/perf_core.c             |  51 +---
 lib/arg_parser/arg_parser.c                  | 229 +++++++++++++++
 lib/arg_parser/meson.build                   |   7 +
 lib/arg_parser/rte_arg_parser.h              | 160 +++++++++++
 lib/arg_parser/version.map                   |  13 +
 lib/eal/common/eal_common_options.c          | 285 ++++---------------
 lib/eal/meson.build                          |   2 +-
 lib/meson.build                              |   2 +
 16 files changed, 513 insertions(+), 366 deletions(-)
 create mode 100644 lib/arg_parser/arg_parser.c
 create mode 100644 lib/arg_parser/meson.build
 create mode 100644 lib/arg_parser/rte_arg_parser.h
 create mode 100644 lib/arg_parser/version.map

-- 
2.34.1


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

end of thread, other threads:[~2023-12-11 16:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 16:18 [PATCH v3 0/8] add new command line argument parsing library Euan Bourke
2023-12-07 16:18 ` [PATCH v3 1/8] arg_parser: new library for command line parsing Euan Bourke
2023-12-07 16:44   ` Bruce Richardson
2023-12-07 19:32   ` Tyler Retzlaff
2023-12-07 16:18 ` [PATCH v3 2/8] arg_parser: add new coremask parsing API Euan Bourke
2023-12-07 16:18 ` [PATCH v3 3/8] eal: add support for new arg parsing library Euan Bourke
2023-12-07 16:18 ` [PATCH v3 4/8] eal: update to service core related parsers Euan Bourke
2023-12-07 16:18 ` [PATCH v3 5/8] event/dlb2: add new arg parsing library API support Euan Bourke
2023-12-07 16:18 ` [PATCH v3 6/8] arg_parser: added common core string and heuristic parsers Euan Bourke
2023-12-07 16:58   ` Bruce Richardson
2023-12-07 16:18 ` [PATCH v3 7/8] examples/eventdev_pipeline: update to call arg parser API Euan Bourke
2023-12-07 16:18 ` [PATCH v3 8/8] examples/l3fwd-power: " Euan Bourke
2023-12-11 12:01   ` Hunt, David
2023-12-11 16:50   ` Tummala, Sivaprasad
2023-12-07 17:34 ` [PATCH v3 0/8] add new command line argument parsing library Stephen Hemminger

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