Skip to content

Bruce Richardson dpdk-dev 11 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest21 patches 15 repliesIn review
  2. v1021 patches 2 repliesSuperseded
  3. v918 patches 5 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v818 patches4 repliesSuperseded
v713 patches11 repliesSuperseded
v69 patches2 repliesSuperseded
v59 patches0 repliesSuperseded
v49 patches0 repliesSuperseded
v39 patches6 repliesSuperseded
v2 RFC5 patches6 repliesSuperseded
v1 RFC7 patches1 replySuperseded

Changes in v11 from the cover letter

* fix issues flagged by unit tests in CI and subsequent testing:
- when passing in an lcore >= MAX_LCORES, return error rather than ignoring it. (compatibility issue)
- return error when an invalid lcore set of "1-3-5" is passed in, rather than just treating it as "3-5".

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21build: add define for the OS environment nameconfig/meson.build doc/guides/contributing/design.rst+2 -11 reply
2/21test/func_reentrancy: fix args to EAL init callapp/test/test_func_reentrancy.c+3 -22 replies
3/21argparse: export function to print help text for objectlib/argparse/rte_argparse.c lib/argparse/rte_argparse.h+36 -211 reply
4/21argparse: allow user-override of help printingdoc/guides/prog_guide/argparse_lib.rst doc/guides/rel_notes/release_25_11.rst lib/argparse/rte_argparse.c +1 more+33 -21 reply
5/21argparse: add documentation on supported value typesdoc/guides/prog_guide/argparse_lib.rst+71 -23 replies
6/21argparse: add support for parsing core listsapp/test/test_argparse.c doc/guides/prog_guide/argparse_lib.rst lib/argparse/rte_argparse.c +1 more+294 -01 reply
7/21argparse: allow optional flag reorderingapp/test/test_argparse.c doc/guides/prog_guide/argparse_lib.rst lib/argparse/rte_argparse.c +1 more+453 -80 replies
8/21argparse: support parameters to short options without "="app/test/test_argparse.c lib/argparse/rte_argparse.c+137 -41 reply
9/21eal: add long options for each short optiondoc/guides/linux_gsg/eal_args.include.rst lib/eal/common/eal_common_options.c lib/eal/common/eal_options.h+32 -121 reply
10/21eal: define the EAL parameters in argparse formatlib/eal/common/eal_common_options.c lib/eal/common/eal_option_list.h lib/eal/meson.build +1 more+231 -41 reply
11/21eal: gather EAL args before processinglib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/common/eal_private.h +3 more+485 -10721 reply
12/21eal: ensure proper cleanup on EAL init failurelib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+137 -1210 replies
13/21eal: combine parameter validation checkslib/eal/common/eal_common_memory.c lib/eal/common/eal_common_options.c lib/eal/common/eal_options.h +2 more+106 -2730 replies
14/21eal: simplify handling of conflicting cmdline optionslib/eal/common/eal_common_options.c+47 -720 replies
15/21eal: automatically init arg list optionslib/eal/common/eal_common_options.c lib/eal/common/eal_option_list.h+19 -180 replies
16/21eal: add internal fn for converting cpuset to stringlib/eal/common/eal_common_options.c lib/eal/common/eal_private.h+35 -80 replies
17/21eal: use common cpuset to string functionlib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_options.c lib/eal/common/eal_common_thread.c +1 more+42 -490 replies
18/21eal: introduce lcore remapping option for coremasksdrivers/event/dlb2/dlb2_priv.h drivers/event/dlb2/pf/base/dlb2_resource.c lib/eal/common/eal_common_options.c +2 more+50 -170 replies
19/21eal: rework internal coremask parsing to use cpu setsdrivers/event/dlb2/dlb2_priv.h drivers/event/dlb2/pf/base/dlb2_resource.c lib/eal/common/eal_common_options.c +2 more+19 -480 replies
20/21eal: allow lcore ID remapping with core listsdoc/guides/linux_gsg/eal_args.include.rst doc/guides/rel_notes/release_25_11.rst lib/eal/common/eal_common_options.c+59 -30 replies
21/21eal: allow lcore remapping with autodetected core affinitylib/eal/common/eal_common_options.c+67 -690 replies

Reviews trailers per patch

10 of 21 patches have a Reviewed-by or Acked-by.

PatchDavid MarchandChengwen Feng
1/21A-b
2/21R-b A-b
3/21A-b
4/21A-b
5/21A-b
6/21A-b
7/21
8/21A-b
9/21A-b
10/21A-b
11/21A-b
12/21
13/21
14/21
15/21
16/21
17/21
18/21
19/21
20/21
21/21

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

Read the v11 thread

Cover letter [PATCH v11 00/21]

The ultimate of this patchset is to make it easier to run on systems with large numbers of cores, by simplifying the process of using core numbers >RTE_MAX_LCORE. The new EAL arg ``-remap-lcore-ids``, also shortened to ``-R``, is added to DPDK to support this.

However, in order to add this new flag easily, the first dozen or more patches rework the argument handling in EAL to simplify things, using the argparse library for argument handling.

When processing cmdline arguments in DPDK, we always do so with very little context. So, for example, when processing the "-l" flag, we have no idea whether there will be later a --proc-type=secondary flag. We have all sorts of post-arg-processing checks in place to try and catch these scenarios.

