Skip to content

Rework EAL configuration

Bruce Richardson dpdk-dev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest39 patches 0 repliesNew
  2. v139 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/39telemetry: make cpuset init parameter constlib/telemetry/telemetry.c lib/telemetry/telemetry_internal.h+3 -30 replies
2/39argparse: check for range overflow in CPU listsapp/test/test_argparse.c lib/argparse/rte_argparse.c+15 -00 replies
3/39eal: define new functionally distinct config structslib/eal/common/eal_common_config.c lib/eal/common/eal_internal_cfg.h+59 -00 replies
4/39eal: move memory request fields to user configlib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_memory.c lib/eal/common/eal_common_options.c +7 more+74 -430 replies
5/39eal: move NUMA request fields to user configlib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h +5 more+38 -430 replies
6/39eal: move hugepage policy fields to user configlib/eal/common/eal_common_config.c lib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_options.c +9 more+68 -610 replies
7/39eal: move process policy fields to user configlib/eal/common/eal_common_config.c lib/eal/common/eal_common_dev.c lib/eal/common/eal_common_fbarray.c +13 more+138 -1690 replies
8/39eal: move hugepage limit fields to new config structslib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h +1 more+32 -260 replies
9/39eal: move advanced user config options to user cfg structlib/eal/common/eal_common_bus.c lib/eal/common/eal_common_config.c lib/eal/common/eal_common_dynmem.c +16 more+168 -2240 replies
10/39eal: move hugepage size info to platform info structlib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h +11 more+130 -1570 replies
11/39eal: move runtime state to appropriate structurelib/eal/common/eal_common_config.c lib/eal/common/eal_common_mcfg.c lib/eal/common/eal_common_memzone.c +8 more+29 -550 replies
12/39eal: record details of all cpus in platform infolib/eal/common/eal_common_lcore.c lib/eal/common/eal_internal_cfg.h lib/eal/common/eal_private.h +3 more+101 -70 replies
13/39eal: use platform info for lcore lookupslib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_thread.c lib/eal/common/eal_private.h+46 -380 replies
14/39eal: add macro for lowest set CPU bit in a setlib/eal/freebsd/include/rte_os.h lib/eal/linux/include/rte_os.h lib/eal/windows/include/rte_os.h +1 more+23 -00 replies
15/39eal: store lcore configuration in runtime datalib/eal/common/eal_common_launch.c lib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_options.c +9 more+147 -1270 replies
16/39eal: move core indices bitset to runtime statelib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h +1 more+15 -130 replies
17/39eal: cleanup CPU init functionlib/eal/common/eal_common_lcore.c+25 -670 replies
18/39eal: move NUMA node information to platform info structlib/eal/common/eal_common_lcore.c lib/eal/common/eal_internal_cfg.h lib/eal/common/eal_private.h+45 -180 replies
19/39eal: move lcore role and count to runtime statelib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h +2 more+51 -580 replies
20/39eal: make lcore role a field in lcore config structlib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h +1 more+31 -310 replies
21/39eal: move main lcore setting to runtime config structlib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_options.c +7 more+38 -420 replies
22/39eal: move IOVA mode and process type to runtime cfglib/eal/common/eal_common_config.c lib/eal/common/eal_common_mcfg.c lib/eal/common/eal_internal_cfg.h +4 more+17 -240 replies
23/39eal: move memory config pointer to runtime state structlib/eal/common/eal_common_config.c lib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_mcfg.c +19 more+138 -1310 replies
24/39eal: remove rte_config structurelib/eal/common/eal_common_config.c lib/eal/common/eal_private.h lib/eal/freebsd/eal.c +3 more+24 -490 replies
25/39eal: separate runtime state update from arg parsinglib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+39 -540 replies
26/39eal: move device options staging list into user cfglib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h+21 -150 replies
27/39eal: separate plugin paths from loaded plugin objectslib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h+158 -1120 replies
28/39eal: simplify internal driver path iteration APIsapp/test/process.h lib/eal/common/eal_common_options.c lib/eal/include/rte_eal.h+31 -680 replies
29/39eal: move trace config into user config structlib/eal/common/eal_common_options.c lib/eal/common/eal_common_trace.c lib/eal/common/eal_common_trace_utils.c +6 more+87 -1370 replies
30/39eal: record service cores in user config structlib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h+46 -1120 replies
31/39eal: store user-provided lcore info in user config structlib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h lib/eal/freebsd/eal.c +2 more+109 -540 replies
32/39eal: clarify docs on params taking lcore IDsdoc/guides/linux_gsg/eal_args.include.rst lib/eal/common/eal_option_list.h+38 -60 replies
33/39eal: remove internal config reset functionlib/eal/common/eal_common_config.c lib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h +2 more+26 -790 replies
34/39eal: move functions setting runtime statelib/eal/common/eal_common_config.c lib/eal/common/eal_common_options.c lib/eal/common/eal_options.h +4 more+221 -1700 replies
35/39eal: initialize platform info on first uselib/eal/common/eal_common_config.c lib/eal/common/eal_common_dynmem.c lib/eal/common/eal_common_lcore.c +14 more+377 -1580 replies
36/39eal: remove duplicated scan of sysfs for hugepage detailslib/eal/common/eal_internal_cfg.h lib/eal/freebsd/eal_hugepage_info.c lib/eal/linux/eal_hugepage_info.c +1 more+51 -1080 replies
37/39eal: add utilities for working with user config structlib/eal/common/eal_common_options.c lib/eal/common/eal_internal_cfg.h+153 -110 replies
38/39eal: split EAL init into two stageslib/eal/common/eal_common_options.c lib/eal/common/eal_options.h lib/eal/freebsd/eal.c +2 more+149 -870 replies
39/39eal: provide hooks for init with externally supplied configlib/eal/common/eal_common_config.c lib/eal/common/eal_common_lcore.c lib/eal/common/eal_common_thread.c +9 more+183 -240 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 00/39] Rework EAL configuration

