Skip to content

allow easier use of high lcore-ids

Bruce Richardson dpdk-dev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 15 repliesIn review
  2. v1 RFC3 patches 0 repliesSuperseded

Changes in v2 from the cover letter

* converted printf to DEBUG log
* added "-M" as shorter version of flag
* added documentation
* renamed internal API that was changed to avoid any potential hidden runtime issues.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3eal: centralize core parameter parsinglib/eal/common/eal_common_options.c+84 -991 reply
2/3eal: convert core masks and lists to core setsdrivers/event/dlb2/dlb2_priv.h drivers/event/dlb2/pf/base/dlb2_resource.c lib/eal/common/eal_common_options.c +2 more+60 -1991 reply
3/3eal: allow automatic mapping of high lcore idsdoc/guides/linux_gsg/eal_args.include.rst drivers/event/dlb2/pf/base/dlb2_resource.c lib/eal/common/eal_common_options.c +2 more+55 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] allow easier use of high lcore-ids

Traditionally, DPDK has had a direct mapping of internal lcore-ids, to the actual core numbers in use. With higher core count servers becoming more prevalent the issue becomes one of increasing memory footprint when using such a scheme, due to the need to have all arrays dimensioned for all cores on the system, whether or not those cores are in use by the app.

Therefore, the decision was made in the past to not expand the build-time RTE_MAX_LCORE value beyond 128. Instead, it was recommended that users use the "--lcores" EAL parameter to take the high-numbered cores they wish to use and map them to lcore-ids within the 0 - 128 range. While this works, this is a little clunky as it means that instead of just passing, for example, "-l 130-139", the user must instead pass "--lcores 0@130,1@131,2@132,3@133,...."

This patchset attempts to simplify the situation by adding a new flag to do this mapping automatically. To use cores 130-139 and map them to ids 0-9 internally, the EAL args now become: "-l 130-139 --map-lcore-ids", or using the shorter "-M" version of the flag: "-Ml 130-139".

Adding this new parameter required some rework of the existing arg parsing code, because in current DPDK the args are parsed and checked in the order they appear on the commandline. This means that using the example above, the core parameter 130-139 will be rejected immediately before the "map-lcore-ids" parameter is seen. To work around this, the core (and service core) parameters are not parsed when seen, instead they are only saved off and parsed after all arguments are parsed. The "-l" and "-c" parameters are converted into "--lcores" arguments, so all assigning of lcore ids is done there in all cases.

RFC->v2:
* converted printf to DEBUG log
* added "-M" as shorter version of flag
* added documentation
* renamed internal API that was changed to avoid any potential hidden runtime issues.

Bruce Richardson (3):
eal: centralize core parameter parsing
eal: convert core masks and lists to core sets
eal: allow automatic mapping of high lcore ids

 doc/guides/linux_gsg/eal_args.include.rst  |  26 +-
 drivers/event/dlb2/dlb2_priv.h             |   2 -
 drivers/event/dlb2/pf/base/dlb2_resource.c |  48 +--
 lib/eal/common/eal_common_options.c        | 340 +++++++--------------
 lib/eal/common/eal_options.h               |   3 +
 lib/eal/include/rte_eal.h                  |  14 +-
 lib/eal/version.map                        |   2 +-
 7 files changed, 161 insertions(+), 274 deletions(-)

--
2.45.2