To improve this situation, this patchset tries to simplify the handling of argument processing, by explicitly doing an initial pass to collate all arguments into a structure. Thereafter, the actual arg parsing is done in a fixed order, meaning that e.g. when processing the --main-lcore flag, we have already processed the service core flags. We also can far quicker and easier check for conflicting options, since they can all be checked for NULL/non-NULL in the arg structure immediately after the struct has been populated.

An additional benefit of this work is that the argument parsing for EAL is much more centralised into common options and the options list file. This single list with ifdefs makes it clear to the viewer what options are common across OS's, vs what are unix-only or linux-only.

Once the cleanup and rework is done, adding the new options for remapping cores becomes a lot simpler, since we can very easily check for scenarios like multi-process and handle those appropriately.

V11:
* fix issues flagged by unit tests in CI and subsequent testing:
- when passing in an lcore >= MAX_LCORES, return error rather than ignoring it. (compatibility issue)
- return error when an invalid lcore set of "1-3-5" is passed in, rather than just treating it as "3-5".

V10:
* add patch 2 to fix func_reentrancy test bug reported mid-way through the series.
* added patches 7 & 8 to resolve arg parsing compat issues:
- support reordering args to have non-flag parameters at the end so we can e.g. mix autotest names in with EAL args
- support having optional params with single-letter args without having to use "=" syntax, i.e. -l4 rather than -l=4
* fixed issues with the final patch when the autodetected range of cores was >RTE_MAX_LCORE

V9: rebase to latest main. CI complains cannot apply v8 patches.

V8:
* dropped the final two patches from the series, dropping the new -L option in favour of the -R modifier.
* reordered patch 11 to be with the other argparse patches (now patch 5)
* added patch 12, which uses macros to initialize the args structure from the arguments header file, avoiding potential issues when we add new args.
* simplified and consolidated lcore mask and core list parsing to always work off cpusets rather than arrays of uint8
* enhanced debug printouts to also work better with cpusets and handle core values in those sets >= RTE_MAX_LCORE
* for completeness, ensure the new -R option works for coremasks, and for cases where no explicit core-list or coremask is specified.

V7:
* expand the scope of the patchset beyond just cleanup to add in the extra 3 patches for -L and --lcoreid-base option.

V6:
* Rebase to apply cleanly on latest main

V5:
* Resubmit of V4, which didn't get sent correctly, or picked up correctly in patchwork.

V4:
* Updated patch 5 to auto-generate the arg struct definition from the same list of defines used to construct the argument list.

V3:
* Added 3 new initial patches, one for minor build-system addition, and two for functionality in argparse to allow the user-callback help function to be maintained as we move to argparse.
* Added doc updates in the first EAL patch adding the long options
* Fixed ASAN issues by adding a patch to properly clean up EAL init - both memory allocations and fixing the run-once flag
* Put ifdefs around the linux-only or unix-only options in EAL patch 2
* Updated args to handle numa-mem and numa-limit as equivalent socket-mem and socket-limit

Bruce Richardson (21):
build: add define for the OS environment name test/func_reentrancy: fix args to EAL init call
argparse: export function to print help text for object
argparse: allow user-override of help printing
argparse: add documentation on supported value types
argparse: add support for parsing core lists
argparse: allow optional flag reordering
argparse: support parameters to short options without "="
eal: add long options for each short option
eal: define the EAL parameters in argparse format
eal: gather EAL args before processing
eal: ensure proper cleanup on EAL init failure
eal: combine parameter validation checks
eal: simplify handling of conflicting cmdline options
eal: automatically init arg list options
eal: add internal fn for converting cpuset to string
eal: use common cpuset to string function
eal: introduce lcore remapping option for coremasks
eal: rework internal coremask parsing to use cpu sets
eal: allow lcore ID remapping with core lists
eal: allow lcore remapping with autodetected core affinity

 app/test/test_argparse.c                   |  702 ++++++++++
 app/test/test_func_reentrancy.c            |    5 +-
 config/meson.build                         |    1 +
 doc/guides/contributing/design.rst         |    2 +-
 doc/guides/linux_gsg/eal_args.include.rst  |   42 +-
 doc/guides/prog_guide/argparse_lib.rst     |  138 +-
 doc/guides/rel_notes/release_25_11.rst     |   18 +
 drivers/event/dlb2/dlb2_priv.h             |    2 +-
 drivers/event/dlb2/pf/base/dlb2_resource.c |   11 +-
 lib/argparse/rte_argparse.c                |  183 ++-
 lib/argparse/rte_argparse.h                |   29 +-
 lib/eal/common/eal_common_lcore.c          |   13 +-
 lib/eal/common/eal_common_memory.c         |    3 +-
 lib/eal/common/eal_common_options.c        | 1440 +++++++++++---------
 lib/eal/common/eal_common_thread.c         |   43 +-
 lib/eal/common/eal_option_list.h           |   98 ++
 lib/eal/common/eal_options.h               |  104 +-
 lib/eal/common/eal_private.h               |   21 +
 lib/eal/common/eal_thread.h                |   13 +-
 lib/eal/freebsd/eal.c                      |  245 +---
 lib/eal/include/rte_eal.h                  |   20 -
 lib/eal/linux/eal.c                        |  470 +------
 lib/eal/linux/eal_memory.c                 |    2 +-
 lib/eal/meson.build                        |    2 +-
 lib/eal/windows/eal.c                      |  156 +--
 lib/meson.build                            |    1 +
 26 files changed, 2158 insertions(+), 1606 deletions(-)
 create mode 100644 lib/eal/common/eal_option_list.h

--
2.48.1