This patchset reworks how configuration is stored and managed in EAL. The existing "internal_config", "rte_config", "lcore_config" structures, which sometimes have arbitrary separation between them (especially the first two) are replaced by three new structures with clearly defined roles:

- eal_platform_info - contains the raw HW info for the system, details of CPUs and hugepage mounts. This is initialized on first use - even before EAL init is called - and is then immutable, since our HW should not change much underneath us. Its early availability means that it can be used to sanity check the contents of the other structs as they are being built up.

- eal_user_cfg - contains the config settings passed in by the user. For existing rte_eal_init, this is built up in the arg parse stage, and it's contents verified against the platform info, e.g. to check core masks are valid etc. Once argument parsing is completed, is also immutable.

- runtime_cfg - basically all the runtime settings that need to be there for DPDK to run, or which change over time. Largely combined content of the old rte_config, internal_config and lcore_config structs. This is initialized from the other two structs by eal initialization and can be modified by EAL at any time.

Once that is done, we have a clean separation between user provided configuration and the rest of EAL, we can split EAL init into two parts, the first of which parses cmdline arguments and then calls the second which takes the eal_user_cfg struct result of that parse and does the actual initialization. The longer-term objective is to have other first-stage functions that prepare the user_cfg struct for initialization, so that we can move away from argc/argv as the only method of configuring DPDK initialization.

v2: minor rework following AI review.

