From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH 32/39] eal: clarify docs on params taking lcore IDs
Date: Tue, 21 Jul 2026 10:45:40 +0100 [thread overview]
Message-ID: <20260721094555.2188496-33-bruce.richardson@intel.com> (raw)
In-Reply-To: <20260721094555.2188496-1-bruce.richardson@intel.com>
The documentation doesn't make clear how the parameters to service core
and main lcore EAL flags relate to the regular --lcores parameter when
mapping lcores to physical CPU ids.
For example, when looking to add service cores to process run using the
command "/path/to/app -R -l 40-50", it's not clear whether the service
cores list parameter should be "-S 49-50" i.e. physical CPU ids, or "-S
9-10" i.e. logical lcore IDs. Update the docs to make it clear its the
latter.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
doc/guides/linux_gsg/eal_args.include.rst | 38 +++++++++++++++++++++--
lib/eal/common/eal_option_list.h | 6 ++--
2 files changed, 38 insertions(+), 6 deletions(-)
diff --git a/doc/guides/linux_gsg/eal_args.include.rst b/doc/guides/linux_gsg/eal_args.include.rst
index 32c24c8e41..33281ecec3 100644
--- a/doc/guides/linux_gsg/eal_args.include.rst
+++ b/doc/guides/linux_gsg/eal_args.include.rst
@@ -89,13 +89,45 @@ Lcore-related options
and the use of ``()`` for core groupings,
are not allowed when ``-R`` or ``--remap-lcore-ids`` is also used.
-* ``--main-lcore <core ID>``
+* ``--main-lcore <lcore ID>``
- Core ID that is used as main.
+ Set the lcore ID to use for the main thread.
+ The value is a DPDK lcore ID, not a physical CPU ID,
+ and must be present in the enabled lcore set (as configured by ``-l``/``--lcores``).
+
+ In the simple case, without any explicit lcore-to-CPU mapping,
+ lcore IDs equal physical CPU IDs so the distinction does not matter.
+ The two differ when ``-R``/``--remap-lcore-ids`` assigns sequential lcore IDs to higher-numbered physical CPUs,
+ or when the ``@`` mapping syntax in ``--lcores`` is used.
+ In those cases the lcore ID must be specified here, not the physical CPU ID.
+
+ Example using ``--lcores`` explicit mapping:
+ ``--lcores=1@31,2@32,3@33 --main-lcore 2`` selects the thread with lcore ID 2,
+ running on physical CPU 32, as the main thread.
+
+ Example using ``-R`` remapping:
+ ``-l 31-33 -R --main-lcore 1`` starts three threads on physical CPUs 31, 32 and 33, remapped to lcore IDs 0, 1 and 2.
+ ``--main-lcore 1`` selects the thread remapped to lcore ID 1, which runs on physical CPU 32.
* ``-S, --service-corelist <service core list>``
- List of cores to be used as service cores.
+ List of lcore IDs to be used as service cores.
+ The list format is the same as for ``-l``/``--lcores``:
+ a comma-separated set of lcore IDs or ranges (e.g. ``2,3`` or ``2-5``).
+ Each specified lcore ID must be present in the enabled lcore set.
+
+ The values are lcore IDs, not physical CPU IDs.
+ In the simple case, without any explicit lcore-to-CPU mapping, the two are equal so the distinction does not matter.
+ When using ``-R``/``--remap-lcore-ids`` or the ``@`` mapping syntax in ``--lcores``, lcore IDs and physical CPU IDs differ,
+ and the lcore IDs must be used here.
+
+ Example using ``--lcores`` explicit mapping:
+ ``--lcores=1@31,2@32,3@33 -S 2,3`` assigns the threads with
+ lcore IDs 2 and 3 (running on physical CPUs 32 and 33) as service cores.
+
+ Example using ``-R`` remapping:
+ ``-l 31-33 -R -S 1,2`` starts three threads on physical CPUs 31, 32 and 33, remapped to lcore IDs 0, 1 and 2.
+ ``-S 1,2`` assigns the threads with lcore IDs 1 and 2 (running on physical CPUs 32 and 33) as service cores.
Device-related options
diff --git a/lib/eal/common/eal_option_list.h b/lib/eal/common/eal_option_list.h
index b72f243cc6..2b94e4f22f 100644
--- a/lib/eal/common/eal_option_list.h
+++ b/lib/eal/common/eal_option_list.h
@@ -47,7 +47,7 @@ BOOL_ARG("--legacy-mem", NULL, "Enable legacy memory behavior", legacy_mem)
OPT_STR_ARG("--log-color", NULL, "Enable/disable color in log output", log_color)
LIST_ARG("--log-level", NULL, "Log level for loggers; use log-level=help for list of log types and levels", log_level)
OPT_STR_ARG("--log-timestamp", NULL, "Enable/disable timestamp in log output", log_timestamp)
-STR_ARG("--main-lcore", NULL, "Select which core to use for the main thread", main_lcore)
+STR_ARG("--main-lcore", NULL, "Lcore ID to use for the main thread", main_lcore)
STR_ARG("--mbuf-pool-ops-name", NULL, "User defined mbuf default pool ops name", mbuf_pool_ops_name)
STR_ARG("--memory-channels", "-n", "Number of memory channels per socket", memory_channels)
STR_ARG("--memory-ranks", "-r", "Force number of memory ranks (don't detect)", memory_ranks)
@@ -61,8 +61,8 @@ BOOL_ARG("--no-telemetry", NULL, "Disable telemetry", no_telemetry)
LIST_ARG("--pagesz-mem", NULL, "Memory allocation per hugepage size (format: <pagesz>:<limit>, e.g. 2M:32G). Repeat option for multiple page sizes.", pagesz_mem)
STR_ARG("--proc-type", NULL, "Type of process (primary|secondary|auto)", proc_type)
OPT_STR_ARG("--remap-lcore-ids", "-R", "Remap lcore IDs to be contiguous starting from 0, or supplied value", remap_lcore_ids)
-STR_ARG("--service-corelist", "-S", "List of cores to use for service threads", service_corelist)
-STR_ARG("--service-coremask", "-s", "[Deprecated] Bitmask of cores to use for service threads", service_coremask)
+STR_ARG("--service-corelist", "-S", "List of lcore IDs to use for service threads", service_corelist)
+STR_ARG("--service-coremask", "-s", "[Deprecated] Bitmask of lcore IDs to use for service threads", service_coremask)
BOOL_ARG("--single-file-segments", NULL, "Store all pages within single files (per-page-size, per-node)", single_file_segments)
BOOL_ARG("--telemetry", NULL, "Enable telemetry", telemetry)
LIST_ARG("--vdev", NULL, "Add a virtual device to the system; format=<driver><id>[,key=val,...]", vdev)
--
2.53.0
next prev parent reply other threads:[~2026-07-21 9:49 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 16:57 [RFC PATCH 00/44] Allow intitializing EAL without argc/argv Bruce Richardson
2026-04-29 16:57 ` [RFC PATCH 01/44] eal: define new functionally distinct config structs Bruce Richardson
2026-04-29 19:03 ` Stephen Hemminger
2026-04-30 7:56 ` Bruce Richardson
2026-04-29 16:57 ` [RFC PATCH 02/44] eal: move memory request fields to user config Bruce Richardson
2026-04-29 16:57 ` [RFC PATCH 03/44] eal: move NUMA " Bruce Richardson
2026-04-29 16:57 ` [RFC PATCH 04/44] eal: move hugepage policy " Bruce Richardson
2026-04-29 16:57 ` [RFC PATCH 05/44] eal: move process " Bruce Richardson
2026-04-29 16:57 ` [RFC PATCH 06/44] eal: move advanced user config options to user cfg struct Bruce Richardson
2026-04-29 16:57 ` [RFC PATCH 07/44] eal: move hugepage size info to platform info struct Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 08/44] telemetry: make cpuset init parameter const Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 09/44] eal: move runtime state to appropriate structure Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 10/44] eal: record details of all cpus in platform info Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 11/44] eal: use platform info for lcore lookups Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 12/44] eal: add RTE_CPU_FFS macro Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 13/44] eal: store lcore configuration in runtime data Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 14/44] eal: cleanup CPU init function Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 15/44] eal: move numa node information to platform info struct Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 16/44] eal: move lcore role and count to runtime state Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 17/44] eal: make lcore role a field in lcore config struct Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 18/44] eal: move main lcore setting to runtime " Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 19/44] eal: move iova mode and process type to runtime cfg Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 20/44] eal: move memory config pointer to runtime state struct Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 21/44] eal: remove rte_config structure Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 22/44] eal: separate runtime state update from arg parsing Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 23/44] eal: move devopt_list staging list into user_cfg Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 24/44] eal: separate plugin paths from loaded plugin objects Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 25/44] eal: simplify internal driver path iteration APIs Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 26/44] eal: move trace config into user config struct Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 27/44] eal: record service cores in " Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 28/44] eal: store user-provided lcore info " Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 29/44] eal: clarify docs on params taking lcore IDs Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 30/44] eal: remove internal config reset function Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 31/44] eal: move functions setting runtime state Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 32/44] eal: initialize platform info on first use Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 33/44] eal: remove duplicated scan of sysfs for hugepage details Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 34/44] eal: add utilities for working with user config struct Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 35/44] eal: split EAL init into two stages Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 36/44] eal: provide hooks for init with externally supplied config Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 37/44] eal_cfg: add new library to programmatically init DPDK Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 38/44] eal_cfg: configure defaults for easier testing and use Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 39/44] app/test: enable testing init using EAL config lib Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 40/44] eal_cfg: add basic setters and getters Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 41/44] eal_cfg: add hugepage memory configuration Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 42/44] eal_cfg: support configuring lcores Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 43/44] eal_cfg: support device and driver lists Bruce Richardson
2026-04-29 16:58 ` [RFC PATCH 44/44] eal_cfg: add APIs for configuring remaining init settings Bruce Richardson
2026-04-29 21:40 ` [RFC PATCH 00/44] Allow intitializing EAL without argc/argv Stephen Hemminger
2026-04-29 22:04 ` Stephen Hemminger
2026-04-30 8:00 ` Bruce Richardson
2026-07-21 9:45 ` [PATCH 00/39] Rework EAL configuration Bruce Richardson
2026-07-21 9:45 ` [PATCH 01/39] telemetry: make cpuset init parameter const Bruce Richardson
2026-07-21 9:45 ` [PATCH 02/39] argparse: check for range overflow in CPU lists Bruce Richardson
2026-07-21 9:45 ` [PATCH 03/39] eal: define new functionally distinct config structs Bruce Richardson
2026-07-27 18:03 ` Stephen Hemminger
2026-07-21 9:45 ` [PATCH 04/39] eal: move memory request fields to user config Bruce Richardson
2026-07-21 9:45 ` [PATCH 05/39] eal: move NUMA " Bruce Richardson
2026-07-21 9:45 ` [PATCH 06/39] eal: move hugepage policy " Bruce Richardson
2026-07-21 9:45 ` [PATCH 07/39] eal: move process " Bruce Richardson
2026-07-21 9:45 ` [PATCH 08/39] eal: move hugepage limit fields to new config structs Bruce Richardson
2026-07-21 9:45 ` [PATCH 09/39] eal: move advanced user config options to user cfg struct Bruce Richardson
2026-07-21 9:45 ` [PATCH 10/39] eal: move hugepage size info to platform info struct Bruce Richardson
2026-07-21 9:45 ` [PATCH 11/39] eal: move runtime state to appropriate structure Bruce Richardson
2026-07-21 9:45 ` [PATCH 12/39] eal: record details of all cpus in platform info Bruce Richardson
2026-07-21 9:45 ` [PATCH 13/39] eal: use platform info for lcore lookups Bruce Richardson
2026-07-21 9:45 ` [PATCH 14/39] eal: add macro for lowest set CPU bit in a set Bruce Richardson
2026-07-21 9:45 ` [PATCH 15/39] eal: store lcore configuration in runtime data Bruce Richardson
2026-07-21 9:45 ` [PATCH 16/39] eal: move core indices bitset to runtime state Bruce Richardson
2026-07-21 9:45 ` [PATCH 17/39] eal: cleanup CPU init function Bruce Richardson
2026-07-21 9:45 ` [PATCH 18/39] eal: move NUMA node information to platform info struct Bruce Richardson
2026-07-21 9:45 ` [PATCH 19/39] eal: move lcore role and count to runtime state Bruce Richardson
2026-07-21 9:45 ` [PATCH 20/39] eal: make lcore role a field in lcore config struct Bruce Richardson
2026-07-21 9:45 ` [PATCH 21/39] eal: move main lcore setting to runtime " Bruce Richardson
2026-07-21 9:45 ` [PATCH 22/39] eal: move IOVA mode and process type to runtime cfg Bruce Richardson
2026-07-21 9:45 ` [PATCH 23/39] eal: move memory config pointer to runtime state struct Bruce Richardson
2026-07-21 9:45 ` [PATCH 24/39] eal: remove rte_config structure Bruce Richardson
2026-07-21 9:45 ` [PATCH 25/39] eal: separate runtime state update from arg parsing Bruce Richardson
2026-07-21 9:45 ` [PATCH 26/39] eal: move device options staging list into user cfg Bruce Richardson
2026-07-21 9:45 ` [PATCH 27/39] eal: separate plugin paths from loaded plugin objects Bruce Richardson
2026-07-21 9:45 ` [PATCH 28/39] eal: simplify internal driver path iteration APIs Bruce Richardson
2026-07-21 9:45 ` [PATCH 29/39] eal: move trace config into user config struct Bruce Richardson
2026-07-21 9:45 ` [PATCH 30/39] eal: record service cores in " Bruce Richardson
2026-07-21 9:45 ` [PATCH 31/39] eal: store user-provided lcore info " Bruce Richardson
2026-07-21 9:45 ` Bruce Richardson [this message]
2026-07-21 9:45 ` [PATCH 33/39] eal: remove internal config reset function Bruce Richardson
2026-07-21 9:45 ` [PATCH 34/39] eal: move functions setting runtime state Bruce Richardson
2026-07-21 9:45 ` [PATCH 35/39] eal: initialize platform info on first use Bruce Richardson
2026-07-21 9:45 ` [PATCH 36/39] eal: remove duplicated scan of sysfs for hugepage details Bruce Richardson
2026-07-21 9:45 ` [PATCH 37/39] eal: add utilities for working with user config struct Bruce Richardson
2026-07-21 9:45 ` [PATCH 38/39] eal: split EAL init into two stages Bruce Richardson
2026-07-21 9:45 ` [PATCH 39/39] eal: provide hooks for init with externally supplied config Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260721094555.2188496-33-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.