[dpdk-dev] [PATCH 02/15] eal: rename lcore word choices
Burakov, Anatoly
anatoly.burakov at intel.com
Mon Sep 14 16:40:14 CEST 2020
On 11-Sep-20 8:06 PM, Stephen Hemminger wrote:
> Replace master lcore with main lcore and
> replace slave lcore with worker lcore.
>
> Keep the old functions and macros but mark them as deprecated
> for this release.
>
> The "--master-lcore" command line option is also deprecated
> and any usage will print a warning and use "--main-lcore"
> as replacement.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> --- > doc/guides/rel_notes/deprecation.rst | 19 -------
> doc/guides/rel_notes/release_20_11.rst | 11 ++++
> lib/librte_eal/common/eal_common_dynmem.c | 8 +--
> lib/librte_eal/common/eal_common_launch.c | 36 ++++++-------
> lib/librte_eal/common/eal_common_lcore.c | 8 +--
> lib/librte_eal/common/eal_common_options.c | 54 +++++++++++---------
> lib/librte_eal/common/eal_options.h | 2 +
> lib/librte_eal/common/eal_private.h | 6 +--
> lib/librte_eal/common/rte_random.c | 2 +-
> lib/librte_eal/common/rte_service.c | 2 +-
> lib/librte_eal/freebsd/eal.c | 28 +++++-----
> lib/librte_eal/freebsd/eal_thread.c | 32 ++++++------
> lib/librte_eal/include/rte_eal.h | 4 +-
> lib/librte_eal/include/rte_eal_trace.h | 4 +-
> lib/librte_eal/include/rte_launch.h | 59 ++++++++++++----------
> lib/librte_eal/include/rte_lcore.h | 36 +++++++++----
> lib/librte_eal/linux/eal.c | 28 +++++-----
> lib/librte_eal/linux/eal_memory.c | 8 +--
> lib/librte_eal/linux/eal_thread.c | 32 ++++++------
> lib/librte_eal/rte_eal_version.map | 2 +-
> lib/librte_eal/windows/eal.c | 16 +++---
> lib/librte_eal/windows/eal_thread.c | 30 +++++------
> 22 files changed, 223 insertions(+), 204 deletions(-)
>
Overall,
Reviewed-by: Anatoly Burakov <anatoly.burakov at intel.com>
However, couple of nits below.
> ABI Changes
> -----------
> diff --git a/lib/librte_eal/common/eal_common_dynmem.c b/lib/librte_eal/common/eal_common_dynmem.c
> index 614648d8a4de..48eca5854ebe 100644
> --- a/lib/librte_eal/common/eal_common_dynmem.c
> +++ b/lib/librte_eal/common/eal_common_dynmem.c
Missed comment right above this hunk.
> @@ -434,12 +434,12 @@ eal_dynmem_calc_num_pages_per_socket(
> for (socket = 0; socket < RTE_MAX_NUMA_NODES && total_size != 0;
> socket++) {
> struct rte_config *cfg = rte_eal_get_configuration();
> - unsigned int master_lcore_socket;
> + unsigned int main_lcore_socket;
>
> - master_lcore_socket =
> - rte_lcore_to_socket_id(cfg->master_lcore);
> + main_lcore_socket =
> + rte_lcore_to_socket_id(cfg->main_lcore);
>
> - if (master_lcore_socket != socket)
> + if (main_lcore_socket != socket)
> continue;
>
> /* Update sizes */
<snip>
> }
>
> /*
> - * Launch a dummy function on all slave lcores, so that master lcore
> + * Launch a dummy function on all worker lcores, so that main lcore
> * knows they are all ready when this function returns.
> */
> - rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);
> + rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN);
> rte_eal_mp_wait_lcore();
>
> /* initialize services so vdevs register service during bus_probe. */
> diff --git a/lib/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c
> index 89725291b0ce..d7349544a13a 100644
> --- a/lib/librte_eal/linux/eal_memory.c
> +++ b/lib/librte_eal/linux/eal_memory.c
Missed comment right above this hunk.
> @@ -1751,7 +1751,7 @@ memseg_primary_init_32(void)
> for (i = 0; i < rte_socket_count(); i++) {
> int hp_sizes = (int) internal_conf->num_hugepage_sizes;
> uint64_t max_socket_mem, cur_socket_mem;
> - unsigned int master_lcore_socket;
> + unsigned int main_lcore_socket;
> struct rte_config *cfg = rte_eal_get_configuration();
> bool skip;
>
> @@ -1767,10 +1767,10 @@ memseg_primary_init_32(void)
> skip = active_sockets != 0 &&
> internal_conf->socket_mem[socket_id] == 0;
> /* ...or if we didn't specifically request memory on *any*
> - * socket, and this is not master lcore
> + * socket, and this is not main lcore
> */
> - master_lcore_socket = rte_lcore_to_socket_id(cfg->master_lcore);
> - skip |= active_sockets == 0 && socket_id != master_lcore_socket;
> + main_lcore_socket = rte_lcore_to_socket_id(cfg->main_lcore);
> + skip |= active_sockets == 0 && socket_id != main_lcore_socket;
>
> if (skip) {
--
Thanks,
Anatoly
More information about the dev
mailing list