Bruce Richardson (39):
telemetry: make cpuset init parameter const
argparse: check for range overflow in CPU lists
eal: define new functionally distinct config structs
eal: move memory request fields to user config
eal: move NUMA request fields to user config
eal: move hugepage policy fields to user config
eal: move process policy fields to user config
eal: move hugepage limit fields to new config structs
eal: move advanced user config options to user cfg struct
eal: move hugepage size info to platform info struct
eal: move runtime state to appropriate structure
eal: record details of all cpus in platform info
eal: use platform info for lcore lookups
eal: add macro for lowest set CPU bit in a set
eal: store lcore configuration in runtime data
eal: move core indices bitset to runtime state
eal: cleanup CPU init function
eal: move NUMA node information to platform info struct
eal: move lcore role and count to runtime state
eal: make lcore role a field in lcore config struct
eal: move main lcore setting to runtime config struct
eal: move IOVA mode and process type to runtime cfg
eal: move memory config pointer to runtime state struct
eal: remove rte_config structure
eal: separate runtime state update from arg parsing
eal: move device options staging list into user cfg
eal: separate plugin paths from loaded plugin objects
eal: simplify internal driver path iteration APIs
eal: move trace config into user config struct
eal: record service cores in user config struct
eal: store user-provided lcore info in user config struct
eal: clarify docs on params taking lcore IDs
eal: remove internal config reset function
eal: move functions setting runtime state
eal: initialize platform info on first use
eal: remove duplicated scan of sysfs for hugepage details
eal: add utilities for working with user config struct
eal: split EAL init into two stages
eal: provide hooks for init with externally supplied config

 app/test/process.h                        |   4 +-
 app/test/test_argparse.c                  |  10 +
 doc/guides/linux_gsg/eal_args.include.rst |  38 +-
 lib/argparse/rte_argparse.c               |   5 +
 lib/eal/common/eal_common_bus.c           |   4 +-
 lib/eal/common/eal_common_config.c        | 267 ++++++-
 lib/eal/common/eal_common_dev.c           |  10 +-
 lib/eal/common/eal_common_dynmem.c        |  70 +-
 lib/eal/common/eal_common_fbarray.c       |  10 +-
 lib/eal/common/eal_common_launch.c        |  25 +-
 lib/eal/common/eal_common_lcore.c         | 267 ++++---
 lib/eal/common/eal_common_mcfg.c          |  44 +-
 lib/eal/common/eal_common_memalloc.c      |   5 +-
 lib/eal/common/eal_common_memory.c        | 104 ++-
 lib/eal/common/eal_common_memzone.c       |  24 +-
 lib/eal/common/eal_common_options.c       | 899 ++++++++--------------
 lib/eal/common/eal_common_proc.c          |  43 +-
 lib/eal/common/eal_common_tailqs.c        |   6 +-
 lib/eal/common/eal_common_thread.c        |  67 +-
 lib/eal/common/eal_common_timer.c         |   2 +-
 lib/eal/common/eal_common_trace.c         |  30 +-
 lib/eal/common/eal_common_trace_utils.c   | 104 ---
 lib/eal/common/eal_hugepages.h            |   8 +
 lib/eal/common/eal_internal_cfg.h         | 385 +++++++--
 lib/eal/common/eal_memcfg.h               |   3 +
 lib/eal/common/eal_option_list.h          |   6 +-
 lib/eal/common/eal_options.h              |   8 +-
 lib/eal/common/eal_private.h              | 121 ++-
 lib/eal/common/eal_trace.h                |  11 -
 lib/eal/common/malloc_elem.c              |  15 +-
 lib/eal/common/malloc_heap.c              |  41 +-
 lib/eal/common/malloc_mp.c                |   2 +-
 lib/eal/common/rte_malloc.c               |  14 +-
 lib/eal/common/rte_service.c              |  17 +-
 lib/eal/freebsd/eal.c                     | 291 ++++---
 lib/eal/freebsd/eal_hugepage_info.c       |  78 +-
 lib/eal/freebsd/eal_lcore.c               |  16 +-
 lib/eal/freebsd/eal_memory.c              |  46 +-
 lib/eal/freebsd/include/rte_os.h          |   2 +
 lib/eal/include/rte_eal.h                 |  35 +-
 lib/eal/include/rte_memzone.h             |  10 +-
 lib/eal/include/rte_tailq.h               |   2 +-
 lib/eal/linux/eal.c                       | 297 ++++---
 lib/eal/linux/eal_hugepage_info.c         | 231 +++---
 lib/eal/linux/eal_lcore.c                 |  43 ++
 lib/eal/linux/eal_memalloc.c              | 168 ++--
 lib/eal/linux/eal_memory.c                | 168 ++--
 lib/eal/linux/eal_timer_hpet.c            |  21 +-
 lib/eal/linux/eal_vfio.c                  |  11 +-
 lib/eal/linux/include/rte_os.h            |  10 +
 lib/eal/unix/eal_unix_thread.c            |  11 +-
 lib/eal/windows/eal.c                     | 197 +++--
 lib/eal/windows/eal_hugepages.c           |  60 +-
 lib/eal/windows/eal_lcore.c               |   6 +
 lib/eal/windows/eal_memalloc.c            |  37 +-
 lib/eal/windows/eal_memory.c              |  14 +-
 lib/eal/windows/eal_thread.c              |  11 +-
 lib/eal/windows/eal_windows.h             |   8 -
 lib/eal/windows/include/rte_os.h          |   1 +
 lib/eal/windows/include/sched.h           |  10 +
 lib/telemetry/telemetry.c                 |   4 +-
 lib/telemetry/telemetry_internal.h        |   2 +-
 62 files changed, 2511 insertions(+), 1948 deletions(-)

--
2.53.0