From patchwork Fri Jun 5 22:57:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70890 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 89137A0350; Sat, 6 Jun 2020 00:59:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 30A5C1D533; Sat, 6 Jun 2020 00:59:03 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 7DCE11D519 for ; Sat, 6 Jun 2020 00:58:59 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id q16so4274003plr.2 for ; Fri, 05 Jun 2020 15:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CdAJM6VYj41YRgu4zO4bdpaFQxPioY7atyHVZepaRks=; b=ZzZKzsOoJHAFkfruuW8q9l+ShppziVmEIjCsw2PxhJ0W6Xxud4vEZ+y3mAux/FQtKd hBWiQXqNvxZQNrGJaqAfWt1ze319Mii1XbaRIfgl15j/mDZ8CY7HwJh7Zr63BHU/7ipT /9Ek21TnjhP7tXKKZZnmNcQlTuko6ejutlKQmC6PIsmAQtGbbQL9l68fQuJhiLvnI/9x u7x7HNQvFRhA91O4fSERP4ljXYVw9TbPkbPMfJ7IBGF6Qq5/JLepfcrr3daTPweAdCNS 3aPahCabtY+at6eGrovvlWEhqVMd/iC5ZQgf68rZYjZc5z9O4vlPMca8xWsfqHiCYnef Tu3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CdAJM6VYj41YRgu4zO4bdpaFQxPioY7atyHVZepaRks=; b=tdnKNLTEKdHYbq0fyn1mpXlrpZh5dLuXvwNjduDQuY8s401zipH0vqQPAEKP5ZXIik 31lyJjVMvjx1EbrygqWQFhRrBo6J5dKrhKby7f8Jb0k/DlRwn//FwXinh8VbSIjo/+iB Q1MJbnPRU3pI5i0CadeL3MT2H09t8EYDtPC0Eu9Drwa9GVd7OneAMo1oMyPuAWRC7iyt vz7oVcTVtrOTpSCAjU6IYCc4IHEDXK4qzPwc4hfL9kMfF6d+Z0dD0b6AR/l9zVL7BjlE p3GKu5jsF/VPR+3yTAqSiiHLGtyAhZYfnNIKEEL14VQ5tMnCtrxIegZ1aPFNyEryrZLg fe5w== X-Gm-Message-State: AOAM532YKeIgN7Tmy2q8xqute/ZkE68knCtiLPXNn53DDrXugLaVLKb7 vs4oeD/zUvL+cIxbr88WaUti/cdci30= X-Google-Smtp-Source: ABdhPJz1Dq2uVHV6YpHAij7sAZ+ixa/Ll59zRcujTbOLheK/cb/2r4DxGWbxp/YKB/HJKP1DrENP7g== X-Received: by 2002:a17:90a:d3d6:: with SMTP id d22mr5342249pjw.184.1591397937014; Fri, 05 Jun 2020 15:58:57 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:58:56 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:46 -0700 Message-Id: <20200605225811.26342-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 01/26] eal: rename terms used for DPDK lcores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace the old use of master/slave lcore with more inclusive name of initial/secondary lcore. The old visible API will stay for now. Change master2slave to new init2worker and vice-versa. This patch breaks the expected practice for new API's. The new rte_get_initial_lcore() will not go through the standard experimental API phase; there is no functional difference from the previous name. Signed-off-by: Stephen Hemminger --- lib/librte_eal/common/eal_common_launch.c | 36 ++++++------- lib/librte_eal/common/eal_common_lcore.c | 11 ++-- lib/librte_eal/common/eal_common_options.c | 62 +++++++++++----------- lib/librte_eal/common/eal_options.h | 4 +- lib/librte_eal/common/eal_private.h | 6 +-- lib/librte_eal/common/eal_thread.h | 6 +-- lib/librte_eal/common/rte_random.c | 2 +- lib/librte_eal/common/rte_service.c | 2 +- lib/librte_eal/freebsd/eal.c | 24 ++++----- lib/librte_eal/freebsd/eal_thread.c | 24 ++++----- lib/librte_eal/include/rte_eal.h | 4 +- lib/librte_eal/include/rte_eal_trace.h | 4 +- lib/librte_eal/include/rte_launch.h | 62 ++++++++++++---------- lib/librte_eal/include/rte_lcore.h | 29 +++++++--- lib/librte_eal/linux/eal.c | 24 ++++----- lib/librte_eal/linux/eal_memory.c | 20 +++---- lib/librte_eal/linux/eal_thread.c | 24 ++++----- lib/librte_eal/rte_eal_version.map | 1 + lib/librte_eal/windows/eal.c | 14 ++--- lib/librte_eal/windows/eal_thread.c | 22 ++++---- 20 files changed, 204 insertions(+), 177 deletions(-) diff --git a/lib/librte_eal/common/eal_common_launch.c b/lib/librte_eal/common/eal_common_launch.c index cf52d717f68e..43a0af196db2 100644 --- a/lib/librte_eal/common/eal_common_launch.c +++ b/lib/librte_eal/common/eal_common_launch.c @@ -21,55 +21,55 @@ * Wait until a lcore finished its job. */ int -rte_eal_wait_lcore(unsigned slave_id) +rte_eal_wait_lcore(unsigned worker_id) { - if (lcore_config[slave_id].state == WAIT) + if (lcore_config[worker_id].state == WAIT) return 0; - while (lcore_config[slave_id].state != WAIT && - lcore_config[slave_id].state != FINISHED) + while (lcore_config[worker_id].state != WAIT && + lcore_config[worker_id].state != FINISHED) rte_pause(); rte_rmb(); /* we are in finished state, go to wait state */ - lcore_config[slave_id].state = WAIT; - return lcore_config[slave_id].ret; + lcore_config[worker_id].state = WAIT; + return lcore_config[worker_id].ret; } /* - * Check that every SLAVE lcores are in WAIT state, then call - * rte_eal_remote_launch() for all of them. If call_master is true - * (set to CALL_MASTER), also call the function on the master lcore. + * Check that every WORKER lcores are in WAIT state, then call + * rte_eal_remote_launch() for all of them. If call_initial is true + * (set to CALL_INITIAL), also call the function on the initial lcore. */ int rte_eal_mp_remote_launch(int (*f)(void *), void *arg, - enum rte_rmt_call_master_t call_master) + enum rte_rmt_call_initial_t call_initial) { int lcore_id; - int master = rte_get_master_lcore(); + int initial = rte_get_initial_lcore(); /* check state of lcores */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (lcore_config[lcore_id].state != WAIT) return -EBUSY; } /* send messages to cores */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(f, arg, lcore_id); } - if (call_master == CALL_MASTER) { - lcore_config[master].ret = f(arg); - lcore_config[master].state = FINISHED; + if (call_initial == CALL_INITIAL) { + lcore_config[initial].ret = f(arg); + lcore_config[initial].state = FINISHED; } return 0; } /* - * Return the state of the lcore identified by slave_id. + * Return the state of the lcore identified by worker_id. */ enum rte_lcore_state_t rte_eal_get_lcore_state(unsigned lcore_id) @@ -86,7 +86,7 @@ rte_eal_mp_wait_lcore(void) { unsigned lcore_id; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_wait_lcore(lcore_id); } } diff --git a/lib/librte_eal/common/eal_common_lcore.c b/lib/librte_eal/common/eal_common_lcore.c index 5404922a87d2..a8c8b7206992 100644 --- a/lib/librte_eal/common/eal_common_lcore.c +++ b/lib/librte_eal/common/eal_common_lcore.c @@ -16,9 +16,14 @@ #include "eal_private.h" #include "eal_thread.h" +unsigned int rte_get_initial_lcore(void) +{ + return rte_eal_get_configuration()->initial_lcore; +} + unsigned int rte_get_master_lcore(void) { - return rte_eal_get_configuration()->master_lcore; + return rte_eal_get_configuration()->initial_lcore; } unsigned int rte_lcore_count(void) @@ -72,7 +77,7 @@ int rte_lcore_is_enabled(unsigned int lcore_id) return cfg->lcore_role[lcore_id] == ROLE_RTE; } -unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap) +unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap) { i++; if (wrap) @@ -80,7 +85,7 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap) while (i < RTE_MAX_LCORE) { if (!rte_lcore_is_enabled(i) || - (skip_master && (i == rte_get_master_lcore()))) { + (skip_initial && (i == rte_get_initial_lcore()))) { i++; if (wrap) i %= RTE_MAX_LCORE; diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 8f2cbd1c6835..efa1a12cf425 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -77,7 +77,7 @@ eal_long_options[] = { {OPT_TRACE_DIR, 1, NULL, OPT_TRACE_DIR_NUM }, {OPT_TRACE_BUF_SIZE, 1, NULL, OPT_TRACE_BUF_SIZE_NUM }, {OPT_TRACE_MODE, 1, NULL, OPT_TRACE_MODE_NUM }, - {OPT_MASTER_LCORE, 1, NULL, OPT_MASTER_LCORE_NUM }, + {OPT_INITIAL_LCORE, 1, NULL, OPT_INITIAL_LCORE_NUM }, {OPT_MBUF_POOL_OPS_NAME, 1, NULL, OPT_MBUF_POOL_OPS_NAME_NUM}, {OPT_NO_HPET, 0, NULL, OPT_NO_HPET_NUM }, {OPT_NO_HUGE, 0, NULL, OPT_NO_HUGE_NUM }, @@ -138,7 +138,7 @@ struct device_option { static struct device_option_list devopt_list = TAILQ_HEAD_INITIALIZER(devopt_list); -static int master_lcore_parsed; +static int initial_lcore_parsed; static int mem_parsed; static int core_parsed; @@ -453,12 +453,12 @@ eal_parse_service_coremask(const char *coremask) for (j = 0; j < BITS_PER_HEX && idx < RTE_MAX_LCORE; j++, idx++) { if ((1 << j) & val) { - /* handle master lcore already parsed */ + /* handle initial lcore already parsed */ uint32_t lcore = idx; - if (master_lcore_parsed && - cfg->master_lcore == lcore) { + if (initial_lcore_parsed && + cfg->initial_lcore == lcore) { RTE_LOG(ERR, EAL, - "lcore %u is master lcore, cannot use as service core\n", + "lcore %u is initial lcore, cannot use as service core\n", idx); return -1; } @@ -626,12 +626,12 @@ eal_parse_service_corelist(const char *corelist) min = idx; for (idx = min; idx <= max; idx++) { if (cfg->lcore_role[idx] != ROLE_SERVICE) { - /* handle master lcore already parsed */ + /* handle initial lcore already parsed */ uint32_t lcore = idx; - if (cfg->master_lcore == lcore && - master_lcore_parsed) { + if (cfg->initial_lcore == lcore && + initial_lcore_parsed) { RTE_LOG(ERR, EAL, - "Error: lcore %u is master lcore, cannot use as service core\n", + "Error: lcore %u is initial lcore, cannot use as service core\n", idx); return -1; } @@ -714,25 +714,25 @@ eal_parse_corelist(const char *corelist, int *cores) return 0; } -/* Changes the lcore id of the master thread */ +/* Changes the lcore id of the initial thread */ static int -eal_parse_master_lcore(const char *arg) +eal_parse_initial_lcore(const char *arg) { char *parsing_end; struct rte_config *cfg = rte_eal_get_configuration(); errno = 0; - cfg->master_lcore = (uint32_t) strtol(arg, &parsing_end, 0); + cfg->initial_lcore = (uint32_t) strtol(arg, &parsing_end, 0); if (errno || parsing_end[0] != 0) return -1; - if (cfg->master_lcore >= RTE_MAX_LCORE) + if (cfg->initial_lcore >= RTE_MAX_LCORE) return -1; - master_lcore_parsed = 1; + initial_lcore_parsed = 1; - /* ensure master core is not used as service core */ - if (lcore_config[cfg->master_lcore].core_role == ROLE_SERVICE) { + /* ensure initial core is not used as service core */ + if (lcore_config[cfg->initial_lcore].core_role == ROLE_SERVICE) { RTE_LOG(ERR, EAL, - "Error: Master lcore is used as a service core\n"); + "Error: Initial lcore is used as a service core\n"); return -1; } @@ -1466,10 +1466,10 @@ eal_parse_common_option(int opt, const char *optarg, conf->process_type = eal_parse_proc_type(optarg); break; - case OPT_MASTER_LCORE_NUM: - if (eal_parse_master_lcore(optarg) < 0) { + case OPT_INITIAL_LCORE_NUM: + if (eal_parse_initial_lcore(optarg) < 0) { RTE_LOG(ERR, EAL, "invalid parameter for --" - OPT_MASTER_LCORE "\n"); + OPT_INITIAL_LCORE "\n"); return -1; } break; @@ -1637,9 +1637,9 @@ compute_ctrl_threads_cpuset(struct internal_config *internal_cfg) RTE_CPU_AND(cpuset, cpuset, &default_set); - /* if no remaining cpu, use master lcore cpu affinity */ + /* if no remaining cpu, use initial lcore cpu affinity */ if (!CPU_COUNT(cpuset)) { - memcpy(cpuset, &lcore_config[rte_get_master_lcore()].cpuset, + memcpy(cpuset, &lcore_config[rte_get_initial_lcore()].cpuset, sizeof(*cpuset)); } } @@ -1669,12 +1669,12 @@ eal_adjust_config(struct internal_config *internal_cfg) if (internal_config.process_type == RTE_PROC_AUTO) internal_config.process_type = eal_proc_type_detect(); - /* default master lcore is the first one */ - if (!master_lcore_parsed) { - cfg->master_lcore = rte_get_next_lcore(-1, 0, 0); - if (cfg->master_lcore >= RTE_MAX_LCORE) + /* default initial lcore is the first one */ + if (!initial_lcore_parsed) { + cfg->initial_lcore = rte_get_next_lcore(-1, 0, 0); + if (cfg->initial_lcore >= RTE_MAX_LCORE) return -1; - lcore_config[cfg->master_lcore].core_role = ROLE_RTE; + lcore_config[cfg->initial_lcore].core_role = ROLE_RTE; } compute_ctrl_threads_cpuset(internal_cfg); @@ -1692,8 +1692,8 @@ eal_check_common_options(struct internal_config *internal_cfg) { struct rte_config *cfg = rte_eal_get_configuration(); - if (cfg->lcore_role[cfg->master_lcore] != ROLE_RTE) { - RTE_LOG(ERR, EAL, "Master lcore is not enabled for DPDK\n"); + if (cfg->lcore_role[cfg->initial_lcore] != ROLE_RTE) { + RTE_LOG(ERR, EAL, "Initial lcore is not enabled for DPDK\n"); return -1; } @@ -1791,7 +1791,7 @@ eal_common_usage(void) " '( )' can be omitted for single element group,\n" " '@' can be omitted if cpus and lcores have the same value\n" " -s SERVICE COREMASK Hexadecimal bitmask of cores to be used as service cores\n" - " --"OPT_MASTER_LCORE" ID Core ID that is used as master\n" + " --"OPT_INITIAL_LCORE" ID Core ID that is used as initial\n" " --"OPT_MBUF_POOL_OPS_NAME" Pool ops name for mbuf to use\n" " -n CHANNELS Number of memory channels\n" " -m MB Memory to allocate (see also --"OPT_SOCKET_MEM")\n" diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h index 18e6da9ab37b..0ffe1a5ec0a3 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h @@ -43,8 +43,8 @@ enum { OPT_TRACE_BUF_SIZE_NUM, #define OPT_TRACE_MODE "trace-mode" OPT_TRACE_MODE_NUM, -#define OPT_MASTER_LCORE "master-lcore" - OPT_MASTER_LCORE_NUM, +#define OPT_INITIAL_LCORE "initial-lcore" + OPT_INITIAL_LCORE_NUM, #define OPT_MBUF_POOL_OPS_NAME "mbuf-pool-ops-name" OPT_MBUF_POOL_OPS_NAME_NUM, #define OPT_PROC_TYPE "proc-type" diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h index 869ce183ad6b..ff49f1d4d3c0 100644 --- a/lib/librte_eal/common/eal_private.h +++ b/lib/librte_eal/common/eal_private.h @@ -17,8 +17,8 @@ */ struct lcore_config { pthread_t thread_id; /**< pthread identifier */ - int pipe_master2slave[2]; /**< communication pipe with master */ - int pipe_slave2master[2]; /**< communication pipe with master */ + int pipe_init2worker[2]; /**< communication pipe with initial core */ + int pipe_worker2init[2]; /**< communication pipe with initial core */ lcore_function_t * volatile f; /**< function to call */ void * volatile arg; /**< argument of function */ @@ -39,7 +39,7 @@ extern struct lcore_config lcore_config[RTE_MAX_LCORE]; * The global RTE configuration structure. */ struct rte_config { - uint32_t master_lcore; /**< Id of the master lcore */ + uint32_t initial_lcore; /**< Id of the initial lcore */ uint32_t lcore_count; /**< Number of available logical cores. */ uint32_t numa_node_count; /**< Number of detected NUMA nodes. */ uint32_t numa_nodes[RTE_MAX_NUMA_NODES]; /**< List of detected NUMA nodes. */ diff --git a/lib/librte_eal/common/eal_thread.h b/lib/librte_eal/common/eal_thread.h index b40ed249edab..23d7c296cca4 100644 --- a/lib/librte_eal/common/eal_thread.h +++ b/lib/librte_eal/common/eal_thread.h @@ -16,12 +16,12 @@ __rte_noreturn void *eal_thread_loop(void *arg); /** - * Init per-lcore info for master thread + * Init per-lcore info for initial thread * * @param lcore_id - * identifier of master lcore + * identifier of initial lcore */ -void eal_thread_init_master(unsigned lcore_id); +void eal_thread_set_initial_lcore(unsigned lcore_id); /** * Get the NUMA socket id from cpu id. diff --git a/lib/librte_eal/common/rte_random.c b/lib/librte_eal/common/rte_random.c index b7a089ac4fe0..6bae53bdf659 100644 --- a/lib/librte_eal/common/rte_random.c +++ b/lib/librte_eal/common/rte_random.c @@ -122,7 +122,7 @@ struct rte_rand_state *__rte_rand_get_state(void) lcore_id = rte_lcore_id(); if (unlikely(lcore_id == LCORE_ID_ANY)) - lcore_id = rte_get_master_lcore(); + lcore_id = rte_get_initial_lcore(); return &rand_states[lcore_id]; } diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 6123a2124d33..6a80b1675559 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -106,7 +106,7 @@ rte_service_init(void) struct rte_config *cfg = rte_eal_get_configuration(); for (i = 0; i < RTE_MAX_LCORE; i++) { if (lcore_config[i].core_role == ROLE_SERVICE) { - if ((unsigned int)i == cfg->master_lcore) + if ((unsigned int)i == cfg->initial_lcore) continue; rte_service_lcore_add(i); count++; diff --git a/lib/librte_eal/freebsd/eal.c b/lib/librte_eal/freebsd/eal.c index c41f265fac9f..be452287c817 100644 --- a/lib/librte_eal/freebsd/eal.c +++ b/lib/librte_eal/freebsd/eal.c @@ -650,10 +650,10 @@ eal_check_mem_on_local_socket(void) { int socket_id; - socket_id = rte_lcore_to_socket_id(rte_config.master_lcore); + socket_id = rte_lcore_to_socket_id(rte_config.initial_lcore); if (rte_memseg_list_walk(check_socket, &socket_id) == 0) - RTE_LOG(WARNING, EAL, "WARNING: Master core has no memory on local socket!\n"); + RTE_LOG(WARNING, EAL, "WARNING: Initial core has no memory on local socket!\n"); } @@ -877,23 +877,23 @@ rte_eal_init(int argc, char **argv) eal_check_mem_on_local_socket(); - eal_thread_init_master(rte_config.master_lcore); + eal_thread_set_initial_lcore(rte_config.initial_lcore); ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset)); - RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%p;cpuset=[%s%s])\n", - rte_config.master_lcore, thread_id, cpuset, + RTE_LOG(DEBUG, EAL, "Initial lcore %u is ready (tid=%p;cpuset=[%s%s])\n", + rte_config.initial_lcore, thread_id, cpuset, ret == 0 ? "" : "..."); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { /* - * create communication pipes between master thread + * create communication pipes between initial thread * and children */ - if (pipe(lcore_config[i].pipe_master2slave) < 0) + if (pipe(lcore_config[i].pipe_init2worker) < 0) rte_panic("Cannot create pipe\n"); - if (pipe(lcore_config[i].pipe_slave2master) < 0) + if (pipe(lcore_config[i].pipe_worker2init) < 0) rte_panic("Cannot create pipe\n"); lcore_config[i].state = WAIT; @@ -906,15 +906,15 @@ rte_eal_init(int argc, char **argv) /* Set thread_name for aid in debugging. */ snprintf(thread_name, sizeof(thread_name), - "lcore-slave-%d", i); + "lcore-work-%d", i); rte_thread_setname(lcore_config[i].thread_id, thread_name); } /* - * Launch a dummy function on all slave lcores, so that master lcore + * Launch a dummy function on all worker lcores, so that initial 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_INITIAL); rte_eal_mp_wait_lcore(); /* initialize services so vdevs register service during bus_probe. */ diff --git a/lib/librte_eal/freebsd/eal_thread.c b/lib/librte_eal/freebsd/eal_thread.c index b52019782ac6..a7a2afbe4725 100644 --- a/lib/librte_eal/freebsd/eal_thread.c +++ b/lib/librte_eal/freebsd/eal_thread.c @@ -30,24 +30,24 @@ RTE_DEFINE_PER_LCORE(unsigned, _socket_id) = (unsigned)SOCKET_ID_ANY; RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset); /* - * Send a message to a slave lcore identified by slave_id to call a + * Send a message to a worker lcore identified by worker_id to call a * function f with argument arg. Once the execution is done, the * remote lcore switch in FINISHED state. */ int -rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id) +rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned worker_id) { int n; char c = 0; - int m2s = lcore_config[slave_id].pipe_master2slave[1]; - int s2m = lcore_config[slave_id].pipe_slave2master[0]; + int m2s = lcore_config[worker_id].pipe_init2worker[1]; + int s2m = lcore_config[worker_id].pipe_worker2init[0]; int rc = -EBUSY; - if (lcore_config[slave_id].state != WAIT) + if (lcore_config[worker_id].state != WAIT) goto finish; - lcore_config[slave_id].f = f; - lcore_config[slave_id].arg = arg; + lcore_config[worker_id].f = f; + lcore_config[worker_id].arg = arg; /* send message */ n = 0; @@ -66,7 +66,7 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id) rc = 0; finish: - rte_eal_trace_thread_remote_launch(f, arg, slave_id, rc); + rte_eal_trace_thread_remote_launch(f, arg, worker_id, rc); return rc; } @@ -83,7 +83,7 @@ eal_thread_set_affinity(void) return rte_thread_set_affinity(&lcore_config[lcore_id].cpuset); } -void eal_thread_init_master(unsigned lcore_id) +void eal_thread_set_initial_lcore(unsigned lcore_id) { /* set the lcore ID in per-lcore memory area */ RTE_PER_LCORE(_lcore_id) = lcore_id; @@ -107,15 +107,15 @@ eal_thread_loop(__rte_unused void *arg) thread_id = pthread_self(); /* retrieve our lcore_id from the configuration structure */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (thread_id == lcore_config[lcore_id].thread_id) break; } if (lcore_id == RTE_MAX_LCORE) rte_panic("cannot retrieve lcore id\n"); - m2s = lcore_config[lcore_id].pipe_master2slave[0]; - s2m = lcore_config[lcore_id].pipe_slave2master[1]; + m2s = lcore_config[lcore_id].pipe_init2worker[0]; + s2m = lcore_config[lcore_id].pipe_worker2init[1]; /* set the lcore ID in per-lcore memory area */ RTE_PER_LCORE(_lcore_id) = lcore_id; diff --git a/lib/librte_eal/include/rte_eal.h b/lib/librte_eal/include/rte_eal.h index 2f9ed298de63..c01b9e913d48 100644 --- a/lib/librte_eal/include/rte_eal.h +++ b/lib/librte_eal/include/rte_eal.h @@ -73,11 +73,11 @@ int rte_eal_iopl_init(void); /** * Initialize the Environment Abstraction Layer (EAL). * - * This function is to be executed on the MASTER lcore only, as soon + * This function is to be executed on the initial lcore only, as soon * as possible in the application's main() function. * * The function finishes the initialization process before main() is called. - * It puts the SLAVE lcores in the WAIT state. + * It puts the worker lcores in the WAIT state. * * When the multi-partition feature is supported, depending on the * configuration (if CONFIG_RTE_EAL_MAIN_PARTITION is disabled), this diff --git a/lib/librte_eal/include/rte_eal_trace.h b/lib/librte_eal/include/rte_eal_trace.h index 1ebb2905a993..51c428e359b8 100644 --- a/lib/librte_eal/include/rte_eal_trace.h +++ b/lib/librte_eal/include/rte_eal_trace.h @@ -210,10 +210,10 @@ RTE_TRACE_POINT( RTE_TRACE_POINT( rte_eal_trace_thread_remote_launch, RTE_TRACE_POINT_ARGS(int (*f)(void *), void *arg, - unsigned int slave_id, int rc), + unsigned int worker_id, int rc), rte_trace_point_emit_ptr(f); rte_trace_point_emit_ptr(arg); - rte_trace_point_emit_u32(slave_id); + rte_trace_point_emit_u32(worker_id); rte_trace_point_emit_int(rc); ) RTE_TRACE_POINT( diff --git a/lib/librte_eal/include/rte_launch.h b/lib/librte_eal/include/rte_launch.h index 06a671752ace..9b68685d99d4 100644 --- a/lib/librte_eal/include/rte_launch.h +++ b/lib/librte_eal/include/rte_launch.h @@ -32,12 +32,12 @@ typedef int (lcore_function_t)(void *); /** * Launch a function on another lcore. * - * To be executed on the MASTER lcore only. + * To be executed on the INITIAL lcore only. * - * Sends a message to a slave lcore (identified by the slave_id) that + * Sends a message to a worker lcore (identified by the id) that * is in the WAIT state (this is true after the first call to * rte_eal_init()). This can be checked by first calling - * rte_eal_wait_lcore(slave_id). + * rte_eal_wait_lcore(id). * * When the remote lcore receives the message, it switches to * the RUNNING state, then calls the function f with argument arg. Once the @@ -45,7 +45,7 @@ typedef int (lcore_function_t)(void *); * the return value of f is stored in a local variable to be read using * rte_eal_wait_lcore(). * - * The MASTER lcore returns as soon as the message is sent and knows + * The INITIAL lcore returns as soon as the message is sent and knows * nothing about the completion of f. * * Note: This function is not designed to offer optimum @@ -56,37 +56,43 @@ typedef int (lcore_function_t)(void *); * The function to be called. * @param arg * The argument for the function. - * @param slave_id + * @param id * The identifier of the lcore on which the function should be executed. * @return * - 0: Success. Execution of function f started on the remote lcore. * - (-EBUSY): The remote lcore is not in a WAIT state. */ -int rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned slave_id); +int rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned id); /** - * This enum indicates whether the master core must execute the handler + * This enum indicates whether the initial core must execute the handler * launched on all logical cores. */ -enum rte_rmt_call_master_t { - SKIP_MASTER = 0, /**< lcore handler not executed by master core. */ - CALL_MASTER, /**< lcore handler executed by master core. */ +enum rte_rmt_call_initial_t { + SKIP_INITIAL = 0, /**< lcore handler not executed by initial core. */ + CALL_INITIAL, /**< lcore handler executed by initial core. */ }; +/** + * Deprecated backward compatiable definitions + */ +#define SKIP_MASTER SKIP_INITIAL +#define CALL_MASTER CALL_INITIAL + /** * Launch a function on all lcores. * - * Check that each SLAVE lcore is in a WAIT state, then call + * Check that each worker lcore is in a WAIT state, then call * rte_eal_remote_launch() for each lcore. * * @param f * The function to be called. * @param arg * The argument for the function. - * @param call_master - * If call_master set to SKIP_MASTER, the MASTER lcore does not call - * the function. If call_master is set to CALL_MASTER, the function - * is also called on master before returning. In any case, the master + * @param call_initial + * If call_initial set to SKIP_INITIAL, the INITIAL lcore does not call + * the function. If call_initial is set to CALL_INITIAL, the function + * is also called on initial before returning. In any case, the initial * lcore returns as soon as it finished its job and knows nothing * about the completion of f on the other lcores. * @return @@ -95,49 +101,49 @@ enum rte_rmt_call_master_t { * case, no message is sent to any of the lcores. */ int rte_eal_mp_remote_launch(lcore_function_t *f, void *arg, - enum rte_rmt_call_master_t call_master); + enum rte_rmt_call_initial_t call_initial); /** - * Get the state of the lcore identified by slave_id. + * Get the state of the lcore identified by id. * - * To be executed on the MASTER lcore only. + * To be executed on the INITIAL lcore only. * - * @param slave_id + * @param id * The identifier of the lcore. * @return * The state of the lcore. */ -enum rte_lcore_state_t rte_eal_get_lcore_state(unsigned slave_id); +enum rte_lcore_state_t rte_eal_get_lcore_state(unsigned id); /** * Wait until an lcore finishes its job. * - * To be executed on the MASTER lcore only. + * To be executed on the INITIAL lcore only. * - * If the slave lcore identified by the slave_id is in a FINISHED state, + * If the lcore identified by the id is in a FINISHED state, * switch to the WAIT state. If the lcore is in RUNNING state, wait until * the lcore finishes its job and moves to the FINISHED state. * - * @param slave_id + * @param id * The identifier of the lcore. * @return - * - 0: If the lcore identified by the slave_id is in a WAIT state. + * - 0: If the lcore identified by the id is in a WAIT state. * - The value that was returned by the previous remote launch - * function call if the lcore identified by the slave_id was in a + * function call if the lcore identified by the id was in a * FINISHED or RUNNING state. In this case, it changes the state * of the lcore to WAIT. */ -int rte_eal_wait_lcore(unsigned slave_id); +int rte_eal_wait_lcore(unsigned id); /** * Wait until all lcores finish their jobs. * - * To be executed on the MASTER lcore only. Issue an + * To be executed on the INITIAL lcore only. Issue an * rte_eal_wait_lcore() for every lcore. The return values are * ignored. * * After a call to rte_eal_mp_wait_lcore(), the caller can assume - * that all slave lcores are in a WAIT state. + * that all worker lcores are in a WAIT state. */ void rte_eal_mp_wait_lcore(void); diff --git a/lib/librte_eal/include/rte_lcore.h b/lib/librte_eal/include/rte_lcore.h index 339046bc8691..069cb1f427b9 100644 --- a/lib/librte_eal/include/rte_lcore.h +++ b/lib/librte_eal/include/rte_lcore.h @@ -54,10 +54,18 @@ rte_lcore_id(void) } /** - * Get the id of the master lcore + * Get the id of the initial lcore * * @return - * the id of the master lcore + * the id of the initial lcore + */ +unsigned int rte_get_initial_lcore(void); + +/** + * Deprecated API to get the id of the initial lcore + * + * @return + * the id of the initial lcore */ unsigned int rte_get_master_lcore(void); @@ -179,15 +187,15 @@ int rte_lcore_is_enabled(unsigned int lcore_id); * * @param i * The current lcore (reference). - * @param skip_master - * If true, do not return the ID of the master lcore. + * @param skip_initial + * If true, do not return the ID of the initial lcore. * @param wrap * If true, go back to 0 when RTE_MAX_LCORE is reached; otherwise, * return RTE_MAX_LCORE. * @return * The next lcore_id or RTE_MAX_LCORE if not found. */ -unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap); +unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap); /** * Macro to browse all running lcores. @@ -198,13 +206,20 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_master, int wrap); i = rte_get_next_lcore(i, 0, 0)) /** - * Macro to browse all running lcores except the master lcore. + * Macro to browse all running lcores except the initial lcore. */ -#define RTE_LCORE_FOREACH_SLAVE(i) \ +#define RTE_LCORE_FOREACH_WORKER(i) \ for (i = rte_get_next_lcore(-1, 1, 0); \ imaster_lcore); + initial_lcore_socket = + rte_lcore_to_socket_id(cfg->initial_lcore); - if (master_lcore_socket != socket) + if (initial_lcore_socket != socket) continue; /* Update sizes */ @@ -2100,7 +2100,7 @@ memseg_primary_init_32(void) /* the allocation logic is a little bit convoluted, but here's how it * works, in a nutshell: * - if user hasn't specified on which sockets to allocate memory via - * --socket-mem, we allocate all of our memory on master core socket. + * --socket-mem, we allocate all of our memory on initial core socket. * - if user has specified sockets to allocate memory on, there may be * some "unused" memory left (e.g. if user has specified --socket-mem * such that not all memory adds up to 2 gigabytes), so add it to all @@ -2114,7 +2114,7 @@ memseg_primary_init_32(void) for (i = 0; i < rte_socket_count(); i++) { int hp_sizes = (int) internal_config.num_hugepage_sizes; uint64_t max_socket_mem, cur_socket_mem; - unsigned int master_lcore_socket; + unsigned int initial_lcore_socket; struct rte_config *cfg = rte_eal_get_configuration(); bool skip; @@ -2130,10 +2130,10 @@ memseg_primary_init_32(void) skip = active_sockets != 0 && internal_config.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 initial lcore */ - master_lcore_socket = rte_lcore_to_socket_id(cfg->master_lcore); - skip |= active_sockets == 0 && socket_id != master_lcore_socket; + initial_lcore_socket = rte_lcore_to_socket_id(cfg->initial_lcore); + skip |= active_sockets == 0 && socket_id != initial_lcore_socket; if (skip) { RTE_LOG(DEBUG, EAL, "Will not preallocate memory on socket %u\n", diff --git a/lib/librte_eal/linux/eal_thread.c b/lib/librte_eal/linux/eal_thread.c index cd9d6e0ebf5b..1cebcc673922 100644 --- a/lib/librte_eal/linux/eal_thread.c +++ b/lib/librte_eal/linux/eal_thread.c @@ -30,24 +30,24 @@ RTE_DEFINE_PER_LCORE(unsigned, _socket_id) = (unsigned)SOCKET_ID_ANY; RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset); /* - * Send a message to a slave lcore identified by slave_id to call a + * Send a message to a worker lcore identified by worker_id to call a * function f with argument arg. Once the execution is done, the * remote lcore switch in FINISHED state. */ int -rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id) +rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned worker_id) { int n; char c = 0; - int m2s = lcore_config[slave_id].pipe_master2slave[1]; - int s2m = lcore_config[slave_id].pipe_slave2master[0]; + int m2s = lcore_config[worker_id].pipe_init2worker[1]; + int s2m = lcore_config[worker_id].pipe_worker2init[0]; int rc = -EBUSY; - if (lcore_config[slave_id].state != WAIT) + if (lcore_config[worker_id].state != WAIT) goto finish; - lcore_config[slave_id].f = f; - lcore_config[slave_id].arg = arg; + lcore_config[worker_id].f = f; + lcore_config[worker_id].arg = arg; /* send message */ n = 0; @@ -66,7 +66,7 @@ rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id) rc = 0; finish: - rte_eal_trace_thread_remote_launch(f, arg, slave_id, rc); + rte_eal_trace_thread_remote_launch(f, arg, worker_id, rc); return rc; } @@ -83,7 +83,7 @@ eal_thread_set_affinity(void) return rte_thread_set_affinity(&lcore_config[lcore_id].cpuset); } -void eal_thread_init_master(unsigned lcore_id) +void eal_thread_set_initial_lcore(unsigned lcore_id) { /* set the lcore ID in per-lcore memory area */ RTE_PER_LCORE(_lcore_id) = lcore_id; @@ -107,15 +107,15 @@ eal_thread_loop(__rte_unused void *arg) thread_id = pthread_self(); /* retrieve our lcore_id from the configuration structure */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (thread_id == lcore_config[lcore_id].thread_id) break; } if (lcore_id == RTE_MAX_LCORE) rte_panic("cannot retrieve lcore id\n"); - m2s = lcore_config[lcore_id].pipe_master2slave[0]; - s2m = lcore_config[lcore_id].pipe_slave2master[1]; + m2s = lcore_config[lcore_id].pipe_init2worker[0]; + s2m = lcore_config[lcore_id].pipe_worker2init[1]; /* set the lcore ID in per-lcore memory area */ RTE_PER_LCORE(_lcore_id) = lcore_id; diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index d8038749a478..590d5d82b19c 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -79,6 +79,7 @@ DPDK_20.0 { rte_hexdump; rte_hypervisor_get; rte_hypervisor_get_name; + rte_init_lcore_id; rte_intr_allow_others; rte_intr_callback_register; rte_intr_callback_unregister; diff --git a/lib/librte_eal/windows/eal.c b/lib/librte_eal/windows/eal.c index d084606a66fe..a27485a7d7d2 100644 --- a/lib/librte_eal/windows/eal.c +++ b/lib/librte_eal/windows/eal.c @@ -244,18 +244,18 @@ rte_eal_init(int argc, char **argv) if (fctret < 0) exit(1); - eal_thread_init_master(rte_config.master_lcore); + eal_thread_set_initial_lcore(rte_config.initial_lcore); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { /* - * create communication pipes between master thread + * create communication pipes between initial thread * and children */ - if (_pipe(lcore_config[i].pipe_master2slave, + if (_pipe(lcore_config[i].pipe_init2worker, sizeof(char), _O_BINARY) < 0) rte_panic("Cannot create pipe\n"); - if (_pipe(lcore_config[i].pipe_slave2master, + if (_pipe(lcore_config[i].pipe_worker2init, sizeof(char), _O_BINARY) < 0) rte_panic("Cannot create pipe\n"); @@ -267,10 +267,10 @@ rte_eal_init(int argc, char **argv) } /* - * Launch a dummy function on all slave lcores, so that master lcore + * Launch a dummy function on all worker lcores, so that initial 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_INITIAL); rte_eal_mp_wait_lcore(); return fctret; } diff --git a/lib/librte_eal/windows/eal_thread.c b/lib/librte_eal/windows/eal_thread.c index e149199a6fa1..3b2fbe1f2bd9 100644 --- a/lib/librte_eal/windows/eal_thread.c +++ b/lib/librte_eal/windows/eal_thread.c @@ -21,23 +21,23 @@ RTE_DEFINE_PER_LCORE(unsigned int, _socket_id) = (unsigned int)SOCKET_ID_ANY; RTE_DEFINE_PER_LCORE(rte_cpuset_t, _cpuset); /* - * Send a message to a slave lcore identified by slave_id to call a + * Send a message to a worker lcore identified by worker_id to call a * function f with argument arg. Once the execution is done, the * remote lcore switch in FINISHED state. */ int -rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int slave_id) +rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int worker_id) { int n; char c = 0; - int m2s = lcore_config[slave_id].pipe_master2slave[1]; - int s2m = lcore_config[slave_id].pipe_slave2master[0]; + int m2s = lcore_config[worker_id].pipe_init2worker[1]; + int s2m = lcore_config[worker_id].pipe_worker2init[0]; - if (lcore_config[slave_id].state != WAIT) + if (lcore_config[worker_id].state != WAIT) return -EBUSY; - lcore_config[slave_id].f = f; - lcore_config[slave_id].arg = arg; + lcore_config[worker_id].f = f; + lcore_config[worker_id].arg = arg; /* send message */ n = 0; @@ -58,7 +58,7 @@ rte_eal_remote_launch(lcore_function_t *f, void *arg, unsigned int slave_id) } void -eal_thread_init_master(unsigned int lcore_id) +eal_thread_set_initial_lcore(unsigned int lcore_id) { /* set the lcore ID in per-lcore memory area */ RTE_PER_LCORE(_lcore_id) = lcore_id; @@ -84,15 +84,15 @@ eal_thread_loop(void *arg __rte_unused) thread_id = eal_thread_self(); /* retrieve our lcore_id from the configuration structure */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (thread_id == lcore_config[lcore_id].thread_id) break; } if (lcore_id == RTE_MAX_LCORE) rte_panic("cannot retrieve lcore id\n"); - m2s = lcore_config[lcore_id].pipe_master2slave[0]; - s2m = lcore_config[lcore_id].pipe_slave2master[1]; + m2s = lcore_config[lcore_id].pipe_init2worker[0]; + s2m = lcore_config[lcore_id].pipe_worker2init[1]; /* set the lcore ID in per-lcore memory area */ RTE_PER_LCORE(_lcore_id) = lcore_id; From patchwork Fri Jun 5 22:57:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70889 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6488CA0350; Sat, 6 Jun 2020 00:59:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B83031D51C; Sat, 6 Jun 2020 00:59:01 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id BC1651D51A for ; Sat, 6 Jun 2020 00:58:59 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id y18so4266558plr.4 for ; Fri, 05 Jun 2020 15:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RPc7j4Uf81GlG1NPglUXJUZH/BPZGnQFMvbZlKWFyy0=; b=YjujrUp3Srni0D4nvF4OLtHFVEQ0ktJO1cw5SrqdWKVUywdJ7HglEzOzAwVcLM5gh3 D1ABeJDjN4Q+0FDS7EGqJZRGmJ2TDtbJb8XvL4ay6uqXHwVNMcomylGrf6JiUekyMDzm Ry0USC1Fah7lDHhlCMVjqMh0xxdBnZ/MWXoSRlcQDVMoxZ2Xss54u8brNQPDfb2SgXMr +km8fzuwJSJVJGGzDa7meDk11m9JKTDhGcPxlwvZCNzs8nOEd2p1y7514+JN2/CcFh1L eSX+oK1Ru+qR59tBfqpnJ6mzytM5tIPyKM63gJFwns7YApvyYGsKooXOTsVhw1ow/DLV KruA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RPc7j4Uf81GlG1NPglUXJUZH/BPZGnQFMvbZlKWFyy0=; b=HesUCtQY70iSlVJjk2Vw8gv21pQA3uwwB5R+DfqpF2owJKiBeD0iI5MVA3GT0t5AHA T6bkpCjEIDwljh9DIV37w63bdvamfN3mgrhmrQyy47t65gYt4CJtsjq5OFsG5PzOfRP/ 6ql+eJdWtaIVkK32P6+05C6oBEKZSjIeEQdjas7S65veXg7y7wyj3kygPxDDIxSc/1H2 zbcHf9aAir9V86k5eZ9M96vEtfGB+SL4Y9qxxzmMJVBdIu4Ug3oeyuCP8NvYMQk7mjWt aTKk9KFooPaYM4x77tGJWCRkGyxwxR7Ar/5Bmd0MS6oPGmAQ0c9O663Ad8oAqI/Ml8h6 hDqA== X-Gm-Message-State: AOAM533+KypZXgccTb2KbLX0A8zENwiqS3b7tpNxjMjDYLenjFFkpw73 rK0cjmAa2rl+koLTG7GqdFnvYhge32Q= X-Google-Smtp-Source: ABdhPJwvwCmNFiB3wfWZ/pcs7IS/FZH7bhi4kjDar2JYXud90nXujb8AP+eJLdAFqKx7kBH6f4dpyQ== X-Received: by 2002:a17:90a:648b:: with SMTP id h11mr5237238pjj.59.1591397938200; Fri, 05 Jun 2020 15:58:58 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:58:57 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:47 -0700 Message-Id: <20200605225811.26342-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 02/26] kni: fix reference to master/slave process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In DPDK, the correct terms for process are primary/secondary. This is bugfix, not a change in terms for new release. Fixes: f2e7592c474c ("kni: fix multi-process support") Signed-off-by: Stephen Hemminger --- lib/librte_kni/rte_kni.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index f1bb782c68ea..855facd1a319 100644 --- a/lib/librte_kni/rte_kni.h +++ b/lib/librte_kni/rte_kni.h @@ -212,7 +212,7 @@ const char *rte_kni_get_name(const struct rte_kni *kni); /** * Register KNI request handling for a specified port,and it can - * be called by master process or slave process. + * be called by primary process or secondary process. * * @param kni * pointer to struct rte_kni. From patchwork Fri Jun 5 22:57:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70891 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6F35DA0350; Sat, 6 Jun 2020 00:59:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE1DC1D57E; Sat, 6 Jun 2020 00:59:04 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id ACAD51D519 for ; Sat, 6 Jun 2020 00:59:01 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id g12so4261732pll.10 for ; Fri, 05 Jun 2020 15:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bvy+ET7uW96HQC5r6W4cu0vbmelrmo3X4c8z8/liS5I=; b=SjQCL8oRuUGGs0h3MrqI8a10lf0k7C7X6hp7gocYEGxYrkoT7xXxf7S85llzEcrgZU vMLxBixEZtMHlXWgkaBkd7HobVvdFfuYLoK5BGAxRFQ6B+5iFGlcueOD7/aBcaMVICSC xn0c79HCsLcVLgr25WsI7K9hM1R6wqO/rgH0+jUuExJTqMMaz79NKJgjCJ8p0lU8IHF7 A63WSQMbzAxiUWy7rpv1x6kRnyxHm5T1l+j16sEtcIF7XWfsG7nr7SYXklVOh4mRzSSh 4S/PEGcnRO/SWPyhqO/lBx6iD04Du15SaBRQdGY7maiZRoMd4yJ1SDSsJLiY/8oXk1Ts 8ipg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bvy+ET7uW96HQC5r6W4cu0vbmelrmo3X4c8z8/liS5I=; b=qeqs9b9P44oEiCt4luIc7o+fX2O8xNsvcYAtuGE7ns0s7NAOym7KXB/5Asz8NWkwF1 1tnn74BnurrWTjS7LRBPCNS62iV0sAooFHM4VKhlGnBXQD1M0C8pgTb9rR8fazGvHWq6 pnkJPLBfKH1FmWd8yPRtXnnSzwMZsepvdF/tc4KBnV/lLdgfkMRwjYL8bQ5JpTEyZrxM xvkuPDEkAqKIXqcQ4T2UdpdK1bWtlbwRhwTypVNYjWOToegZqPXPL0ttLJXIuEwgVBX5 6vHEEQKHTcw8E/jzkMGVtvKQASmJ1qZhzsPBpHXF4TWUDwndP6auPHoc6J8pOOLGtnAN 4IZQ== X-Gm-Message-State: AOAM533ub2Rl7ME08pqmHXgsN3weuFiShjQswWU9ahkUBgFiOfP30qFv 9dWrl74mOxQeMx7wARs36CerhPBYHpE= X-Google-Smtp-Source: ABdhPJywftaISDnzuatOT9/AV0k2ImsFxcTBSdAQo28AV6+0TwLYIBrztOCmUJy1UXAHvmdS4pYLLw== X-Received: by 2002:a17:90a:c258:: with SMTP id d24mr5375792pjx.137.1591397939965; Fri, 05 Jun 2020 15:58:59 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:58:59 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:48 -0700 Message-Id: <20200605225811.26342-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 03/26] bbdev: rename master to initial lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Conform to new API. Signed-off-by: Stephen Hemminger --- examples/bbdev_app/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/bbdev_app/main.c b/examples/bbdev_app/main.c index fb38dc3a72cb..06288e7f8add 100644 --- a/examples/bbdev_app/main.c +++ b/examples/bbdev_app/main.c @@ -1040,7 +1040,7 @@ main(int argc, char **argv) struct stats_lcore_params stats_lcore; struct rte_ring *enc_to_dec_ring; bool stats_thread_started = false; - unsigned int master_lcore_id = rte_get_master_lcore(); + unsigned int initial_lcore_id = rte_get_initial_lcore(); rte_atomic16_init(&global_exit_flag); @@ -1143,9 +1143,9 @@ main(int argc, char **argv) stats_lcore.app_params = &app_params; stats_lcore.lconf = lcore_conf; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (lcore_conf[lcore_id].core_type != 0) - /* launch per-lcore processing loop on slave lcores */ + /* launch per-lcore processing loop on worker lcores */ rte_eal_remote_launch(processing_loop, &lcore_conf[lcore_id], lcore_id); else if (!stats_thread_started) { @@ -1157,15 +1157,15 @@ main(int argc, char **argv) } if (!stats_thread_started && - lcore_conf[master_lcore_id].core_type != 0) + lcore_conf[initial_lcore_id].core_type != 0) rte_exit(EXIT_FAILURE, "Not enough lcores to run the statistics printing loop!"); - else if (lcore_conf[master_lcore_id].core_type != 0) - processing_loop(&lcore_conf[master_lcore_id]); + else if (lcore_conf[initial_lcore_id].core_type != 0) + processing_loop(&lcore_conf[initial_lcore_id]); else if (!stats_thread_started) stats_loop(&stats_lcore); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { ret |= rte_eal_wait_lcore(lcore_id); } From patchwork Fri Jun 5 22:57:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70892 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 859ADA0350; Sat, 6 Jun 2020 00:59:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FB281D58A; Sat, 6 Jun 2020 00:59:06 +0200 (CEST) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by dpdk.org (Postfix) with ESMTP id C76801D52B for ; Sat, 6 Jun 2020 00:59:02 +0200 (CEST) Received: by mail-pl1-f182.google.com with SMTP id y17so4259951plb.8 for ; Fri, 05 Jun 2020 15:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TdNNjCwT7lxNMzLIE/8EZU8zsFA4GxHsEZbek+TXv48=; b=2N5C0Jc8cAcuJo2NcGO7wcBeoCTiUxduD4kYG/EJ9KFXYj7Z/3hscadP0j/ZUOGeox uvkLPpShBGmN4E8qgmHWBmUpAJgTL0qj0CnimWTnIELHnPoplrMRPdOKtj1ZHhbO8Rv0 1/1O/eLdcoKXs2x6eIpWD0Z/FC6EzRyEYDOtUI0EatJ0qXs1LEGThqr3t5qe2lbIqzLW nmXLUNR3TpYhhFonaBsKGVdgmaFsvmldJ73TX3H6tGShMhok0rswESaMXEHUKiz738ip C9HjdxSjAKH91NXczXZ4CnZY3UCQvD+AmTy68GXeK5jRB8/tXF3jS2W3hwFzTr+4Biy1 D5jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TdNNjCwT7lxNMzLIE/8EZU8zsFA4GxHsEZbek+TXv48=; b=mAaFGyaIFnRxHSuXlMrTEVBFrATCqgjCrTgt9l0nqV95Ta3r3USUAi6gGaoCk4NnQQ yYZshGp25mfPQ3rT9gLm9qqs16+EP99ocvPXbEG5VvbkA/2DoWEhzFSWY49NwNDjgITr JxG6wYmG7gCkifz4fZxSlu27r+FjENJaXCboSHkSkAPVnAQ9eIzPbpIXUG1SUkAsvTZI k8TgD+HCMDlsyM7Yi0Ry3AvpVli5ddzzaey7mTnspiRm9k23Tzpb6ewTDOxGNW5iW76h YTLMp1xaXamhFsO3hefp2aDPQlSKEG9OjwG11BSSbfK6d6VeDMsmWasNTPa+TquIRgus NUqg== X-Gm-Message-State: AOAM532sHjMIsux1lpjKD00u66Bg3VldGOhFY1o6nzsxTv27+jaEySp5 wQyILRfYb0AfZSDbQ2Idh16O5q8GGEM= X-Google-Smtp-Source: ABdhPJygY82R85g2EKDD1o/Wdc269LdT2Dp4XzmgP3SCsuDXB3Uz5oUzKg5LPeE5bNickRrD2cakpA== X-Received: by 2002:a17:90a:17e1:: with SMTP id q88mr5148674pja.187.1591397941263; Fri, 05 Jun 2020 15:59:01 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:00 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:49 -0700 Message-Id: <20200605225811.26342-5-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 04/26] librte_power: change reference to rte_master_lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" New API name is rte_get_initial_lcore() Signed-off-by: Stephen Hemminger --- lib/librte_power/rte_power_empty_poll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_power/rte_power_empty_poll.c b/lib/librte_power/rte_power_empty_poll.c index 70c07b1533f3..d54a09b9d6a4 100644 --- a/lib/librte_power/rte_power_empty_poll.c +++ b/lib/librte_power/rte_power_empty_poll.c @@ -452,7 +452,7 @@ rte_power_empty_poll_stat_init(struct ep_params **eptr, uint8_t *freq_tlb, if (get_freq_index(LOW) > total_avail_freqs[i]) return -1; - if (rte_get_master_lcore() != i) { + if (rte_get_initial_lcore() != i) { w->wrk_stats[i].lcore_id = i; set_policy(&w->wrk_stats[i], policy); } From patchwork Fri Jun 5 22:57:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70893 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88300A0350; Sat, 6 Jun 2020 00:59:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 853D31D5C6; Sat, 6 Jun 2020 00:59:07 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by dpdk.org (Postfix) with ESMTP id D5AC81D547 for ; Sat, 6 Jun 2020 00:59:03 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id i12so3245009pju.3 for ; Fri, 05 Jun 2020 15:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yELUG3Q6/b/aZZ/ZzIXlNpOPVOumpBb0YTIwuA+qhro=; b=uM8OGb/cxGERouoCDGhBMEUTDyGaWUxc5uW5tDfTCD3Hag4/JXmpFd//vXuqx/69BM y3zGrp7YFq8S+GvcMCGQSERilsxGxUcojmxUjziNlNB69oII29qW6d+juVj8VrLiZZEV uwZ3yuxyRSA+TY/vWaCpwfG1cHO5bEzq3k5KnZOQA2kQVYkT/2P36h+7F34RUH45YiN3 OVWB9MWqulw1n0e0bLP79YS/zeCCW9EOcld6e0eJv33e4gHowhQYYHvtwoytcpEh/2cD n6rDRoUrQqKaQv9s50dopo3M2OHrC30yA/pZnLKjBnRdQ00MrzpH2qJXXkQ+J0CQYaBj +Jgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yELUG3Q6/b/aZZ/ZzIXlNpOPVOumpBb0YTIwuA+qhro=; b=tf5hsy0lW1T0wOevxwKg9QlwiWY1amNimrAaK0v6kJm/RZ9wM06C4qVAnFWVKU88Ww J/9BAIYFfrL3w/wxGlBSoEwrH8EzMRqIX5kotK94KYw/VlTkJpmZuYcW6+rkMcseLLHK kxmhxX2k7mu2AMwIyCYKGmStT6zpPiFmcoP/fsSnwAIaEfBi+42t9+/QCFzFhzR9lutl AaqoROQIsnt8ZakO6YVfc8sBFQCNryfBO7E1g/5CBh/tXmEK3tZ6NlZwIdCSaBgGhXN/ 20n6ijgVnAyIzQ0pJYineuU+/pnyUR7LzYKzf3121Z5OdkZ2SJOzVH8qZIV1j59Ay+W+ IEyQ== X-Gm-Message-State: AOAM533I6pka6xTzYik/1ocQ7fz8foqO2/Hgjdu3VmYrc5qbYokvxIK4 2Mk2kf4Yie4RITEHvV43syiKJl1pUIk= X-Google-Smtp-Source: ABdhPJzHF3HxjI0Pn3u+C8rjD8G+RK6xcU96xEhIBiiOm9nhIljzCdU07Lc3S6pJN1EOK7XpRebcwA== X-Received: by 2002:a17:902:b08d:: with SMTP id p13mr11744991plr.131.1591397942570; Fri, 05 Jun 2020 15:59:02 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:01 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:50 -0700 Message-Id: <20200605225811.26342-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 05/26] drivers: replace master/slave terminolgy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace rte_get_master_lcore() with rte_get_initial_lcore(). Replace RTE_LCORE_FOREACH_SLAVE with RTE_LCORE_FOREACH_WORKER Signed-off-by: Stephen Hemminger --- drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 6 +++--- drivers/net/bnxt/bnxt_ring.c | 4 ++-- drivers/net/qede/base/bcm_osal.c | 4 ++-- drivers/net/softnic/rte_eth_softnic_thread.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index d53fe6083a79..49c7891109e8 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -260,7 +260,7 @@ int rte_dpaa_portal_init(void *arg) BUS_INIT_FUNC_TRACE(); if ((size_t)arg == 1 || lcore == LCORE_ID_ANY) - lcore = rte_get_master_lcore(); + lcore = rte_get_initial_lcore(); else if (lcore >= RTE_MAX_LCORE) return -1; diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 21c535f2fbad..d498161fe427 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -195,7 +195,7 @@ dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev, int lcoreid) /* Set the Stashing Destination */ if (lcoreid < 0) { - lcoreid = rte_get_master_lcore(); + lcoreid = rte_get_initial_lcore(); if (lcoreid < 0) { DPAA2_BUS_ERR("Getting CPU Index failed"); return -1; @@ -259,7 +259,7 @@ dpaa2_affine_qbman_swp(void) uint64_t tid = syscall(SYS_gettid); if (lcore_id == LCORE_ID_ANY) - lcore_id = rte_get_master_lcore(); + lcore_id = rte_get_initial_lcore(); /* if the core id is not supported */ else if (lcore_id >= RTE_MAX_LCORE) return -1; @@ -307,7 +307,7 @@ dpaa2_affine_qbman_ethrx_swp(void) uint64_t tid = syscall(SYS_gettid); if (lcore_id == LCORE_ID_ANY) - lcore_id = rte_get_master_lcore(); + lcore_id = rte_get_initial_lcore(); /* if the core id is not supported */ else if (lcore_id >= RTE_MAX_LCORE) return -1; diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 24a947f27823..b649e3317ea1 100644 --- a/drivers/net/bnxt/bnxt_ring.c +++ b/drivers/net/bnxt/bnxt_ring.c @@ -429,7 +429,7 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp) if (!BNXT_HAS_NQ(bp) || bp->rxtx_nq_ring) return 0; - socket_id = rte_lcore_to_socket_id(rte_get_master_lcore()); + socket_id = rte_lcore_to_socket_id(rte_get_initial_lcore()); nqr = rte_zmalloc_socket("nqr", sizeof(struct bnxt_cp_ring_info), @@ -819,7 +819,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp) if (BNXT_NUM_ASYNC_CPR(bp) == 0) return 0; - socket_id = rte_lcore_to_socket_id(rte_get_master_lcore()); + socket_id = rte_lcore_to_socket_id(rte_get_initial_lcore()); cpr = rte_zmalloc_socket("cpr", sizeof(struct bnxt_cp_ring_info), diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c index 48d016e2404c..d7d847278565 100644 --- a/drivers/net/qede/base/bcm_osal.c +++ b/drivers/net/qede/base/bcm_osal.c @@ -132,7 +132,7 @@ void *osal_dma_alloc_coherent(struct ecore_dev *p_dev, snprintf(mz_name, sizeof(mz_name), "%lx", (unsigned long)rte_get_timer_cycles()); if (core_id == (unsigned int)LCORE_ID_ANY) - core_id = rte_get_master_lcore(); + core_id = rte_get_initial_lcore(); socket_id = rte_lcore_to_socket_id(core_id); mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, RTE_MEMZONE_IOVA_CONTIG, RTE_CACHE_LINE_SIZE); @@ -171,7 +171,7 @@ void *osal_dma_alloc_coherent_aligned(struct ecore_dev *p_dev, snprintf(mz_name, sizeof(mz_name), "%lx", (unsigned long)rte_get_timer_cycles()); if (core_id == (unsigned int)LCORE_ID_ANY) - core_id = rte_get_master_lcore(); + core_id = rte_get_initial_lcore(); socket_id = rte_lcore_to_socket_id(core_id); mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, RTE_MEMZONE_IOVA_CONTIG, align); diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index dcfb5eb82c18..a2b6f522427a 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -25,7 +25,7 @@ softnic_thread_free(struct pmd_internals *softnic) { uint32_t i; - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { struct softnic_thread *t = &softnic->thread[i]; /* MSGQs */ @@ -99,7 +99,7 @@ softnic_thread_init(struct pmd_internals *softnic) static inline int thread_is_valid(struct pmd_internals *softnic, uint32_t thread_id) { - if (thread_id == rte_get_master_lcore()) + if (thread_id == rte_get_initial_lcore()) return 0; /* FALSE */ if (softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_SERVICE)) From patchwork Fri Jun 5 22:57:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70894 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0605A0350; Sat, 6 Jun 2020 00:59:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CAE1F1D5D5; Sat, 6 Jun 2020 00:59:08 +0200 (CEST) Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by dpdk.org (Postfix) with ESMTP id 5E2111D564 for ; Sat, 6 Jun 2020 00:59:05 +0200 (CEST) Received: by mail-pj1-f65.google.com with SMTP id i12so3245037pju.3 for ; Fri, 05 Jun 2020 15:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rng55CCiRjm5x25yZAXbNgwljoljhb93oeHnsk6DNs0=; b=hh6Hjd2RuAAC9ZB9IcKdVNIzQtNJ53FIkA9iDbfilx5Kx0zFNB39VV/SufFkkKQizR Pw5RLNaqeJgncqa1lqSQDt00y3jXXm97MALe2UirzwOvnwz0zfWGl2L7n2JhLOuMEMSM 65lt8C3bcQBTZzgC9XSohXsptysAzNJ6s7vW3KeTOYIXUlMMiO0E8MzcG7i2+Q4o9TRq Ti7DVTn+GTn2kurQfLs9xAN43LIqvQJcjp92jOjxuvakKDcqf7IOn/R434Bg2wmTrnKx NWgNtS3g5UvB3qNcx9qZfkdXA3ETUV+OYN4djh/stab+ufVcU7TWggVkVRfTPKpwQrcS uFrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rng55CCiRjm5x25yZAXbNgwljoljhb93oeHnsk6DNs0=; b=uhlB0ssdluQfGcHA0o+lV0f9OVDIH2WAJ5y5KyBZoQ7nJuNDTB0QGmh0GaxChPlLNO 8UplpdKzB2HoY1zp0tU2pWCQVqZVPA1yxGWAKB6fRSOxnBGCWwsKO1ewd6uQPruTXcAc h/5yEM/pZD7wUcua5WDD4oshf8mECUzmiZVunmGQWkVWp9Ip3QYjzsjeRRBZ30E05yA4 40lGsbVVJ2L0rXYN+7ySeHkcd7yEjZuLvVniXKcMREuxrx9FAF0xZeuOx3c6zlfCWdn2 gqlfjrdDIbaG1RevVSUrKp3JH8VvFTmZ4Tf3dm+0FVKWe7ZxTeo7MjmdcvAREG5akFs1 aldQ== X-Gm-Message-State: AOAM5322J762tcSLyp8qbUojbK0RhEnuE6U4TfPQpHXkruWAHB/ob5NH OZ2ucxOg0qgU6GXX0DuIRoYF6Ci2y6o= X-Google-Smtp-Source: ABdhPJxEJ4WHnaW0IvqQLk12IwEPVb4cmrGF2wCuphZsSYf1Wr1h8xqgsC7qBqylIJcNy1Bmzy13wA== X-Received: by 2002:a17:90a:43c7:: with SMTP id r65mr5199939pjg.76.1591397943950; Fri, 05 Jun 2020 15:59:03 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:03 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:51 -0700 Message-Id: <20200605225811.26342-7-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 06/26] examples/distrutor: rename master to initial X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Conform to new API Signed-off-by: Stephen Hemminger --- examples/distributor/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/distributor/main.c b/examples/distributor/main.c index 567c5e98919d..d3906bede6fc 100644 --- a/examples/distributor/main.c +++ b/examples/distributor/main.c @@ -612,7 +612,7 @@ static int init_power_library(void) { int ret = 0, lcore_id; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { /* init power management library */ ret = rte_power_init(lcore_id); if (ret) { @@ -808,7 +808,7 @@ main(int argc, char *argv[]) * available, the higher frequency cores will go to the * distributor first, then rx, then tx. */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_power_get_capabilities(lcore_id, &lcore_cap); @@ -841,7 +841,7 @@ main(int argc, char *argv[]) * after the high performing core assignment above, pre-assign * them here. */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (lcore_id == (unsigned int)distr_core_id || lcore_id == (unsigned int)rx_core_id || lcore_id == (unsigned int)tx_core_id) @@ -872,7 +872,7 @@ main(int argc, char *argv[]) * Kick off all the worker threads first, avoiding the pre-assigned * lcore_ids for tx, rx and distributor workloads. */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (lcore_id == (unsigned int)distr_core_id || lcore_id == (unsigned int)rx_core_id || lcore_id == (unsigned int)tx_core_id) @@ -925,7 +925,7 @@ main(int argc, char *argv[]) usleep(1000); } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } From patchwork Fri Jun 5 22:57:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70895 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 26BA7A0350; Sat, 6 Jun 2020 01:00:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F0301D5DC; Sat, 6 Jun 2020 00:59:10 +0200 (CEST) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id A129D1D567 for ; Sat, 6 Jun 2020 00:59:06 +0200 (CEST) Received: by mail-pl1-f196.google.com with SMTP id y18so4266643plr.4 for ; Fri, 05 Jun 2020 15:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XSpJNa6t5RwC0gPoDXSI7UXiiMlOYAHd+IVlpTd7Q64=; b=r6PFmOUXdbyRBsQKoaHyBqX5gI5wK2n+2WTQX2xfYIUBzyIfevvkGsqKs7xUgFheYl pFm6iGs+WFXQrgsyZGp8xAc/Yya/Cr3MBbXC9Zd/BU5L8/kesqMolkB3kt/GmbseNxNE loVB7LMlKvIC5e/FEET610sIw739HXnLsttlhIlQ7cwC8k9WRek5tTuPRhFtx8e2Llxw iT4ztcSbiGTSN4cmhHzURo1vSZPGx9MB83a3mY5SsYK0g4iUxZRySom/hKLohoe6yEL7 ehgWxbHiqri7xpGY+HBgqeucgW9V1TM2E8VesC+QCNT1vr3+loMQ+xZBEo5wYNrktj+f BMIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XSpJNa6t5RwC0gPoDXSI7UXiiMlOYAHd+IVlpTd7Q64=; b=gAYyh5/LZIbTQII+wiWzEzCpSEVYDy7tr4lot8hdma/UmKWWwLghvnFXIReOjUFc8L J7qL9b1KzCJwbrsZisAGZDGcW5uqjDIaEoHD7J7WJwfk+RPu3rf5ET7C4U/e5OSKFOAH 3ZhIhEp6UKMPFSb36j7EDfbbGWNIp+7K0GSvvksHOZsLpko234IV2sJMqkCelcoKfYZO JVgpEKamnLu4umlD18ohA4L/+C2oweN00VZLG+p9vHFjzZ49OWbNlk2r9Is1nfwbj452 1XLozHM4fVhV+UVYZpPck4IRYWlRYrRDfd3wV+00pdvS6pUwQjrw7p1eCH2N8tEY7xzV eVNw== X-Gm-Message-State: AOAM531liht5XdVmQjJ0eVGCHMTh9V36nXcycLNIXjb2q5M8DdhDB+T4 UJTt5EIYrC9N6H5IWVvanFnqhgGnY4I= X-Google-Smtp-Source: ABdhPJyJRoznX3C6jES1WmIpqW7LeKkJ6R8QohSpK/RO57dmWRZAAmprZW+xgUYWIJv6Xc2gjVbApw== X-Received: by 2002:a17:90a:8d11:: with SMTP id c17mr5366068pjo.201.1591397945293; Fri, 05 Jun 2020 15:59:05 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:04 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:52 -0700 Message-Id: <20200605225811.26342-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 07/26] examples/bond: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Change the references to master lcore. For now, leave refernces to slave for bonding since that is part of the API not addressed yet. Signed-off-by: Stephen Hemminger --- examples/bond/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/bond/main.c b/examples/bond/main.c index 8608285b686e..e415d7bc9c8c 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -590,7 +590,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result, return; } - /* start lcore main on core != master_core - ARP response thread */ + /* start lcore main on core != initial_core - ARP response thread */ slave_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0); if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0)) return; @@ -802,7 +802,7 @@ cmdline_parse_ctx_t main_ctx[] = { NULL, }; -/* prompt function, called from main on MASTER lcore */ +/* prompt function, called from main on initial lcore */ static void prompt(__rte_unused void *arg1) { struct cmdline *cl; @@ -852,12 +852,12 @@ main(int argc, char *argv[]) rte_spinlock_init(&global_flag_stru_p->lock); /* check state of lcores */ - RTE_LCORE_FOREACH_SLAVE(slave_core_id) { + RTE_LCORE_FOREACH_WORKER(slave_core_id) { if (rte_eal_get_lcore_state(slave_core_id) != WAIT) return -EBUSY; } - /* start lcore main on core != master_core - ARP response thread */ + /* start lcore main on core != initial_core - ARP response thread */ slave_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0); if ((slave_core_id >= RTE_MAX_LCORE) || (slave_core_id == 0)) return -EPERM; From patchwork Fri Jun 5 22:57:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70896 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 00E7FA0350; Sat, 6 Jun 2020 01:00:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74D6B1D5E6; Sat, 6 Jun 2020 00:59:11 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by dpdk.org (Postfix) with ESMTP id A1DBB1D5D0 for ; Sat, 6 Jun 2020 00:59:08 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id k2so3247427pjs.2 for ; Fri, 05 Jun 2020 15:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TN1IU4MlvKhihX6I/dxXIGHNUwmlWord9Q2L+ZlIhSw=; b=2RR0GUjCxdt26Dnaum9r/5nhk+swpiQAKnOnb6+UwEx/qCaF4scP4VxdtYiebnK+rD uov/nEE43vCN4RTtPMAvl2hJpDqwJpXzwx5ukO9n31GxsfCNnjCiQkgapOObvLFwj6fy gzCNTnvvKLLe/E/eYIl9JZNS4+Bx58S56MERmbctnNN0ElJpM+wMDj1g7R6HQ2Z8jL0S /RCABRron9pMA+MR4GoMNbn4JngVMPMqfO6SRp7+uWbts4JCL6U6a6Y85UZJbYSl/u9W 41IBzdX91VxrtnttL8debZf9epf1TrjON8myps0XFJQvyZWCZupAUHmj1v60GKTxYRIi WixA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TN1IU4MlvKhihX6I/dxXIGHNUwmlWord9Q2L+ZlIhSw=; b=UPV4eS1XzPxSeGhn7S/LKz6dtkbxJGYf4pMsz2uACzgBhKadUJQcmc92HtOuWNhuSq DmVUdG7f+KT/FRxm5XMqW++sTPb4KHGsHxmlKixi14Whr+GJDuoCGRs+D8ApuQQY+JaA rZFmnCl8O7LaShpoEsCCfXL7Odhq7e5QAz7xCgKttTSIOWucGUUxnDBFglVyvUHfYeKA MHcm6L4Rke7BPx0cTRhfQ5UXN4SgnhstqVUr3QhMn6+QweTllGGWHeh1gTNs4dQdWN9x zkGI+hdmFLoWq0VRHyRB7vmlOvXUv93zlY1p8TjgV11BS+0GQvhRloS5khiOFeeG+O/8 eCVQ== X-Gm-Message-State: AOAM533xMknEirkQaKDlOxfgC1/lZ3uucBXsgAvxtU0K7fbg40Zk4fPu v8AZFw4NKcESCxSR6WRTxYFzfWaulX4= X-Google-Smtp-Source: ABdhPJxZPGHMs4AiaMqWC2Vmzsr9amOf9WsXF+WwrfaoIeLRPVzAS9c5dfiA/esxLYqtUgMVBGpFMg== X-Received: by 2002:a17:90b:2042:: with SMTP id ji2mr5548032pjb.68.1591397946975; Fri, 05 Jun 2020 15:59:06 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:05 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:53 -0700 Message-Id: <20200605225811.26342-9-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 08/26] examples/ethtool-app: replace references to slave with worker X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Conforms to new API naming conventions. Signed-off-by: Stephen Hemminger --- examples/ethtool/ethtool-app/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c index 7383413215d6..a55d31d891df 100644 --- a/examples/ethtool/ethtool-app/main.c +++ b/examples/ethtool/ethtool-app/main.c @@ -176,7 +176,7 @@ static void process_frame(struct app_port *ptr_port, rte_ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr); } -static int slave_main(__rte_unused void *ptr_data) +static int worker_main(__rte_unused void *ptr_data) { struct app_port *ptr_port; struct rte_mbuf *ptr_frame; @@ -284,16 +284,16 @@ int main(int argc, char **argv) app_cfg.cnt_ports = cnt_ports; if (rte_lcore_count() < 2) - rte_exit(EXIT_FAILURE, "No available slave core!\n"); - /* Assume there is an available slave.. */ + rte_exit(EXIT_FAILURE, "No available worker core!\n"); + /* Assume there is an available worker.. */ id_core = rte_lcore_id(); id_core = rte_get_next_lcore(id_core, 1, 1); - rte_eal_remote_launch(slave_main, NULL, id_core); + rte_eal_remote_launch(worker_main, NULL, id_core); ethapp_main(); app_cfg.exit_now = 1; - RTE_LCORE_FOREACH_SLAVE(id_core) { + RTE_LCORE_FOREACH_WORKER(id_core) { if (rte_eal_wait_lcore(id_core) < 0) return -1; } From patchwork Fri Jun 5 22:57:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70897 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8C8DDA0350; Sat, 6 Jun 2020 01:00:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 417211D603; Sat, 6 Jun 2020 00:59:13 +0200 (CEST) Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) by dpdk.org (Postfix) with ESMTP id A7F601D5D0 for ; Sat, 6 Jun 2020 00:59:09 +0200 (CEST) Received: by mail-pg1-f170.google.com with SMTP id e9so5826476pgo.9 for ; Fri, 05 Jun 2020 15:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VkvR/tJszlILjuUfOY6/qEntVb2eFhf5fZ8BA6J80P4=; b=pjxDnZnxBztMAlObVmOF1zVLV+886R2szRIk9ShPmX3RlYSHYFy1dRRKB45c0tB9cs 6fwEC79NPYE9F6Fm7gKyQYoHYGhC69DzvGgQ7DuueVUJYEz/tC2JYyQYeCCoRDkXl3RM nHnRu+WMzG38/8wMHv6GBbKzN+lMWX42CHxV2+DxFbhwr8jcEiAU+fMB8JDLGWUrQeFv mKMh+yorsCmnxK8BaCmFpmp26PYyOVv5YpYsIrkVEBU67j4+6sU8cw2q3SUZnSAwra0s nWDPQPaZxrCARuqgkgnGiXMhuPEv81sgh2gx7MNGAfX4+Y2Hb4kED7KMqvsUZPYvDTO1 n16w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VkvR/tJszlILjuUfOY6/qEntVb2eFhf5fZ8BA6J80P4=; b=QsT5Q+67D+LZUw835ePTZb8C8z0OqXuDR87MP+BZ/ExOzwhptpH4P/C8DYiyuFqPBP m/4CG6xY492odqWIUTii17yZMV7cgkAUCdW8/pakrfUtAmdx/qzdnVWRQFVHlzcS/y71 RJPeJp3BZWdUGX2CEqAUAqNPygntkgaYAC1xbscaJwLgN4guyBDzBS7a8A8az/5mkWKO JfPda9Fp8CugoKJyjfz91TzV+kE0iReCLELVMZAeJ2OrYrvSyOshhje4xAuiX1EVdGA2 AXizTfr+PjHuBjW3HMCf/5VXVVGH58GbvBTcDDKoGBAWKIB8HCxVC8uJZTudWrevs02d oVZw== X-Gm-Message-State: AOAM531ZMzOY6FrbjwjvkTNdmFyFX2E8GXJl+3N8WfGnO5JzsH1CYP1P wwqCQQSYwEJu5CQGv4lfrV9g2SwQ+Zk= X-Google-Smtp-Source: ABdhPJyJ1ccajFilDeE9Ctm47K7QRc0g5vEw0cbiJdaLK6IfDM4bCtvvwl089L+1WQTVQ7l7AK3hzw== X-Received: by 2002:a63:747:: with SMTP id 68mr10994645pgh.273.1591397948273; Fri, 05 Jun 2020 15:59:08 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:07 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:54 -0700 Message-Id: <20200605225811.26342-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 09/26] examples/ip_pipeline: replace references to master_lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead of primary lcore Signed-off-by: Stephen Hemminger --- examples/ip_pipeline/main.c | 2 +- examples/ip_pipeline/thread.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/ip_pipeline/main.c b/examples/ip_pipeline/main.c index 97d1e91c2b4b..060c6311ddc6 100644 --- a/examples/ip_pipeline/main.c +++ b/examples/ip_pipeline/main.c @@ -250,7 +250,7 @@ main(int argc, char **argv) rte_eal_mp_remote_launch( thread_main, NULL, - SKIP_MASTER); + SKIP_INITIAL); /* Script */ if (app.script_name) diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index adb83167cd84..feefdca4eba2 100644 --- a/examples/ip_pipeline/thread.c +++ b/examples/ip_pipeline/thread.c @@ -32,7 +32,7 @@ #endif /** - * Master thead: data plane thread context + * Initial thread: data plane thread context */ struct thread { struct rte_ring *msgq_req; @@ -78,7 +78,7 @@ struct thread_data { static struct thread_data thread_data[RTE_MAX_LCORE]; /** - * Master thread: data plane thread init + * Initial thread: data plane thread init */ static void thread_free(void) @@ -105,7 +105,7 @@ thread_init(void) { uint32_t i; - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { char name[NAME_MAX]; struct rte_ring *msgq_req, *msgq_rsp; struct thread *t = &thread[i]; @@ -137,7 +137,7 @@ thread_init(void) return -1; } - /* Master thread records */ + /* Initial thread records */ t->msgq_req = msgq_req; t->msgq_rsp = msgq_rsp; t->enabled = 1; @@ -179,7 +179,7 @@ pipeline_is_running(struct pipeline *p) } /** - * Master thread & data plane threads: message passing + * Initial thread & data plane threads: message passing */ enum thread_req_type { THREAD_REQ_PIPELINE_ENABLE = 0, @@ -213,7 +213,7 @@ struct thread_msg_rsp { }; /** - * Master thread + * Initial thread */ static struct thread_msg_req * thread_msg_alloc(void) @@ -556,7 +556,7 @@ thread_msg_handle(struct thread_data *t) } /** - * Master thread & data plane threads: message passing + * Initial thread & data plane threads: message passing */ enum pipeline_req_type { /* Port IN */ @@ -730,7 +730,7 @@ struct pipeline_msg_rsp { }; /** - * Master thread + * Initial thread */ static struct pipeline_msg_req * pipeline_msg_alloc(void) From patchwork Fri Jun 5 22:57:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70898 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6171A0350; Sat, 6 Jun 2020 01:00:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 933F21D61B; Sat, 6 Jun 2020 00:59:14 +0200 (CEST) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) by dpdk.org (Postfix) with ESMTP id EE74F1D5E6 for ; Sat, 6 Jun 2020 00:59:10 +0200 (CEST) Received: by mail-pf1-f179.google.com with SMTP id a127so5613778pfa.12 for ; Fri, 05 Jun 2020 15:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=61Vi4FGZytjg+jh4get4I3NRcVkP+biWELOvXBDju1s=; b=f8lDfYXauBAdfIgwRz1KaYJ02CBhdnbzfu5f6j/OB+kDs7BaVyJsh1gnabZ8e7vRNR 7tRF/jfpv8zynZGSGOmSvNlkDs2eFtqpokF3f68denIYrkcefnMksjsXBliYB6WV6q02 aFXbbXWKb9f/GkfRE/subF41I27WKK0NuAbjbnzdyJmojFW6tBNKQfOGT2tw0ZOi4nYU 1l05iFQFk5hvqyoeQpUUBo8tL/laGgck/vWg9sDswmR1WkK3cyWUZ9gkhxqfhwKvh/ZF YqHqOCS0NPxCyO6o38edQSiUZB031EL28kMolpXNlKwWwKvt8TKJdrnEW2pDHqLUWlpH 5ZMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=61Vi4FGZytjg+jh4get4I3NRcVkP+biWELOvXBDju1s=; b=ZtUlThyx1n2LFMAD8Q+cXhgl7Ls1m/lUk/HmkoqtsJdWWd9cOd5Qb5Q8kH205JjZDa Mz75GeK2zkIKuNoA7GYDOB5AXnfltt5w+uRG3IE8gB0mnW+K1/YZVdU5vyH3tH8Ne+Rl NWxR+gCJgbC9LiKEN3Wie59dE52UVdwE8TJV+4M5EcWWM1k+STP8dHOm5LHKXs+WeRwm 22yt5uuG4eB+eNdLvlGK2hsa8Nt82fkIAdOtSAvWNwK+ySEguZpqIkV1tZBj24pvxJ6y cR7Z+KscIYhbncMwmUobzl3LIt3BLTaqtfvuhRkSjVwdcpcgexCXn1v/Nz/GT+FRsZoe x57w== X-Gm-Message-State: AOAM531bA/zA8vRYQfNIa43XGAbBzcY01IoxHxBmnSvfYmrDtbgEv1/F iXZL5B+he3rJKAF0zMJctL6i3BgaAog= X-Google-Smtp-Source: ABdhPJwMS3I7p8rypa3TIsAuLgzSh3BCFYRJEEekgSm14WRJKyybJNs7WUKi2cw4n0Sti52XqJY5gA== X-Received: by 2002:a63:1d54:: with SMTP id d20mr10077711pgm.301.1591397949616; Fri, 05 Jun 2020 15:59:09 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:08 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:55 -0700 Message-Id: <20200605225811.26342-11-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 10/26] examples/qos_{meter/sched}: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead. Signed-off-by: Stephen Hemminger --- examples/qos_meter/main.c | 4 ++-- examples/qos_sched/args.c | 22 +++++++++++----------- examples/qos_sched/cmdline.c | 2 +- examples/qos_sched/main.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c index 6d057abfe3e7..9f1497121105 100644 --- a/examples/qos_meter/main.c +++ b/examples/qos_meter/main.c @@ -457,8 +457,8 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "Invalid configure flow table\n"); /* Launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c index 7431b29816aa..3fdd7ddf1651 100644 --- a/examples/qos_sched/args.c +++ b/examples/qos_sched/args.c @@ -22,7 +22,7 @@ #define MAX_OPT_VALUES 8 #define SYS_CPU_DIR "/sys/devices/system/cpu/cpu%u/topology/" -static uint32_t app_master_core = 1; +static uint32_t app_initial_core = 1; static uint32_t app_numa_mask; static uint64_t app_used_core_mask = 0; static uint64_t app_used_port_mask = 0; @@ -40,7 +40,7 @@ static const char usage[] = " \n" "Application optional parameters: \n" " --i : run in interactive mode (default value is %u) \n" - " --mst I : master core index (default value is %u) \n" + " --mst I : initial core index (default value is %u) \n" " --rsz \"A, B, C\" : Ring sizes \n" " A = Size (in number of buffer descriptors) of each of the NIC RX \n" " rings read by the I/O RX lcores (default value is %u) \n" @@ -72,7 +72,7 @@ static const char usage[] = static void app_usage(const char *prgname) { - printf(usage, prgname, APP_INTERACTIVE_DEFAULT, app_master_core, + printf(usage, prgname, APP_INTERACTIVE_DEFAULT, app_initial_core, APP_RX_DESC_DEFAULT, APP_RING_SIZE, APP_TX_DESC_DEFAULT, MAX_PKT_RX_BURST, PKT_ENQUEUE, PKT_DEQUEUE, MAX_PKT_TX_BURST, NB_MBUF, @@ -98,7 +98,7 @@ app_eal_core_mask(void) cm |= (1ULL << i); } - cm |= (1ULL << rte_get_master_lcore()); + cm |= (1ULL << rte_get_initial_lcore()); return cm; } @@ -353,7 +353,7 @@ app_parse_args(int argc, char **argv) break; } if (str_is(optname, "mst")) { - app_master_core = (uint32_t)atoi(optarg); + app_initial_core = (uint32_t)atoi(optarg); break; } if (str_is(optname, "rsz")) { @@ -408,18 +408,18 @@ app_parse_args(int argc, char **argv) } } - /* check master core index validity */ - for(i = 0; i <= app_master_core; i++) { - if (app_used_core_mask & (1u << app_master_core)) { - RTE_LOG(ERR, APP, "Master core index is not configured properly\n"); + /* check initial core index validity */ + for(i = 0; i <= app_initial_core; i++) { + if (app_used_core_mask & (1u << app_initial_core)) { + RTE_LOG(ERR, APP, "Initial core index is not configured properly\n"); app_usage(prgname); return -1; } } - app_used_core_mask |= 1u << app_master_core; + app_used_core_mask |= 1u << app_initial_core; if ((app_used_core_mask != app_eal_core_mask()) || - (app_master_core != rte_get_master_lcore())) { + (app_initial_core != rte_get_initial_lcore())) { RTE_LOG(ERR, APP, "EAL core mask not configured properly, must be %" PRIx64 " instead of %" PRIx64 "\n" , app_used_core_mask, app_eal_core_mask()); return -1; diff --git a/examples/qos_sched/cmdline.c b/examples/qos_sched/cmdline.c index ba68e0d02693..67e7695b6558 100644 --- a/examples/qos_sched/cmdline.c +++ b/examples/qos_sched/cmdline.c @@ -599,7 +599,7 @@ cmdline_parse_ctx_t main_ctx[] = { NULL, }; -/* prompt function, called from main on MASTER lcore */ +/* prompt function, called from main on initial lcore */ void prompt(void) { diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c index 73864d66dbc8..9c6be9fa17c0 100644 --- a/examples/qos_sched/main.c +++ b/examples/qos_sched/main.c @@ -204,7 +204,7 @@ main(int argc, char **argv) return -1; /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(app_main_loop, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(app_main_loop, NULL, SKIP_INITIAL); if (interactive) { sleep(1); From patchwork Fri Jun 5 22:57:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70899 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B312BA0350; Sat, 6 Jun 2020 01:00:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A7C091D607; Sat, 6 Jun 2020 00:59:15 +0200 (CEST) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by dpdk.org (Postfix) with ESMTP id A21371D603 for ; Sat, 6 Jun 2020 00:59:12 +0200 (CEST) Received: by mail-pg1-f171.google.com with SMTP id u5so5852568pgn.5 for ; Fri, 05 Jun 2020 15:59:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lK9P8puqyREljoc5+f9rViWo/3+6viGqEM0hMv/mduI=; b=TUG7PARZiKmBSTT1mX0186f5v29LGKemfklCF2ofSNDFe8jWRDrUGolod63vyuj17c JBqnkjQTRK2C2dEnihRk5pSaoPAiJPUkOACk0d6ILcEac7DvJSd7CBuxDWOtnJxLL9V4 MCykb0KfCMy2HFD/Trgn45gwRxzIjJMFFbUkkq8P9tuCxGACNs1pDZZrWRqPRdWURgcN ORigSlNCNotKva35FPsNH3hezvvH7hqcgvfhXd33OmqfVeQrxgXftJ01fgDn7Gwtz1hd nMLnESxn0vxj4Rku2D5cOwDUfm2CSoMg2JNxh9oYZuK2GHVE8Ste1rDpKxEWW4EqOr5q LuLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lK9P8puqyREljoc5+f9rViWo/3+6viGqEM0hMv/mduI=; b=eqVD4xA+j/Ite15fUW6Flh31T3MmOwJWYgRSmk1kV95syfPe+XBmmHZdOU+1BReqfC SF95tdAIDIL0gvXw/i874PpSnkXH1WImrNrxAIrxLi1qxlf1AjY54n4J9X2VPVyV95sN f2311b3DyH6540P8jUol9CFLDNhyk4+nfrqNng6hnmV8upo6U7qKZSrielhzTT5eCoEl /EGVLgQ8m+HxnDfUyLbQh/NHwRjCAMmDo7+hEvEcGmFlDiAM+hNL3URFu9BcdEE4fwRJ ynPr2yRbUVqmDZyxTaUMK5uI/U3Q4Y3vjUfWIi4ry+1Tm/EZfAweLWyW8MjBAPvLFE9h OPPg== X-Gm-Message-State: AOAM5319UKdTTHX2noPkhUStoI+emApvDt/kPHmdgGtdvDLmUxueWV1u zohaaw33Lt7qnQHM4ZtCyUiZXFu70l4= X-Google-Smtp-Source: ABdhPJyyZ3tIVJb7YnQkr58d1YRoUCOlBw21brGGdSA83LjUistDhN7YWdo/ntMTHxBrsHMsdpnSzw== X-Received: by 2002:a63:1a13:: with SMTP id a19mr11432833pga.350.1591397951291; Fri, 05 Jun 2020 15:59:11 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:10 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:56 -0700 Message-Id: <20200605225811.26342-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 11/26] examples/l3fwd: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead. Signed-off-by: Stephen Hemminger --- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-graph/main.c | 14 +++++++------- examples/l3fwd-power/main.c | 20 ++++++++++---------- examples/l3fwd/main.c | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index f22fca732892..c351f87bc159 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -2110,8 +2110,8 @@ main(int argc, char **argv) check_all_ports_link_status(enabled_port_mask); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index c70270c4d131..8b9f61fd8e4a 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -167,8 +167,8 @@ check_lcore_params(void) return -1; } - if (lcore == rte_get_master_lcore()) { - printf("Error: lcore %u is master lcore\n", lcore); + if (lcore == rte_get_initial_lcore()) { + printf("Error: lcore %u is initial lcore\n", lcore); return -1; } socketid = rte_lcore_to_socket_id(lcore); @@ -1099,16 +1099,16 @@ main(int argc, char **argv) route_str, i); } - /* Launch per-lcore init on every slave lcore */ - rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_MASTER); + /* Launch per-lcore init on every worker lcore */ + rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_INITIAL); - /* Accumulate and print stats on master until exit */ + /* Accumulate and print stats on initial until exit */ if (rte_graph_has_stats_feature()) print_stats(); - /* Wait for slave cores to exit */ + /* Wait for worker cores to exit */ ret = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { ret = rte_eal_wait_lcore(lcore_id); /* Destroy graph */ if (ret < 0 || rte_graph_destroy( diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 9db94ce044c2..71a60bb93a37 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1351,7 +1351,7 @@ check_lcore_params(void) "off\n", lcore, socketid); } if (app_mode == APP_MODE_TELEMETRY && lcore == rte_lcore_id()) { - printf("cannot enable master core %d in config for telemetry mode\n", + printf("cannot enable initial core %d in config for telemetry mode\n", rte_lcore_id()); return -1; } @@ -2089,7 +2089,7 @@ get_current_stat_values(uint64_t *values) uint64_t app_eps = 0, app_fps = 0, app_br = 0; uint64_t count = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { qconf = &lcore_conf[lcore_id]; if (qconf->n_rx_queue == 0) continue; @@ -2181,10 +2181,10 @@ launch_timer(unsigned int lcore_id) RTE_SET_USED(lcore_id); - if (rte_get_master_lcore() != lcore_id) { - rte_panic("timer on lcore:%d which is not master core:%d\n", + if (rte_get_initial_lcore() != lcore_id) { + rte_panic("timer on lcore:%d which is not initial core:%d\n", lcore_id, - rte_get_master_lcore()); + rte_get_initial_lcore()); } RTE_LOG(INFO, POWER, "Bring up the Timer\n"); @@ -2515,11 +2515,11 @@ main(int argc, char **argv) /* launch per-lcore init on every lcore */ if (app_mode == APP_MODE_LEGACY) { - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); } else if (app_mode == APP_MODE_EMPTY_POLL) { empty_poll_stop = false; rte_eal_mp_remote_launch(main_empty_poll_loop, NULL, - SKIP_MASTER); + SKIP_INITIAL); } else { unsigned int i; @@ -2535,7 +2535,7 @@ main(int argc, char **argv) else rte_exit(EXIT_FAILURE, "failed to register metrics names"); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_spinlock_init(&stats[lcore_id].telemetry_lock); } rte_timer_init(&telemetry_timer); @@ -2543,13 +2543,13 @@ main(int argc, char **argv) handle_app_stats, "Returns global power stats. Parameters: None"); rte_eal_mp_remote_launch(main_telemetry_loop, NULL, - SKIP_MASTER); + SKIP_INITIAL); } if (app_mode == APP_MODE_EMPTY_POLL || app_mode == APP_MODE_TELEMETRY) launch_timer(rte_lcore_id()); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 24ede42903db..5ad2256e68c8 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1278,7 +1278,7 @@ main(int argc, char **argv) ret = 0; /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_INITIAL); if (evt_rsrc->enabled) { for (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++) rte_event_eth_rx_adapter_stop( From patchwork Fri Jun 5 22:57:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70900 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5DE0A0350; Sat, 6 Jun 2020 01:00:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 08B401D62E; Sat, 6 Jun 2020 00:59:17 +0200 (CEST) Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) by dpdk.org (Postfix) with ESMTP id 101F81D60A for ; Sat, 6 Jun 2020 00:59:14 +0200 (CEST) Received: by mail-pg1-f182.google.com with SMTP id o8so5834464pgm.7 for ; Fri, 05 Jun 2020 15:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZfbNcCx918xOeWFOiEYB5dFm2HG91Mvws0TzTCNn8vc=; b=U2FOgN0/cBavQn4kJkpwBMPTFVoKdSny4ABaKeT4lbavwVvb+3zfX2nQlE9r8CW2F2 mwfCiCPFoAaXpBN0quEUFNxi7m9S/roTs7hnPFKNTlCwVD6caotIA2mtNbW1pdEZk3Ch +7rI9OCQH9n1/6P99Y9PnEsQplLLVoQTS6HgYvfljhanj5sp2Nv3DkN1LIkPQncWThRl PG6p1eBl5A80fyEMESmsh84uN4ZIEAdhlZii7E1TrzDtNLgAAWo7QPeObF+nQoqJrkf8 ZfdpCV5uCpkVg7ZzNaZAs/et1uSnpZXMLlD0xCFJM2g7wfSbaE4umA1/sgxDPgz4KNeZ 4gGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZfbNcCx918xOeWFOiEYB5dFm2HG91Mvws0TzTCNn8vc=; b=dS7HEtq1eKZ49wWDZy+U0Ux1olxDuDND36Bfkw8Yhh1G6OZgFaLybklpecjXErP1kp TzCKcJOgCAbHY3MwiuRV3lTUhRknt4+5bQEgwSw0nmi1xm8pzY4B3W3sY4Y/hRXLzRfU ZWuq9OeRNZ10xdL7VD0VC5u5pVZCW7DSsndga4mJc+9E/24EfghtmsFYPtrLJlTZJnVc ifzQL5PXmgPUfgOWpRFwPMYd7h3mV3GHD7T0E27CRuvB7KI9HjtpqJg5u0KhloYuoUEY trdwQN5fbXgMGIIBGf2k16qxiOD4orEUrV7hAJhHDvbf8zuefNT5Ujo5sW4ohsEN03vu nZhg== X-Gm-Message-State: AOAM532ITPaBZNiiHBimxIqh1R/ovv0mSc26pnB+Xc2tM2sXz5p3bLnS V5hVXvp5x/kjDjtzqsBANCZt5tBIpEg= X-Google-Smtp-Source: ABdhPJxym100GDWBMQv1bQWppAP8zqWkxV0sVVDT56+j4YcnXE27zuVBRLGPmdvwcqRIhvUGpfu+uw== X-Received: by 2002:a62:25c2:: with SMTP id l185mr11859040pfl.58.1591397952660; Fri, 05 Jun 2020 15:59:12 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:11 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:57 -0700 Message-Id: <20200605225811.26342-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 12/26] examples/l2fwd: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use term initial lcore instead. Signed-off-by: Stephen Hemminger --- examples/l2fwd-cat/l2fwd-cat.c | 2 +- examples/l2fwd-crypto/main.c | 8 ++++---- examples/l2fwd-event/l2fwd_event_generic.c | 2 +- examples/l2fwd-event/l2fwd_event_internal_port.c | 2 +- examples/l2fwd-event/l2fwd_poll.c | 2 +- examples/l2fwd-event/main.c | 2 +- examples/l2fwd-jobstats/main.c | 4 ++-- examples/l2fwd-keepalive/main.c | 6 +++--- examples/l2fwd/main.c | 8 ++++---- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c index 45a497c082da..a8a6e0c6ca91 100644 --- a/examples/l2fwd-cat/l2fwd-cat.c +++ b/examples/l2fwd-cat/l2fwd-cat.c @@ -198,7 +198,7 @@ main(int argc, char *argv[]) if (rte_lcore_count() > 1) printf("\nWARNING: Too many lcores enabled. Only 1 used.\n"); - /* Call lcore_main on the master core only. */ + /* Call lcore_main on the initial core only. */ lcore_main(); return 0; diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index fcb55c370add..07b68ee2c5f1 100644 --- a/examples/l2fwd-crypto/main.c +++ b/examples/l2fwd-crypto/main.c @@ -872,8 +872,8 @@ l2fwd_main_loop(struct l2fwd_crypto_options *options) if (unlikely(timer_tsc >= (uint64_t)timer_period)) { - /* do this only on master core */ - if (lcore_id == rte_get_master_lcore() + /* do this only on initial core */ + if (lcore_id == rte_get_initial_lcore() && options->refresh_period) { print_stats(); timer_tsc = 0; @@ -2800,8 +2800,8 @@ main(int argc, char **argv) /* launch per-lcore init on every lcore */ rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, (void *)&options, - CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c index 2dc95e5f7d1a..63de608db459 100644 --- a/examples/l2fwd-event/l2fwd_event_generic.c +++ b/examples/l2fwd-event/l2fwd_event_generic.c @@ -72,7 +72,7 @@ l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc) event_d_conf.nb_event_port_enqueue_depth = dev_info.max_event_port_enqueue_depth; - /* Ignore Master core and service cores. */ + /* Ignore initial core and service cores. */ num_workers = rte_lcore_count() - 1 - rte_service_lcore_count(); if (dev_info.max_event_ports < num_workers) num_workers = dev_info.max_event_ports; diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c index 63d57b46c2da..376c44d662a1 100644 --- a/examples/l2fwd-event/l2fwd_event_internal_port.c +++ b/examples/l2fwd-event/l2fwd_event_internal_port.c @@ -71,7 +71,7 @@ l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc) event_d_conf.nb_event_port_enqueue_depth = dev_info.max_event_port_enqueue_depth; - /* Ignore Master core. */ + /* Ignore initial core. */ num_workers = rte_lcore_count() - 1; if (dev_info.max_event_ports < num_workers) num_workers = dev_info.max_event_ports; diff --git a/examples/l2fwd-event/l2fwd_poll.c b/examples/l2fwd-event/l2fwd_poll.c index 2033c65e54b1..6a16819ad5e8 100644 --- a/examples/l2fwd-event/l2fwd_poll.c +++ b/examples/l2fwd-event/l2fwd_poll.c @@ -116,7 +116,7 @@ l2fwd_poll_lcore_config(struct l2fwd_resources *rsrc) /* get the lcore_id for this port */ while (rte_lcore_is_enabled(rx_lcore_id) == 0 || - rx_lcore_id == rte_get_master_lcore() || + rx_lcore_id == rte_get_initial_lcore() || poll_rsrc->lcore_queue_conf[rx_lcore_id].n_rx_port == rsrc->rx_queue_per_lcore) { rx_lcore_id++; diff --git a/examples/l2fwd-event/main.c b/examples/l2fwd-event/main.c index 9593ef11e357..f7a3af91bceb 100644 --- a/examples/l2fwd-event/main.c +++ b/examples/l2fwd-event/main.c @@ -671,7 +671,7 @@ main(int argc, char **argv) /* launch per-lcore init on every lcore */ rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, rsrc, - SKIP_MASTER); + SKIP_INITIAL); l2fwd_event_print_stats(rsrc); if (rsrc->event_mode) { struct l2fwd_event_resources *evt_rsrc = diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c index 396fd89db446..eae53c487501 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -1019,8 +1019,8 @@ main(int argc, char **argv) RTE_LOG(INFO, L2FWD, "Stats display disabled\n"); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c index b7585d55e1dd..287cdbd1f1b2 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -790,8 +790,8 @@ main(int argc, char **argv) ) != 0 ) rte_exit(EXIT_FAILURE, "Stats setup failure.\n"); } - /* launch per-lcore init on every slave lcore */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + /* launch per-lcore init on every worker lcore */ + RTE_LCORE_FOREACH_WORKER(lcore_id) { struct lcore_queue_conf *qconf = &lcore_queue_conf[lcore_id]; if (qconf->n_rx_port == 0) @@ -814,7 +814,7 @@ main(int argc, char **argv) rte_delay_ms(5); } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index f8d14b843a7f..6df1da1ed998 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -248,8 +248,8 @@ l2fwd_main_loop(void) /* if timer has reached its timeout */ if (unlikely(timer_tsc >= timer_period)) { - /* do this only on master core */ - if (lcore_id == rte_get_master_lcore()) { + /* do this only on initial core */ + if (lcore_id == rte_get_initial_lcore()) { print_stats(); /* reset the timer */ timer_tsc = 0; @@ -754,8 +754,8 @@ main(int argc, char **argv) ret = 0; /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) { ret = -1; break; From patchwork Fri Jun 5 22:57:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70901 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 073E3A0350; Sat, 6 Jun 2020 01:01:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BFED91D63A; Sat, 6 Jun 2020 00:59:18 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 625041D514 for ; Sat, 6 Jun 2020 00:59:15 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id e9so5826565pgo.9 for ; Fri, 05 Jun 2020 15:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AxQJ5A0GXmwcTgZ0NqOIQUYmaiQJcRJnY4kyWNQW0NY=; b=nVXLG/fwkeuQFTADyo4FdntkKUas0nqq0FOetxeGtJhVZ4ip8wUbZVvKZBZOJADJ1c RsvQa1K7jr7iOP4HUOdSDGqCyLuDZkuoBvZKsIuu2opL0MMmtBNLQ1xAB99qNjlsuWVs vZ6gD4fJ9ZpcFsUIhRMC/PVrpinOhKYgumXKpPLbt0VYx/lwUumsH8tbs8jQpeymr3Ef 1kYhF9y8/EvR9jzkT2K64ygxNWNhpTLuNscYwk4tmXS7PMQaXDcnyJ+9WepjP9dMqpyc uKC143U30oZ7VI1GK4lcaCvCDXGESe0Z+BLESwVGrQ1oQulBnr81nDCDHDmSY7IEouiQ OKGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AxQJ5A0GXmwcTgZ0NqOIQUYmaiQJcRJnY4kyWNQW0NY=; b=AEeXRBvrbj4gH2ClXPFVQsdhrgDn6kZsYx29xzKpVKYfWFCDSeLvJCpNZJrBrbm7E+ O7DLC+QJbwzdzNm29qpw2/x9sW9t4xDUNjHTD8qmBJgCwiu8pzsWWbpzCI5wXxHS3mw1 H4NmHrdnhjn38y2y+o2jj2/28M6He67IFNRtel0I1lMC2CpmAvNsUnoGZSYu51Z1NTk4 joBJKeV+mUMjng3Y1foN29L2iGQc8OcnNaE0QMVUWIkXb9Qmn6XxEv9qb2/4+LEI89Bq TwbMnS8z4IUlao2QzPwjiaWP28fnfZXXwkWzoOvYr/xnkH+WUkvdL6DvkVmr5JFzFP2i pN7A== X-Gm-Message-State: AOAM5326Gf7ynK56STtAYbFubC9FU4H+9kRlFL7Bk4STtAMgUGlTd9OR 88YCfHLDEJbTpT58lRQlOs2+sKfsljg= X-Google-Smtp-Source: ABdhPJwHEbgpL/y6M5T7D4KT7OWwGB2kgs7uja4MJWZchSMPbDZaHxthPnAqcxayJgWWJyrkFywTuQ== X-Received: by 2002:a63:f14a:: with SMTP id o10mr11802205pgk.216.1591397954135; Fri, 05 Jun 2020 15:59:14 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:58 -0700 Message-Id: <20200605225811.26342-14-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 13/26] examples/multi_process: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead. Signed-off-by: Stephen Hemminger --- .../multi_process/client_server_mp/mp_server/main.c | 10 +++++----- examples/multi_process/simple_mp/main.c | 6 +++--- examples/multi_process/symmetric_mp/main.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c index 280dab867281..8b9c6ca12a66 100644 --- a/examples/multi_process/client_server_mp/mp_server/main.c +++ b/examples/multi_process/client_server_mp/mp_server/main.c @@ -84,7 +84,7 @@ get_printable_mac_addr(uint16_t port) /* * This function displays the recorded statistics for each port * and for each client. It uses ANSI terminal codes to clear - * screen when called. It is called from a single non-master + * screen when called. It is called from a single worker * thread in the server process, when the process is run with more * than one lcore enabled. */ @@ -146,7 +146,7 @@ do_stats_display(void) } /* - * The function called from each non-master lcore used by the process. + * The function called from each worker lcore used by the process. * The test_and_set function is used to randomly pick a single lcore on which * the code to display the statistics will run. Otherwise, the code just * repeatedly sleeps. @@ -244,7 +244,7 @@ process_packets(uint32_t port_num __rte_unused, } /* - * Function called by the master lcore of the DPDK process. + * Function called by the initial lcore of the DPDK process. */ static void do_packet_forwarding(void) @@ -297,8 +297,8 @@ main(int argc, char *argv[]) /* clear statistics */ clear_stats(); - /* put all other cores to sleep bar master */ - rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MASTER); + /* put all other cores to sleep execpt inital core */ + rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_INITIAL); do_packet_forwarding(); return 0; diff --git a/examples/multi_process/simple_mp/main.c b/examples/multi_process/simple_mp/main.c index fc79528462e9..f89d46a720b2 100644 --- a/examples/multi_process/simple_mp/main.c +++ b/examples/multi_process/simple_mp/main.c @@ -108,12 +108,12 @@ main(int argc, char **argv) RTE_LOG(INFO, APP, "Finished Process Init.\n"); - /* call lcore_recv() on every slave lcore */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + /* call lcore_recv() on every worker lcore */ + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(lcore_recv, NULL, lcore_id); } - /* call cmd prompt on master lcore */ + /* call cmd prompt on initial lcore */ struct cmdline *cl = cmdline_stdin_new(simple_mp_ctx, "\nsimple_mp > "); if (cl == NULL) rte_exit(EXIT_FAILURE, "Cannot create cmdline instance\n"); diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c index 9a16e198cbf4..683062a627a2 100644 --- a/examples/multi_process/symmetric_mp/main.c +++ b/examples/multi_process/symmetric_mp/main.c @@ -473,7 +473,7 @@ main(int argc, char **argv) RTE_LOG(INFO, APP, "Finished Process Init.\n"); - rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(lcore_main, NULL, CALL_INITIAL); return 0; } From patchwork Fri Jun 5 22:57:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70902 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3453DA0350; Sat, 6 Jun 2020 01:01:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CC29E1D63F; Sat, 6 Jun 2020 00:59:19 +0200 (CEST) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by dpdk.org (Postfix) with ESMTP id 5EDE61D631 for ; Sat, 6 Jun 2020 00:59:17 +0200 (CEST) Received: by mail-pg1-f173.google.com with SMTP id m1so5885408pgk.1 for ; Fri, 05 Jun 2020 15:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3S+xkDI8f28EG+CwcBWEUHD1Qh7kTSyBUHb62kI5mBs=; b=UBtYcG+fi1zll06Yz0yZR8vNmrg15X5ZZNAuRQOZo3diit3rpF4CBIcEzywFk9Lx1V Y6RaoMNTTXn7wWHm2XkM/E5BSg4sHWmQlnHIdDoEpkTwwVjiD3FYYpzln35GBEtscZQi xpvf7778fxVzDPUDgYDXQyBm513PjMgBMasgYpgRKG/lqO8GEfxv7I6m1/m2rZGAGEpM 5PmpsQkyjGJrdpHbtqijHZ1Y5LfzO0Vm2dCaBZBXKt0BDkcF46WRy1OmLTGF+6NQV2HK 3YuRORBYftL22QnTBilpD4TCIB9PSi9Z95ZTdwsZ5luADSDB8YLA2pzaGLigJj9aqPiX ZIWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3S+xkDI8f28EG+CwcBWEUHD1Qh7kTSyBUHb62kI5mBs=; b=YLk4ocAypyk1WDm7asjf/xpumTMASe5G/uIl6hE38I6edfOqxejoALQT3CUXLyJ6/L 4LVOHWvtUcDoNeLy4C1RQ+Ngm7+tSq0qH/fkyWqmxjzs4GLO1xNxF3gy6pYJO0ZAaUEC txjSPIb/6Ica5XWoHSOzz3Gi03b9XjfAUbd7hPTANBc5UrlPjnsqVtUY7dD92WCqApau ZZD2znQ2NTLIta1tBDnhd9q8fl96QX1uIkoTPLMAf5Fd83uU8D54n94Lm2inugyM38an E+3qJNk4/OMLAK6RqfqZx1qnPd3uLWht3B1q8UHeu2v51gMCugIpTZzJU7XovsfsaIn0 gE4Q== X-Gm-Message-State: AOAM531Ya1hbHZqymQ9HQYSG4/85rDOgAHS1g6fILIgjKMT023fWaR1K jgBnY8KVXFy6xO9RzcS9GRLylg0sMPw= X-Google-Smtp-Source: ABdhPJxTumzQZ2oiZIW1caSIPyGOabwzHnJQ5HutZvcrCQigNFRL+dyXSlaKOfuSoWPZEMSbRC/YHQ== X-Received: by 2002:a63:4705:: with SMTP id u5mr11171733pga.446.1591397955745; Fri, 05 Jun 2020 15:59:15 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:14 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:59 -0700 Message-Id: <20200605225811.26342-15-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 14/26] examples/performance-thread: replace reference to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead. Signed-off-by: Stephen Hemminger --- examples/performance-thread/l3fwd-thread/main.c | 12 ++++++------ examples/performance-thread/pthread_shim/main.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c index 84c1d7b3a232..ee8c8622ad8e 100644 --- a/examples/performance-thread/l3fwd-thread/main.c +++ b/examples/performance-thread/l3fwd-thread/main.c @@ -2211,7 +2211,7 @@ lthread_rx(void *dummy) /* * Start scheduler with initial lthread on lcore * - * This lthread loop spawns all rx and tx lthreads on master lcore + * This lthread loop spawns all rx and tx lthreads on intial lcore */ static void * @@ -2265,7 +2265,7 @@ lthread_spawner(__rte_unused void *arg) * (main_lthread_master). */ static int -lthread_master_spawner(__rte_unused void *arg) { +lthread_initial_spawner(__rte_unused void *arg) { struct lthread *lt; int lcore_id = rte_lcore_id(); @@ -3765,14 +3765,14 @@ main(int argc, char **argv) #endif lthread_num_schedulers_set(nb_lcores); - rte_eal_mp_remote_launch(sched_spawner, NULL, SKIP_MASTER); - lthread_master_spawner(NULL); + rte_eal_mp_remote_launch(sched_spawner, NULL, SKIP_INITIAL); + lthread_initial_spawner(NULL); } else { printf("Starting P-Threading Model\n"); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(pthread_run, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(pthread_run, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c index 18f83059bc17..fa6c52209065 100644 --- a/examples/performance-thread/pthread_shim/main.c +++ b/examples/performance-thread/pthread_shim/main.c @@ -252,10 +252,10 @@ int main(int argc, char **argv) lthread_num_schedulers_set(num_sched); /* launch all threads */ - rte_eal_mp_remote_launch(lthread_scheduler, (void *)NULL, CALL_MASTER); + rte_eal_mp_remote_launch(lthread_scheduler, (void *)NULL, CALL_INITIAL); /* wait for threads to stop */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_wait_lcore(lcore_id); } return 0; From patchwork Fri Jun 5 22:58:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70903 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3D049A0350; Sat, 6 Jun 2020 01:01:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D63A1D643; Sat, 6 Jun 2020 00:59:21 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 6DF871D635 for ; Sat, 6 Jun 2020 00:59:18 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id n9so4284784plk.1 for ; Fri, 05 Jun 2020 15:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/ROKNDW6dVWGU9glJJkCoW2TckiE9Jhd+U88Ner7Oqc=; b=EOY/Lv/WD9VB80rWyrFv/1vSsDOezVR+JzPbR6ElUVwtetoe7GMdXn47A9ebmxT4C0 LJSenfcmRDYv8gvfR7RlYn75KJzVxuGEibOZN9iUDrd7gOnzRUf+J7n6N1+Nv0BRzF8s 9VqnDNLQ1DkmMz67hI0xBNNUdgSxc7+ycOdycESvLkbMCk7umktpaNkSt78+Ml+IdJ3+ j+ibvrtuvYKGUfeR1eyOKdcfhYKbKahpu+AtrqX7Q38xB3TVqky4TrLxqWfUgPcyoJNs zep/izWW3PPdfD9Q0I/DrRy9RbAaejm9VZGXD5KASQV0Dlw0DA+1vNJJPua8ZYBGrgBK qppQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/ROKNDW6dVWGU9glJJkCoW2TckiE9Jhd+U88Ner7Oqc=; b=OvuJQDdSYiDmyoIVyoezI8+xqFLVYYAg3WeRo5Hc1Ro8WokLazkuuJ02Ntt6Tkt8Jl jSVj0SFfxoIrtgmpRqktSU0Mp9LPmxglVYKMPCBGK6K7TPlcshKn4m5I2mpsY/7dADpa SnBa+4Fg3B/Uw2k2WXvsAW0E0sZHes4U8CAPnw3aZXfrUB3oWwCy/VJk6SUkoqf1PSzS 99V2FGKnw2EDOkCdfxOvoibjT7XGcpf/uA3lpdjmb5pDjmHE4BNOKw8b/XB/sowPa9ty 25i78G/0vU/BeDTW7yHGbfu8KsTYMbFK89DzQ4FEliBqL2SZwSWKufPQhTGsd8W6uTN7 HEVA== X-Gm-Message-State: AOAM530A980A7clWFKJ1EdwL/izDXol7WRdBG8f36x8JpSzDcbx1B1kJ Uxlkjvf7Hdhc+4HQsWfo7z/SbTjbAEg= X-Google-Smtp-Source: ABdhPJx2XjP2KmnlKNE0ywp4uwnUvBPU5dJQz/CI6AhvpL+/homqWqwO7Kc43Bb/0Huvp+/MWKolOw== X-Received: by 2002:a17:902:d34a:: with SMTP id l10mr11541080plk.69.1591397957214; Fri, 05 Jun 2020 15:59:17 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:16 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:00 -0700 Message-Id: <20200605225811.26342-16-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 15/26] examples/ptpclient: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace master lcore with initial lcore. This API still has issue with use of term master clock. Signed-off-by: Stephen Hemminger --- examples/ptpclient/ptpclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index bfa86eec5a4a..119f4f6e5d89 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -785,7 +785,7 @@ main(int argc, char *argv[]) if (rte_lcore_count() > 1) printf("\nWARNING: Too many lcores enabled. Only 1 used.\n"); - /* Call lcore_main on the master core only. */ + /* Call lcore_main on the initial core only. */ lcore_main(); return 0; From patchwork Fri Jun 5 22:58:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70904 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90C0AA0350; Sat, 6 Jun 2020 01:01:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1FD221D64A; Sat, 6 Jun 2020 00:59:22 +0200 (CEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by dpdk.org (Postfix) with ESMTP id BCD831D635 for ; Sat, 6 Jun 2020 00:59:19 +0200 (CEST) Received: by mail-pf1-f171.google.com with SMTP id x207so5638119pfc.5 for ; Fri, 05 Jun 2020 15:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lRYtaF+oh3FJuppDjSohzXsbUQvY6C3QAo7e8q5ZLaw=; b=TOTu2xxYxBCATLdU5tibagGmmkmmweYQlEe1UvFHm517hvNklSdPKTtm5MQRlQYXcl jXVGDTBbjd4kO8DmrcGpZlO4Yr+v/PT609rHlyltRqCijxQoS/AX7+0zR58ZudOXc03v 6ARCc/gISbIjkAXXPNvJro/MxrJlpDeXQ/AA7zjPzTHoKW0UZydqM78ioDZYeRuB/7Fl UEU2BGs3RhC9Gwr8u65b8MQ7W0uHO9LagWe8oY7nTZ/FDgjdqJZ3Eyl7ppIctiqwFeEX HFyePfWCE12zFn/34cKGfmXa1D4d09sEAasxpiFChc8za5i87ffjnE3LjmxeVSsLs4k3 RDPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lRYtaF+oh3FJuppDjSohzXsbUQvY6C3QAo7e8q5ZLaw=; b=RbfZ5JdXfJpntxb5rcBk5cE99JYixUuQ21b4qcsIpMpsYZfeZDOJtC9KopeFL+LZVU hh1u/qBR5HoVAAyNguA5j4uixZPaAnXN8wUyMzXYDv8pUTeUjDxHYR0g+eKxJX8x6ANj jyLyPm0rART8fnP+w8L3G8Qvty9P24TsS/uFLgHkau+cX8VoSzkb74dxqpC8oy0sEXMX bPsS5gJ2oz+5WmyAIvgIDfXP9zQ1C/aVeB6rwJ76Pz9bNuUdvCZDnWW5835Fxme8MrCM EBfKhRDVc87ZBC2esyZ8/jJ3x56X/l0usc6qwz/1P/6wgHBSGGLLM5kqeNKQS4WJYKRz A7DQ== X-Gm-Message-State: AOAM531Pj9/nK6bmKk0JUI28jQbu1lbDbkFEg7Vi/zz3vHIEz0t0u59f wa2A0/snsTHeXLQC39iRKRqXwAzQqhY= X-Google-Smtp-Source: ABdhPJzV6AA0SGJOAv9FXMGpDVm6AnhdR+4qyDPS12JSm5Y/UkAwZTS4f0YTEFqpqtXdyU1CncvCqA== X-Received: by 2002:a63:33c6:: with SMTP id z189mr11734135pgz.426.1591397958535; Fri, 05 Jun 2020 15:59:18 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:17 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:01 -0700 Message-Id: <20200605225811.26342-17-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 16/26] examples/ipcsec-secgw: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead. Signed-off-by: Stephen Hemminger --- examples/ipsec-secgw/event_helper.c | 6 +++--- examples/ipsec-secgw/ipsec-secgw.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ipsec-secgw/event_helper.c b/examples/ipsec-secgw/event_helper.c index 865dc911b864..239c35985bd6 100644 --- a/examples/ipsec-secgw/event_helper.c +++ b/examples/ipsec-secgw/event_helper.c @@ -1461,16 +1461,16 @@ eh_conf_init(void) /* Set two cores as eth cores for Rx & Tx */ - /* Use first core other than master core as Rx core */ + /* Use first core other than initial core as Rx core */ eth_core_id = rte_get_next_lcore(0, /* curr core */ - 1, /* skip master core */ + 1, /* skip initial core */ 0 /* wrap */); rte_bitmap_set(em_conf->eth_core_mask, eth_core_id); /* Use next core as Tx core */ eth_core_id = rte_get_next_lcore(eth_core_id, /* curr core */ - 1, /* skip master core */ + 1, /* skip initial core */ 0 /* wrap */); rte_bitmap_set(em_conf->eth_core_mask, eth_core_id); diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c index f777ce2afe41..388f7f614ae0 100644 --- a/examples/ipsec-secgw/ipsec-secgw.c +++ b/examples/ipsec-secgw/ipsec-secgw.c @@ -2917,8 +2917,8 @@ main(int32_t argc, char **argv) check_all_ports_link_status(enabled_port_mask); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(ipsec_launch_one_lcore, eh_conf, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(ipsec_launch_one_lcore, eh_conf, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } From patchwork Fri Jun 5 22:58:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70905 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 236F9A0350; Sat, 6 Jun 2020 01:01:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6EC871D64D; Sat, 6 Jun 2020 00:59:23 +0200 (CEST) Received: from mail-pj1-f67.google.com (mail-pj1-f67.google.com [209.85.216.67]) by dpdk.org (Postfix) with ESMTP id A17F41D647 for ; Sat, 6 Jun 2020 00:59:21 +0200 (CEST) Received: by mail-pj1-f67.google.com with SMTP id a45so3658866pje.1 for ; Fri, 05 Jun 2020 15:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MAKz8Xtpy4xkl2jp6nMia9LeNAfemR26elPZsdm79d0=; b=e2GkdSgNzMKEeIg0lakRv4Sn6R97VJ1mGG1tAgGtsoR0XsAQVNjaUOfUX7cVif+ch3 sJtcLiWP04hTmYIcoUGcOUtxR7bfzWuMAvBWAIT6hCFn4GoJ9MZ4+akj0w0NA5/ObxN3 lWGx+JAdJCVgbZEHauy+9JNbK7+LPE9J56BvkJaLAN4EILXCC90Uwy10MYxZpcHQnNeX PVTRWDz90O6EF9ep83sC/+vzexNxCRBA5A9tI06vrfFTgHGdeJoUnWVQpV2FXbrfd6cq jrhzp3d8i11HSJ1yDpavU6Frj61HouYe0k2DPiPJF/gilVVIMFcCsdnoC4eANqGJvuh1 jbew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MAKz8Xtpy4xkl2jp6nMia9LeNAfemR26elPZsdm79d0=; b=EhcRKiuBXmHjuFBzE98ufDOBSsN+8vnUSBDmV0lIXZBYruv8N0VjmxuQL84/ruTBx9 bCh5QlzzE0DGv7tntrEUHtVM4Mieq1K/6PjcvcEnrL1E0Z2GvdCcPUJJVaSnwGAfh+6G VgHTynZ4QELj86m36h2UDwcojj2oFzRBZnqlsmHNcB01Mo7Mblelp0u8DoJjsGpOA9X5 xOu1lKLPtQrKXBfbYa/djrgqYef20WyXNCsmEKM+z093HyO05CyabAaTJujJngcHwlfX KDsFB4bCS3imccYCXhVkfmY2EwdSrRfIr9gZqMmKTyZrxafbKy1YUDZOGDlKtz4NzFPx SPQg== X-Gm-Message-State: AOAM530ICvFdmwBUQ0Gv+XIb8AjDmpnRD6y/TcNs/87rr0jg/qF29rhT jOLVmOF0XetIXBPOTm9XdDZ0v91t2Eg= X-Google-Smtp-Source: ABdhPJyRKpEW296HwwxuY3crT2a764lnqI5KAfiJeaxo9x1mWDJxslNbSKQzNxbATUc5lpMASAekgA== X-Received: by 2002:a17:90b:234c:: with SMTP id ms12mr5714595pjb.164.1591397959825; Fri, 05 Jun 2020 15:59:19 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:18 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:02 -0700 Message-Id: <20200605225811.26342-18-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 17/26] examples: replace reference to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Small changes in several examples to replace master_lcore with initial_lcore across multiple small examples. Signed-off-by: Stephen Hemminger --- examples/eventdev_pipeline/main.c | 2 +- examples/flow_classify/flow_classify.c | 2 +- examples/helloworld/main.c | 6 +++--- examples/ioat/ioatfwd.c | 6 +++--- examples/ip_fragmentation/main.c | 4 ++-- examples/ip_reassembly/main.c | 4 ++-- examples/ipv4_multicast/main.c | 4 ++-- examples/kni/main.c | 7 +++---- examples/link_status_interrupt/main.c | 8 ++++---- examples/ntb/ntb_fwd.c | 14 +++++++------- examples/packet_ordering/main.c | 22 +++++++++++----------- examples/rxtx_callbacks/main.c | 2 +- examples/server_node_efd/server/main.c | 10 +++++----- examples/skeleton/basicfwd.c | 2 +- examples/tep_termination/main.c | 12 ++++++------ examples/timer/main.c | 8 ++++---- examples/vhost/main.c | 10 +++++----- examples/vmdq/main.c | 4 ++-- examples/vmdq_dcb/main.c | 6 +++--- 19 files changed, 66 insertions(+), 67 deletions(-) diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c index 21958269f743..91969ce039cf 100644 --- a/examples/eventdev_pipeline/main.c +++ b/examples/eventdev_pipeline/main.c @@ -395,7 +395,7 @@ main(int argc, char **argv) } int worker_idx = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (lcore_id >= MAX_NUM_CORE) break; diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c index 433e64d3f901..e8d23225c4b8 100644 --- a/examples/flow_classify/flow_classify.c +++ b/examples/flow_classify/flow_classify.c @@ -850,7 +850,7 @@ main(int argc, char *argv[]) rte_exit(EXIT_FAILURE, "Failed to add rules\n"); } - /* Call lcore_main on the master core only. */ + /* Call lcore_main on the initial core only. */ lcore_main(cls_app); return 0; diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c index 968045f1b042..029bee26cba2 100644 --- a/examples/helloworld/main.c +++ b/examples/helloworld/main.c @@ -34,12 +34,12 @@ main(int argc, char **argv) if (ret < 0) rte_panic("Cannot init EAL\n"); - /* call lcore_hello() on every slave lcore */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + /* call lcore_hello() on every worker lcore */ + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(lcore_hello, NULL, lcore_id); } - /* call it on master lcore too */ + /* call it on initial lcore too */ lcore_hello(NULL); rte_eal_mp_wait_lcore(); diff --git a/examples/ioat/ioatfwd.c b/examples/ioat/ioatfwd.c index 53de231795f7..6a646d657065 100644 --- a/examples/ioat/ioatfwd.c +++ b/examples/ioat/ioatfwd.c @@ -518,7 +518,7 @@ tx_main_loop(void) ioat_tx_port(&cfg.ports[i]); } -/* Main rx and tx loop if only one slave lcore available */ +/* Main rx and tx loop if only one worker lcore available */ static void rxtx_main_loop(void) { @@ -982,7 +982,7 @@ main(int argc, char **argv) cfg.nb_lcores = rte_lcore_count() - 1; if (cfg.nb_lcores < 1) rte_exit(EXIT_FAILURE, - "There should be at least one slave lcore.\n"); + "There should be at least one worker lcore.\n"); if (copy_mode == COPY_MODE_IOAT_NUM) assign_rawdevs(); @@ -990,7 +990,7 @@ main(int argc, char **argv) assign_rings(); start_forwarding_cores(); - /* master core prints stats while other cores forward */ + /* initial core prints stats while other cores forward */ print_stats(argv[0]); /* force_quit is true when we get here */ diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index 4afb97109fed..13b9f3ca0b66 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -1072,8 +1072,8 @@ main(int argc, char **argv) check_all_ports_link_status(enabled_port_mask); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index 494d7ee77641..01d89eef2f70 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -1201,8 +1201,8 @@ main(int argc, char **argv) signal(SIGINT, signal_handler); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 7e255c35a301..52dee9f68bcf 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -801,8 +801,8 @@ main(int argc, char **argv) rte_exit(EXIT_FAILURE, "Cannot build the multicast hash\n"); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/kni/main.c b/examples/kni/main.c index 80dd0353e773..24653ca6cab8 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -954,8 +954,7 @@ kni_alloc(uint16_t port_id) conf.mbuf_size = MAX_PACKET_SZ; /* * The first KNI device associated to a port - * is the master, for multiple kernel thread - * environment. + * is special, for multiple kernel thread environment. */ if (i == 0) { struct rte_kni_ops ops; @@ -1103,8 +1102,8 @@ main(int argc, char** argv) "Could not create link status thread!\n"); /* Launch per-lcore function on every lcore */ - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(i) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(i) { if (rte_eal_wait_lcore(i) < 0) return -1; } diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index 25efe2b09a20..21a60353c9cd 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -253,8 +253,8 @@ lsi_main_loop(void) /* if timer has reached its timeout */ if (unlikely(timer_tsc >= (uint64_t) timer_period)) { - /* do this only on master core */ - if (lcore_id == rte_get_master_lcore()) { + /* do this only on initial core */ + if (lcore_id == rte_get_initial_lcore()) { print_stats(); /* reset the timer */ timer_tsc = 0; @@ -733,8 +733,8 @@ main(int argc, char **argv) check_all_ports_link_status(nb_ports, lsi_enabled_port_mask); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(lsi_launch_one_lcore, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(lsi_launch_one_lcore, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c index eba8ebf9fab0..c60b6f3f944b 100644 --- a/examples/ntb/ntb_fwd.c +++ b/examples/ntb/ntb_fwd.c @@ -162,7 +162,7 @@ cmd_quit_parsed(__rte_unused void *parsed_result, uint32_t lcore_id; /* Stop transmission first. */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { conf = &fwd_lcore_conf[lcore_id]; if (!conf->nb_stream) @@ -668,7 +668,7 @@ assign_stream_to_lcores(void) uint8_t lcore_num, nb_extra; lcore_num = rte_lcore_count(); - /* Exclude master core */ + /* Exclude initial core */ lcore_num--; nb_streams = (fwd_mode == IOFWD) ? num_queues * 2 : num_queues; @@ -678,7 +678,7 @@ assign_stream_to_lcores(void) sm_id = 0; i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { conf = &fwd_lcore_conf[lcore_id]; if (i < nb_extra) { @@ -697,7 +697,7 @@ assign_stream_to_lcores(void) } /* Print packet forwading config. */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { conf = &fwd_lcore_conf[lcore_id]; if (!conf->nb_stream) @@ -765,7 +765,7 @@ start_pkt_fwd(void) assign_stream_to_lcores(); in_test = 1; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { conf = &fwd_lcore_conf[lcore_id]; if (!conf->nb_stream) @@ -826,7 +826,7 @@ cmd_stop_parsed(__rte_unused void *parsed_result, struct ntb_fwd_lcore_conf *conf; uint32_t lcore_id; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { conf = &fwd_lcore_conf[lcore_id]; if (!conf->nb_stream) @@ -1074,7 +1074,7 @@ cmdline_parse_ctx_t main_ctx[] = { NULL, }; -/* prompt function, called from main on MASTER lcore */ +/* prompt function, called from main on initial lcore */ static void prompt(void) { diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c index b397b318e651..bcf3cbf89af2 100644 --- a/examples/packet_ordering/main.c +++ b/examples/packet_ordering/main.c @@ -348,10 +348,10 @@ print_stats(void) { uint16_t i; struct rte_eth_stats eth_stats; - unsigned int lcore_id, last_lcore_id, master_lcore_id, end_w_lcore_id; + unsigned int lcore_id, last_lcore_id, initial_lcore_id, end_w_lcore_id; last_lcore_id = get_last_lcore_id(); - master_lcore_id = rte_get_master_lcore(); + initial_lcore_id = rte_get_initial_lcore(); end_w_lcore_id = get_previous_lcore_id(last_lcore_id); printf("\nRX thread stats:\n"); @@ -363,7 +363,7 @@ print_stats(void) for (lcore_id = 0; lcore_id <= end_w_lcore_id; lcore_id++) { if (insight_worker && rte_lcore_is_enabled(lcore_id) - && lcore_id != master_lcore_id) { + && lcore_id != initial_lcore_id) { printf("\nWorker thread stats on core [%u]:\n", lcore_id); printf(" - Pkts deqd from workers ring: %"PRIu64"\n", @@ -661,7 +661,7 @@ main(int argc, char **argv) { int ret; unsigned nb_ports; - unsigned int lcore_id, last_lcore_id, master_lcore_id; + unsigned int lcore_id, last_lcore_id, initial_lcore_id; uint16_t port_id; uint16_t nb_ports_available; struct worker_thread_args worker_args = {NULL, NULL}; @@ -748,32 +748,32 @@ main(int argc, char **argv) } last_lcore_id = get_last_lcore_id(); - master_lcore_id = rte_get_master_lcore(); + initial_lcore_id = rte_get_initial_lcore(); worker_args.ring_in = rx_to_workers; worker_args.ring_out = workers_to_tx; - /* Start worker_thread() on all the available slave cores but the last 1 */ + /* Start worker_thread() on all the available worker cores but the last 1 */ for (lcore_id = 0; lcore_id <= get_previous_lcore_id(last_lcore_id); lcore_id++) - if (rte_lcore_is_enabled(lcore_id) && lcore_id != master_lcore_id) + if (rte_lcore_is_enabled(lcore_id) && lcore_id != initial_lcore_id) rte_eal_remote_launch(worker_thread, (void *)&worker_args, lcore_id); if (disable_reorder) { - /* Start tx_thread() on the last slave core */ + /* Start tx_thread() on the last worker core */ rte_eal_remote_launch((lcore_function_t *)tx_thread, workers_to_tx, last_lcore_id); } else { send_args.ring_in = workers_to_tx; - /* Start send_thread() on the last slave core */ + /* Start send_thread() on the last worker core */ rte_eal_remote_launch((lcore_function_t *)send_thread, (void *)&send_args, last_lcore_id); } - /* Start rx_thread() on the master core */ + /* Start rx_thread() on the initial core */ rx_thread(rx_to_workers); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c index 54d124b00bc9..562abb87d7ff 100644 --- a/examples/rxtx_callbacks/main.c +++ b/examples/rxtx_callbacks/main.c @@ -302,7 +302,7 @@ main(int argc, char *argv[]) printf("\nWARNING: Too much enabled lcores - " "App uses only 1 lcore\n"); - /* call lcore_main on master core only */ + /* call lcore_main on initial core only */ lcore_main(); return 0; } diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c index 05f961cff5d0..912dcd06c70f 100644 --- a/examples/server_node_efd/server/main.c +++ b/examples/server_node_efd/server/main.c @@ -95,7 +95,7 @@ get_printable_mac_addr(uint16_t port) /* * This function displays the recorded statistics for each port * and for each node. It uses ANSI terminal codes to clear - * screen when called. It is called from a single non-master + * screen when called. It is called from a single worker * thread in the server process, when the process is run with more * than one lcore enabled. */ @@ -168,7 +168,7 @@ do_stats_display(void) } /* - * The function called from each non-master lcore used by the process. + * The function called from each worker lcore used by the process. * The test_and_set function is used to randomly pick a single lcore on which * the code to display the statistics will run. Otherwise, the code just * repeatedly sleeps. @@ -290,7 +290,7 @@ process_packets(uint32_t port_num __rte_unused, struct rte_mbuf *pkts[], } /* - * Function called by the master lcore of the DPDK process. + * Function called by the initial lcore of the DPDK process. */ static void do_packet_forwarding(void) @@ -330,8 +330,8 @@ main(int argc, char *argv[]) /* clear statistics */ clear_stats(); - /* put all other cores to sleep bar master */ - rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MASTER); + /* put all other cores to sleep */ + rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_INITIAL); do_packet_forwarding(); return 0; diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c index 72ba85fa1fe5..3062ac2f596c 100644 --- a/examples/skeleton/basicfwd.c +++ b/examples/skeleton/basicfwd.c @@ -202,7 +202,7 @@ main(int argc, char *argv[]) if (rte_lcore_count() > 1) printf("\nWARNING: Too many lcores enabled. Only 1 used.\n"); - /* Call lcore_main on the master core only. */ + /* Call lcore_main on the initial core only. */ lcore_main(); return 0; diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index ab956ad7ce96..0a49e4238d5f 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -838,7 +838,7 @@ init_data_ll(void) { int lcore; - RTE_LCORE_FOREACH_SLAVE(lcore) { + RTE_LCORE_FOREACH_WORKER(lcore) { lcore_info[lcore].lcore_ll = malloc(sizeof(struct lcore_ll_info)); if (lcore_info[lcore].lcore_ll == NULL) { @@ -930,7 +930,7 @@ destroy_device(int vid) rm_data_ll_entry(&ll_root_used, ll_main_dev_cur, ll_main_dev_last); /* Set the dev_removal_flag on each lcore. */ - RTE_LCORE_FOREACH_SLAVE(lcore) { + RTE_LCORE_FOREACH_WORKER(lcore) { lcore_info[lcore].lcore_ll->dev_removal_flag = REQUEST_DEV_REMOVAL; } @@ -941,7 +941,7 @@ destroy_device(int vid) * the device removed from the linked lists and that the devices * are no longer in use. */ - RTE_LCORE_FOREACH_SLAVE(lcore) { + RTE_LCORE_FOREACH_WORKER(lcore) { while (lcore_info[lcore].lcore_ll->dev_removal_flag != ACK_DEV_REMOVAL) rte_pause(); @@ -1001,7 +1001,7 @@ new_device(int vid) vdev->remove = 0; /* Find a suitable lcore to add the device. */ - RTE_LCORE_FOREACH_SLAVE(lcore) { + RTE_LCORE_FOREACH_WORKER(lcore) { if (lcore_info[lcore].lcore_ll->device_num < device_num_min) { device_num_min = lcore_info[lcore].lcore_ll->device_num; core_add = lcore; @@ -1205,7 +1205,7 @@ main(int argc, char *argv[]) } /* Launch all data cores. */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(switch_worker, mbuf_pool, lcore_id); } @@ -1229,7 +1229,7 @@ main(int argc, char *argv[]) "failed to start vhost driver.\n"); } - RTE_LCORE_FOREACH_SLAVE(lcore_id) + RTE_LCORE_FOREACH_WORKER(lcore_id) rte_eal_wait_lcore(lcore_id); return 0; diff --git a/examples/timer/main.c b/examples/timer/main.c index 0259022f104e..50a0f60951e2 100644 --- a/examples/timer/main.c +++ b/examples/timer/main.c @@ -100,7 +100,7 @@ main(int argc, char **argv) rte_timer_init(&timer0); rte_timer_init(&timer1); - /* load timer0, every second, on master lcore, reloaded automatically */ + /* load timer0, every second, on initial lcore, reloaded automatically */ hz = rte_get_timer_hz(); lcore_id = rte_lcore_id(); rte_timer_reset(&timer0, hz, PERIODICAL, lcore_id, timer0_cb, NULL); @@ -109,12 +109,12 @@ main(int argc, char **argv) lcore_id = rte_get_next_lcore(lcore_id, 0, 1); rte_timer_reset(&timer1, hz/3, SINGLE, lcore_id, timer1_cb, NULL); - /* call lcore_mainloop() on every slave lcore */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + /* call lcore_mainloop() on every worker lcore */ + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(lcore_mainloop, NULL, lcore_id); } - /* call it on master lcore too */ + /* call it on initial lcore too */ (void) lcore_mainloop(NULL); return 0; diff --git a/examples/vhost/main.c b/examples/vhost/main.c index ab649bf147e1..6ddfc936a3d9 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1205,7 +1205,7 @@ destroy_device(int vid) /* Set the dev_removal_flag on each lcore. */ - RTE_LCORE_FOREACH_SLAVE(lcore) + RTE_LCORE_FOREACH_WORKER(lcore) lcore_info[lcore].dev_removal_flag = REQUEST_DEV_REMOVAL; /* @@ -1213,7 +1213,7 @@ destroy_device(int vid) * we can be sure that they can no longer access the device removed * from the linked lists and that the devices are no longer in use. */ - RTE_LCORE_FOREACH_SLAVE(lcore) { + RTE_LCORE_FOREACH_WORKER(lcore) { while (lcore_info[lcore].dev_removal_flag != ACK_DEV_REMOVAL) rte_pause(); } @@ -1258,7 +1258,7 @@ new_device(int vid) vdev->remove = 0; /* Find a suitable lcore to add the device. */ - RTE_LCORE_FOREACH_SLAVE(lcore) { + RTE_LCORE_FOREACH_WORKER(lcore) { if (lcore_info[lcore].device_num < device_num_min) { device_num_min = lcore_info[lcore].device_num; core_add = lcore; @@ -1505,7 +1505,7 @@ main(int argc, char *argv[]) } /* Launch all data cores. */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) + RTE_LCORE_FOREACH_WORKER(lcore_id) rte_eal_remote_launch(switch_worker, NULL, lcore_id); if (client_mode) @@ -1566,7 +1566,7 @@ main(int argc, char *argv[]) } } - RTE_LCORE_FOREACH_SLAVE(lcore_id) + RTE_LCORE_FOREACH_WORKER(lcore_id) rte_eal_wait_lcore(lcore_id); return 0; diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index d08826c868f8..25fb6fd62f1b 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq/main.c @@ -656,8 +656,8 @@ main(int argc, char *argv[]) } /* call lcore_main() on every lcore */ - rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(lcore_main, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/vmdq_dcb/main.c b/examples/vmdq_dcb/main.c index f417b2fd9b91..e1c8ed0c381a 100644 --- a/examples/vmdq_dcb/main.c +++ b/examples/vmdq_dcb/main.c @@ -702,12 +702,12 @@ main(int argc, char *argv[]) rte_exit(EXIT_FAILURE, "Cannot initialize network ports\n"); } - /* call lcore_main() on every slave lcore */ + /* call lcore_main() on every worker lcore */ i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(lcore_main, (void*)i++, lcore_id); } - /* call on master too */ + /* call on initial too */ (void) lcore_main((void*)i); return 0; From patchwork Fri Jun 5 22:58:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70906 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BC8A2A0350; Sat, 6 Jun 2020 01:01:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 73E3F1D651; Sat, 6 Jun 2020 00:59:24 +0200 (CEST) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by dpdk.org (Postfix) with ESMTP id 602911D64D for ; Sat, 6 Jun 2020 00:59:22 +0200 (CEST) Received: by mail-pj1-f47.google.com with SMTP id jz3so3250752pjb.0 for ; Fri, 05 Jun 2020 15:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ubF0gJoToR3cgQbcrlH/RtpDCsnJfiu4gPKw0GIo80Y=; b=YrAztnT625bluCJIorN9CIRlB4rBn9GCIxG3NM78R54ddlLP9R8nsFc56ETxBgrhPk NHPR/ptD+wr0u6kgH2gFjIUXbUvzV3OMKl/gxeQh3XTCu/Uz4FXT5EYuPPQB8WcKJfOy JWmqYz/8JJfmHSj6T4YitlbnlYzp/5W6JNp5t791YR8T4CdrQirkQHpLTyRTEIs6YNsk tcw+dI+rdnh8wxyTdFcR2kBMqYaOeGORavKRCQ5aA4qJvQORnIJAkHzBI7tMd23LsTAx n5EMN1yP4OXBWODDLHDxQ+WP5iF7/fbdRIfLG96Uxy6dfE+eb9ocyZ+6M7fFiHyhXgOm GoUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ubF0gJoToR3cgQbcrlH/RtpDCsnJfiu4gPKw0GIo80Y=; b=ccPNlgUhO7PyfHoWYn9nDB4AVOmZHdiBDVPIrmsqsLHJsE9avdr7zwrCIdfdIwBqHq 2rnHoGBGuijQ5bDpJEkm4TMZf+2uBdRb2TZei0pVnMPFGnwgqEKrQVCVccXcmA25OZUk aQhYO8EoLUVKtB5agtDIyvJRPs/+rH3KLCEJnqdcFCU/bueEm9W1dZUMmFCGf2nsj9rG seTaTX+pCfKKu6M7MAJPb/KeFX/F9ZwRivM/A60+MWYazCkoXj9otTD4a1mYM8lKku1+ E1+4yUGQlvdavwz35WYKFZcxhPGdoPeDqyI7SnHQQJ1OYx1vpHh1PBxEK49QntNJW3qS I4UA== X-Gm-Message-State: AOAM530ZuYCaKTIEc/46lt7G2evtaUOtiv+Bl6Vkk8dlJKG43qWf6A1Q wV9FgZp22eluOZEiMAXb10Fvg7bmhV0= X-Google-Smtp-Source: ABdhPJx237quuDrwqpakOvObX7HTDLVK2wfqSFUwvHoGiS/wqlYDQg95T42QXtyYffP3sHTlxFWJmw== X-Received: by 2002:a17:902:223:: with SMTP id 32mr11513335plc.331.1591397961069; Fri, 05 Jun 2020 15:59:21 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:20 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:03 -0700 Message-Id: <20200605225811.26342-19-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 18/26] app/test-pmd: change references to master/slave X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use new API and naming convention Signed-off-by: Stephen Hemminger --- app/test-pmd/config.c | 4 ++-- app/test-pmd/parameters.c | 2 +- app/test-pmd/softnicfwd.c | 2 +- app/test-pmd/testpmd.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 5381207cc283..d3893ea3763f 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2647,9 +2647,9 @@ set_fwd_lcores_list(unsigned int *lcorelist, unsigned int nb_lc) printf("lcore %u not enabled\n", lcore_cpuid); return -1; } - if (lcore_cpuid == rte_get_master_lcore()) { + if (lcore_cpuid == rte_get_initial_lcore()) { printf("lcore %u cannot be masked on for running " - "packet forwarding, which is the master lcore " + "packet forwarding, which is the initial lcore " "and reserved for command line parsing only\n", lcore_cpuid); return -1; diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index f761e14707bf..48aafa289367 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -88,7 +88,7 @@ usage(char* progname) printf(" --nb-ports=N: set the number of forwarding ports " "(1 <= N <= %d).\n", nb_ports); printf(" --coremask=COREMASK: hexadecimal bitmask of cores running " - "the packet forwarding test. The master lcore is reserved for " + "the packet forwarding test. The initial lcore is reserved for " "command line parsing only, and cannot be masked on for " "packet forwarding.\n"); printf(" --portmask=PORTMASK: hexadecimal bitmask of ports used " diff --git a/app/test-pmd/softnicfwd.c b/app/test-pmd/softnicfwd.c index e9d437364467..d773551845e4 100644 --- a/app/test-pmd/softnicfwd.c +++ b/app/test-pmd/softnicfwd.c @@ -654,7 +654,7 @@ softnic_fwd_begin(portid_t pi) if (!rte_lcore_is_enabled(lcore)) continue; - if (lcore == rte_get_master_lcore()) + if (lcore == rte_get_initial_lcore()) continue; if (fwd_core_present == 0) { diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 4989d22ca86c..a68ef351e37e 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -83,7 +83,7 @@ uint16_t verbose_level = 0; /**< Silent by default. */ int testpmd_logtype; /**< Log type for testpmd logs */ -/* use master core for command line ? */ +/* use initial core for command line ? */ uint8_t interactive = 0; uint8_t auto_start = 0; uint8_t tx_first; @@ -552,7 +552,7 @@ set_default_fwd_lcores_config(void) } socket_ids[num_sockets++] = sock_num; } - if (i == rte_get_master_lcore()) + if (i == rte_get_initial_lcore()) continue; fwd_lcores_cpuids[nb_lc++] = i; } From patchwork Fri Jun 5 22:58:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70907 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2AEEA0350; Sat, 6 Jun 2020 01:02:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F16471D662; Sat, 6 Jun 2020 00:59:25 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by dpdk.org (Postfix) with ESMTP id CBF3F1D64F for ; Sat, 6 Jun 2020 00:59:23 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id 5so3427486pjd.0 for ; Fri, 05 Jun 2020 15:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eL9iBY15ufBxZsTdeCMVJEk746Tgj0tk/PrcJOdImGc=; b=KcCkI8HgCkZHfNxHdm4F7WqB80qjlwhtVya+dGWS61N5JfsV9ygJ7dPyMnUlkketOq pOWtSQKAdS4wDAWo6ww5LKtKGfUru7nRnnHFVgrZVPPYs3f75u0/Lhgo91bZsoBLTFrm r7Yoz2VJIcb9nhwB9i2pSLdh8vISs529o7BE5tDOkgTVzmiiAWiAWvMAh7jVzem44IaZ Q0IkiGxuNtzYOm8ZWXpsBOb2u2ovmkmb3SMr/acFsKUIEy7hYXsWtMIAsl+yCHaj0k1/ hOEQ5F/9BWDhQo6Mnx9HhunPYPg04ZepgG168tDFj/FsLLnFqrTgsgTDoG5DxwcI+pKP oPrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eL9iBY15ufBxZsTdeCMVJEk746Tgj0tk/PrcJOdImGc=; b=C7CDLZp+DBpyOTy6nEZ5VCehEWO+GqUmDCKcGGOSYOBocPBsDLV2Tr65/UbVuLTwmi pvxdTxMdiA8KfbIbfUTeYIsvCJeMR6wKKo9z7Pe2ndciTZtyPs4OptO7D5XNCFySQxgG AIvtM+yo3cr7uTFzezEZp4BY4nnhZHCBepbTr/KrxOwJ9zNF6wWMbagGp7TGgGRVUaUL aul8cXLFkXOk+gSpmbP+S8QVcERW8BgOwRIQM0sNcKH1Y2c9O17mUgos1hdcnZAnB8Mw bdElo4qOQafhXzFrFqkaV3nj0S7mbHQBhJ6yE4CGZukoipNtp8e7RAiuJW69gbHoIK8r Iyjw== X-Gm-Message-State: AOAM531Dnmxy3QfXlDXluNz53RXE15yJfi79BlEGozxVIb5nqvlyawlg N1rraB1YHx22QSbs5KjHNECk6+b9R0E= X-Google-Smtp-Source: ABdhPJyEmx01Z6ajzSv9AqOE0Qbe3g6siaVVa1jU0e66+UoILZnbx/ecw1QDuTve2RBfHgfp2FtKCw== X-Received: by 2002:a17:90b:3448:: with SMTP id lj8mr5226125pjb.163.1591397962489; Fri, 05 Jun 2020 15:59:22 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:21 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:04 -0700 Message-Id: <20200605225811.26342-20-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 19/26] test-eventdev: replace references to slave with worker lcores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use new API terminolgy Signed-off-by: Stephen Hemminger --- app/test-eventdev/evt_options.c | 2 +- app/test-eventdev/test_order_common.c | 12 ++++++------ app/test-eventdev/test_perf_common.c | 16 ++++++++-------- app/test-eventdev/test_pipeline_common.c | 8 ++++---- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c index c60b61a904b0..e09a0592673f 100644 --- a/app/test-eventdev/evt_options.c +++ b/app/test-eventdev/evt_options.c @@ -438,7 +438,7 @@ evt_options_dump(struct evt_options *opt) evt_dump("verbose_level", "%d", opt->verbose_level); evt_dump("socket_id", "%d", opt->socket_id); evt_dump("pool_sz", "%d", opt->pool_sz); - evt_dump("master lcore", "%d", rte_get_master_lcore()); + evt_dump("initial lcore", "%d", rte_get_initial_lcore()); evt_dump("nb_pkts", "%"PRIu64, opt->nb_pkts); evt_dump("nb_timers", "%"PRIu64, opt->nb_timers); evt_dump_begin("available lcores"); diff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c index 4190f9ade82b..4082e2f210f8 100644 --- a/app/test-eventdev/test_order_common.c +++ b/app/test-eventdev/test_order_common.c @@ -74,15 +74,15 @@ order_opt_check(struct evt_options *opt) return -1; } - /* 1 producer + N workers + 1 master */ + /* 1 producer + N workers + 1 initial lcore */ if (rte_lcore_count() < 3) { evt_err("test need minimum 3 lcores"); return -1; } /* Validate worker lcores */ - if (evt_lcores_has_overlap(opt->wlcores, rte_get_master_lcore())) { - evt_err("worker lcores overlaps with master lcore"); + if (evt_lcores_has_overlap(opt->wlcores, rte_get_initial_lcore())) { + evt_err("worker lcores overlaps with initial lcore"); return -1; } @@ -117,8 +117,8 @@ order_opt_check(struct evt_options *opt) } /* Validate producer lcore */ - if (plcore == (int)rte_get_master_lcore()) { - evt_err("producer lcore and master lcore should be different"); + if (plcore == (int)rte_get_initial_lcore()) { + evt_err("producer lcore and initial lcore should be different"); return -1; } if (!rte_lcore_is_enabled(plcore)) { @@ -245,7 +245,7 @@ order_launch_lcores(struct evt_test *test, struct evt_options *opt, int wkr_idx = 0; /* launch workers */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (!(opt->wlcores[lcore_id])) continue; diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c index b3af4bfecaff..752603803b25 100644 --- a/app/test-eventdev/test_perf_common.c +++ b/app/test-eventdev/test_perf_common.c @@ -254,7 +254,7 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, int port_idx = 0; /* launch workers */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (!(opt->wlcores[lcore_id])) continue; @@ -268,7 +268,7 @@ perf_launch_lcores(struct evt_test *test, struct evt_options *opt, } /* launch producers */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (!(opt->plcores[lcore_id])) continue; @@ -541,8 +541,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) { unsigned int lcores; - /* N producer + N worker + 1 master when producer cores are used - * Else N worker + 1 master when Rx adapter is used + /* N producer + N worker + 1 initial lcore when producer cores are used + * Else N worker + 1 initial lcore when Rx adapter is used */ lcores = opt->prod_type == EVT_PROD_TYPE_SYNT ? 3 : 2; @@ -552,8 +552,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) } /* Validate worker lcores */ - if (evt_lcores_has_overlap(opt->wlcores, rte_get_master_lcore())) { - evt_err("worker lcores overlaps with master lcore"); + if (evt_lcores_has_overlap(opt->wlcores, rte_get_initial_lcore())) { + evt_err("worker lcores overlaps with initial lcore"); return -1; } if (evt_lcores_has_overlap_multi(opt->wlcores, opt->plcores)) { @@ -573,8 +573,8 @@ perf_opt_check(struct evt_options *opt, uint64_t nb_queues) opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR) { /* Validate producer lcores */ if (evt_lcores_has_overlap(opt->plcores, - rte_get_master_lcore())) { - evt_err("producer lcores overlaps with master lcore"); + rte_get_initial_lcore())) { + evt_err("producer lcores overlaps with initial lcore"); return -1; } if (evt_has_disabled_lcore(opt->plcores)) { diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 17088b1b48e4..00ec3dad6bf7 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -60,7 +60,7 @@ pipeline_launch_lcores(struct evt_test *test, struct evt_options *opt, int port_idx = 0; /* launch workers */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (!(opt->wlcores[lcore_id])) continue; @@ -107,7 +107,7 @@ pipeline_opt_check(struct evt_options *opt, uint64_t nb_queues) { unsigned int lcores; /* - * N worker + 1 master + * N worker + 1 initial lcore */ lcores = 2; @@ -129,8 +129,8 @@ pipeline_opt_check(struct evt_options *opt, uint64_t nb_queues) } /* Validate worker lcores */ - if (evt_lcores_has_overlap(opt->wlcores, rte_get_master_lcore())) { - evt_err("worker lcores overlaps with master lcore"); + if (evt_lcores_has_overlap(opt->wlcores, rte_get_initial_lcore())) { + evt_err("worker lcores overlaps with initial lcore"); return -1; } if (evt_has_disabled_lcore(opt->wlcores)) { From patchwork Fri Jun 5 22:58:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70909 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA51CA0350; Sat, 6 Jun 2020 01:02:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 642801D668; Sat, 6 Jun 2020 00:59:30 +0200 (CEST) Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by dpdk.org (Postfix) with ESMTP id 003061D664 for ; Sat, 6 Jun 2020 00:59:26 +0200 (CEST) Received: by mail-pf1-f175.google.com with SMTP id h185so5641484pfg.2 for ; Fri, 05 Jun 2020 15:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BAl5U9O11ZTLTR3ibnEkdO9/YlDc/HZfMyqabeuq+JY=; b=vAd1VvqljwwB5pPSHqcHailV+qJWaluKQW6WvIUonwt4n0YoSWa/SuHuNccuCcpYYY 7p8AZX5Qs5xg/l478B8tIu0p/Wf6Z3OdvE4TVbWtCLCZjFRhgaXGzFYmHRAdBFjevGoa pHHKWlKREYMnn4Er2mj6db6aBK6bcJmDdm+ZLH680AJGx3BBPqnRdxSDMUwryUfWIjRQ poRGZixQPR2dSPEurxgWUB5WGZbD4Hh1Lmln2urP348iNkeOuhZF9GlvghLO9wncEi75 xdZVTQJDGhcHEG9A8qYOKqZGBQufn6LPkbq3/kCm2sduBda707gsouExnVDI/EGTZxrE IOvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BAl5U9O11ZTLTR3ibnEkdO9/YlDc/HZfMyqabeuq+JY=; b=bhwOvyCVpvcZBZwEQt+aXqhTfvfb293A8lYM3rUIab+4QP9M4SKGKDKCxk/tgM4swq uL0DDuIVPl/i2IugOjvggQf5CVw6o4/Y0l64INYIJLdmL4Iz0R/qGOORfQczJY2zb+HU jwOQrwRJFTo96asfa2z4mKl62eaI/wRygeqrFDyK1QRb5ljTgKvUxQj8YbYCCkO09wb1 rT9/1tgvvLUZ166SzNipl4fW+H+nRp/exqLGlV52Bkqc26CFMIeC+Uq8A7UF6hSf6m1n Qj4q1emP9D953BnHbplyHVX6+12tVmzfYvQIsEv42GiwHYIIlP3PXsCsSRqiHbMwgREt QMpw== X-Gm-Message-State: AOAM531tcaSycYjhhsCD0fNEXCkovW/4dvEnXbHo8P1VTHBk93BzMEHY jKWmbe7Nzs5ydMrXxv3oPVZmT5ASIWA= X-Google-Smtp-Source: ABdhPJxxFwEbtd23NrV5f8cN6bCZc0GI69JGLS9AYr1VJcKjYtPClfvjInDevmeKPqIgF3Psgs3Tng== X-Received: by 2002:a63:521e:: with SMTP id g30mr11896315pgb.106.1591397964204; Fri, 05 Jun 2020 15:59:24 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:23 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:05 -0700 Message-Id: <20200605225811.26342-21-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 20/26] app/test: repalce refernces to master/slave X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial and worker when referring to lcores Signed-off-by: Stephen Hemminger --- app/test/autotest_test_funcs.py | 2 +- app/test/test.c | 2 +- app/test/test_atomic.c | 26 ++++---- app/test/test_barrier.c | 2 +- app/test/test_cryptodev.c | 16 ++--- app/test/test_distributor.c | 8 +-- app/test/test_distributor_perf.c | 10 +-- app/test/test_eal_flags.c | 32 +++++----- app/test/test_efd.c | 2 +- app/test/test_efd_perf.c | 2 +- app/test/test_func_reentrancy.c | 20 +++--- app/test/test_hash_multiwriter.c | 4 +- app/test/test_hash_readwrite.c | 38 +++++------ app/test/test_kni.c | 16 ++--- app/test/test_malloc.c | 12 ++-- app/test/test_mbuf.c | 36 +++++------ app/test/test_mcslock.c | 28 ++++---- app/test/test_mempool_perf.c | 10 +-- app/test/test_mp_secondary.c | 2 +- app/test/test_pdump.c | 2 +- app/test/test_per_lcore.c | 14 ++-- app/test/test_pmd_perf.c | 20 +++--- app/test/test_rcu_qsbr.c | 2 +- app/test/test_rcu_qsbr_perf.c | 2 +- app/test/test_ring_perf.c | 14 ++-- app/test/test_ring_stress_impl.h | 10 +-- app/test/test_rwlock.c | 28 ++++---- app/test/test_service_cores.c | 10 +-- app/test/test_spinlock.c | 34 +++++----- app/test/test_stack.c | 2 +- app/test/test_stack_perf.c | 6 +- app/test/test_ticketlock.c | 36 +++++------ app/test/test_timer.c | 106 +++++++++++++++---------------- app/test/test_timer_racecond.c | 27 ++++---- app/test/test_timer_secondary.c | 2 +- app/test/test_trace_perf.c | 4 +- 36 files changed, 294 insertions(+), 293 deletions(-) diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py index 26688b71323e..23d530f1e18b 100644 --- a/app/test/autotest_test_funcs.py +++ b/app/test/autotest_test_funcs.py @@ -102,7 +102,7 @@ def rwlock_autotest(child, test_name): index = child.expect(["Test OK", "Test Failed", "Hello from core ([0-9]*) !", - "Global write lock taken on master " + "Global write lock taken on initial lcore " "core ([0-9]*)", pexpect.TIMEOUT], timeout=10) # ok diff --git a/app/test/test.c b/app/test/test.c index 94d26ab1f67c..a9fce18ca73e 100644 --- a/app/test/test.c +++ b/app/test/test.c @@ -58,7 +58,7 @@ do_recursive_call(void) #endif #endif { "test_missing_c_flag", no_action }, - { "test_master_lcore_flag", no_action }, + { "test_initial_lcore_flag", no_action }, { "test_invalid_n_flag", no_action }, { "test_no_hpet_flag", no_action }, { "test_whitelist_flag", no_action }, diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c index 214452e54399..88c3639d759d 100644 --- a/app/test/test_atomic.c +++ b/app/test/test_atomic.c @@ -456,7 +456,7 @@ test_atomic(void) printf("usual inc/dec/add/sub functions\n"); - rte_eal_mp_remote_launch(test_atomic_usual, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(test_atomic_usual, NULL, SKIP_INITIAL); rte_atomic32_set(&synchro, 1); rte_eal_mp_wait_lcore(); rte_atomic32_set(&synchro, 0); @@ -482,7 +482,7 @@ test_atomic(void) rte_atomic32_set(&a32, 0); rte_atomic16_set(&a16, 0); rte_atomic64_set(&count, 0); - rte_eal_mp_remote_launch(test_atomic_tas, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(test_atomic_tas, NULL, SKIP_INITIAL); rte_atomic32_set(&synchro, 1); rte_eal_mp_wait_lcore(); rte_atomic32_set(&synchro, 0); @@ -499,7 +499,7 @@ test_atomic(void) rte_atomic16_set(&a16, 0); rte_atomic64_set(&count, 0); rte_eal_mp_remote_launch(test_atomic_addsub_and_return, NULL, - SKIP_MASTER); + SKIP_INITIAL); rte_atomic32_set(&synchro, 1); rte_eal_mp_wait_lcore(); rte_atomic32_set(&synchro, 0); @@ -510,8 +510,8 @@ test_atomic(void) } /* - * Set a64, a32 and a16 with the same value of minus "number of slave - * lcores", launch all slave lcores to atomically increase by one and + * Set a64, a32 and a16 with the same value of minus "number of worker + * lcores", launch all worker lcores to atomically increase by one and * test them respectively. * Each lcore should have only one chance to increase a64 by one and * then check if it is equal to 0, but there should be only one lcore @@ -519,7 +519,7 @@ test_atomic(void) * Then a variable of "count", initialized to zero, is increased by * one if a64, a32 or a16 is 0 after being increased and tested * atomically. - * We can check if "count" is finally equal to 3 to see if all slave + * We can check if "count" is finally equal to 3 to see if all worker * lcores performed "atomic inc and test" right. */ printf("inc and test\n"); @@ -533,7 +533,7 @@ test_atomic(void) rte_atomic64_set(&a64, (int64_t)(1 - (int64_t)rte_lcore_count())); rte_atomic32_set(&a32, (int32_t)(1 - (int32_t)rte_lcore_count())); rte_atomic16_set(&a16, (int16_t)(1 - (int16_t)rte_lcore_count())); - rte_eal_mp_remote_launch(test_atomic_inc_and_test, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(test_atomic_inc_and_test, NULL, SKIP_INITIAL); rte_atomic32_set(&synchro, 1); rte_eal_mp_wait_lcore(); rte_atomic32_clear(&synchro); @@ -544,7 +544,7 @@ test_atomic(void) } /* - * Same as above, but this time we set the values to "number of slave + * Same as above, but this time we set the values to "number of worker * lcores", and decrement instead of increment. */ printf("dec and test\n"); @@ -555,7 +555,7 @@ test_atomic(void) rte_atomic64_set(&a64, (int64_t)(rte_lcore_count() - 1)); rte_atomic32_set(&a32, (int32_t)(rte_lcore_count() - 1)); rte_atomic16_set(&a16, (int16_t)(rte_lcore_count() - 1)); - rte_eal_mp_remote_launch(test_atomic_dec_and_test, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(test_atomic_dec_and_test, NULL, SKIP_INITIAL); rte_atomic32_set(&synchro, 1); rte_eal_mp_wait_lcore(); rte_atomic32_clear(&synchro); @@ -569,10 +569,10 @@ test_atomic(void) /* * This case tests the functionality of rte_atomic128_cmp_exchange * API. It calls rte_atomic128_cmp_exchange with four kinds of memory - * models successively on each slave core. Once each 128-bit atomic + * models successively on each worker core. Once each 128-bit atomic * compare and swap operation is successful, it updates the global * 128-bit counter by 2 for the first 64-bit and 1 for the second - * 64-bit. Each slave core iterates this test N times. + * 64-bit. Each worker core iterates this test N times. * At the end of test, verify whether the first 64-bits of the 128-bit * counter and the second 64bits is differ by the total iterations. If * it is, the test passes. @@ -585,7 +585,7 @@ test_atomic(void) count128.val[1] = 0; rte_eal_mp_remote_launch(test_atomic128_cmp_exchange, NULL, - SKIP_MASTER); + SKIP_INITIAL); rte_atomic32_set(&synchro, 1); rte_eal_mp_wait_lcore(); rte_atomic32_clear(&synchro); @@ -619,7 +619,7 @@ test_atomic(void) token64 = ((uint64_t)get_crc8(&t.u8[0], sizeof(token64) - 1) << 56) | (t.u64 & 0x00ffffffffffffff); - rte_eal_mp_remote_launch(test_atomic_exchange, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(test_atomic_exchange, NULL, SKIP_INITIAL); rte_atomic32_set(&synchro, 1); rte_eal_mp_wait_lcore(); rte_atomic32_clear(&synchro); diff --git a/app/test/test_barrier.c b/app/test/test_barrier.c index 43b5f6232c6d..a27a4b0ae06f 100644 --- a/app/test/test_barrier.c +++ b/app/test/test_barrier.c @@ -236,7 +236,7 @@ plock_test(uint64_t iter, enum plock_use_type utype) /* test phase - start and wait for completion on each active lcore */ - rte_eal_mp_remote_launch(plock_test1_lcore, lpt, CALL_MASTER); + rte_eal_mp_remote_launch(plock_test1_lcore, lpt, CALL_INITIAL); rte_eal_mp_wait_lcore(); /* validation phase - make sure that shared and local data match */ diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 8f631468b740..2ebc5c6ac806 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -474,29 +474,29 @@ testsuite_setup(void) char vdev_args[VDEV_ARGS_SIZE] = {""}; char temp_str[VDEV_ARGS_SIZE] = {"mode=multi-core," "ordering=enable,name=cryptodev_test_scheduler,corelist="}; - uint16_t slave_core_count = 0; + uint16_t worker_core_count = 0; uint16_t socket_id = 0; if (gbl_driver_id == rte_cryptodev_driver_id_get( RTE_STR(CRYPTODEV_NAME_SCHEDULER_PMD))) { - /* Identify the Slave Cores - * Use 2 slave cores for the device args + /* Identify the Worker Cores + * Use 2 worker cores for the device args */ - RTE_LCORE_FOREACH_SLAVE(i) { - if (slave_core_count > 1) + RTE_LCORE_FOREACH_WORKER(i) { + if (worker_core_count > 1) break; snprintf(vdev_args, sizeof(vdev_args), "%s%d", temp_str, i); strcpy(temp_str, vdev_args); strlcat(temp_str, ";", sizeof(temp_str)); - slave_core_count++; + worker_core_count++; socket_id = rte_lcore_to_socket_id(i); } - if (slave_core_count != 2) { + if (worker_core_count != 2) { RTE_LOG(ERR, USER1, "Cryptodev scheduler test require at least " - "two slave cores to run. " + "two worker cores to run. " "Please use the correct coremask.\n"); return TEST_FAILED; } diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c index ba1f81cf8d19..ebc415953872 100644 --- a/app/test/test_distributor.c +++ b/app/test/test_distributor.c @@ -654,13 +654,13 @@ test_distributor(void) sizeof(worker_params.name)); rte_eal_mp_remote_launch(handle_work, - &worker_params, SKIP_MASTER); + &worker_params, SKIP_INITIAL); if (sanity_test(&worker_params, p) < 0) goto err; quit_workers(&worker_params, p); rte_eal_mp_remote_launch(handle_work_with_free_mbufs, - &worker_params, SKIP_MASTER); + &worker_params, SKIP_INITIAL); if (sanity_test_with_mbuf_alloc(&worker_params, p) < 0) goto err; quit_workers(&worker_params, p); @@ -668,7 +668,7 @@ test_distributor(void) if (rte_lcore_count() > 2) { rte_eal_mp_remote_launch(handle_work_for_shutdown_test, &worker_params, - SKIP_MASTER); + SKIP_INITIAL); if (sanity_test_with_worker_shutdown(&worker_params, p) < 0) goto err; @@ -676,7 +676,7 @@ test_distributor(void) rte_eal_mp_remote_launch(handle_work_for_shutdown_test, &worker_params, - SKIP_MASTER); + SKIP_INITIAL); if (test_flush_with_worker_shutdown(&worker_params, p) < 0) goto err; diff --git a/app/test/test_distributor_perf.c b/app/test/test_distributor_perf.c index f153bcf9bd87..06fb2dbb183b 100644 --- a/app/test/test_distributor_perf.c +++ b/app/test/test_distributor_perf.c @@ -54,10 +54,10 @@ time_cache_line_switch(void) /* allocate a full cache line for data, we use only first byte of it */ uint64_t data[RTE_CACHE_LINE_SIZE*3 / sizeof(uint64_t)]; - unsigned i, slaveid = rte_get_next_lcore(rte_lcore_id(), 0, 0); + unsigned i, workerid = rte_get_next_lcore(rte_lcore_id(), 0, 0); volatile uint64_t *pdata = &data[0]; *pdata = 1; - rte_eal_remote_launch((lcore_function_t *)flip_bit, &data[0], slaveid); + rte_eal_remote_launch((lcore_function_t *)flip_bit, &data[0], workerid); while (*pdata) rte_pause(); @@ -72,7 +72,7 @@ time_cache_line_switch(void) while (*pdata) rte_pause(); *pdata = 2; - rte_eal_wait_lcore(slaveid); + rte_eal_wait_lcore(workerid); printf("==== Cache line switch test ===\n"); printf("Time for %u iterations = %"PRIu64" ticks\n", (1<single_read = end / i; for (n = 0; n < NUM_TEST; n++) { - unsigned int tot_slave_lcore = rte_lcore_count() - 1; - if (tot_slave_lcore < core_cnt[n] * 2) + unsigned int tot_worker_lcore = rte_lcore_count() - 1; + if (tot_worker_lcore < core_cnt[n] * 2) goto finish; rte_atomic64_clear(&greads); @@ -467,7 +467,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm, for (i = 0; i < core_cnt[n]; i++) rte_eal_remote_launch(test_rw_reader, (void *)(uintptr_t)read_cnt, - slave_core_ids[i]); + worker_core_ids[i]); rte_eal_mp_wait_lcore(); @@ -476,7 +476,7 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm, for (; i < core_cnt[n] * 2; i++) rte_eal_remote_launch(test_rw_writer, (void *)((uintptr_t)start_coreid), - slave_core_ids[i]); + worker_core_ids[i]); rte_eal_mp_wait_lcore(); @@ -521,20 +521,20 @@ test_hash_readwrite_perf(struct perf *perf_results, int use_htm, for (i = core_cnt[n]; i < core_cnt[n] * 2; i++) rte_eal_remote_launch(test_rw_writer, (void *)((uintptr_t)start_coreid), - slave_core_ids[i]); + worker_core_ids[i]); for (i = 0; i < core_cnt[n]; i++) rte_eal_remote_launch(test_rw_reader, (void *)(uintptr_t)read_cnt, - slave_core_ids[i]); + worker_core_ids[i]); } else { for (i = 0; i < core_cnt[n]; i++) rte_eal_remote_launch(test_rw_reader, (void *)(uintptr_t)read_cnt, - slave_core_ids[i]); + worker_core_ids[i]); for (; i < core_cnt[n] * 2; i++) rte_eal_remote_launch(test_rw_writer, (void *)((uintptr_t)start_coreid), - slave_core_ids[i]); + worker_core_ids[i]); } rte_eal_mp_wait_lcore(); @@ -626,8 +626,8 @@ test_hash_rw_perf_main(void) return TEST_SKIPPED; } - RTE_LCORE_FOREACH_SLAVE(core_id) { - slave_core_ids[i] = core_id; + RTE_LCORE_FOREACH_WORKER(core_id) { + worker_core_ids[i] = core_id; i++; } @@ -710,8 +710,8 @@ test_hash_rw_func_main(void) return TEST_SKIPPED; } - RTE_LCORE_FOREACH_SLAVE(core_id) { - slave_core_ids[i] = core_id; + RTE_LCORE_FOREACH_WORKER(core_id) { + worker_core_ids[i] = core_id; i++; } diff --git a/app/test/test_kni.c b/app/test/test_kni.c index e47ab36e0231..dfa28a2a2999 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -85,7 +85,7 @@ static struct rte_kni_ops kni_ops = { .config_promiscusity = NULL, }; -static unsigned lcore_master, lcore_ingress, lcore_egress; +static unsigned lcore_initial, lcore_ingress, lcore_egress; static struct rte_kni *test_kni_ctx; static struct test_kni_stats stats; @@ -202,7 +202,7 @@ test_kni_link_change(void) * supported by KNI kernel module. The ingress lcore will allocate mbufs and * transmit them to kernel space; while the egress lcore will receive the mbufs * from kernel space and free them. - * On the master lcore, several commands will be run to check handling the + * On the initial lcore, several commands will be run to check handling the * kernel requests. And it will finally set the flag to exit the KNI * transmitting/receiving to/from the kernel space. * @@ -217,7 +217,7 @@ test_kni_loop(__rte_unused void *arg) const unsigned lcore_id = rte_lcore_id(); struct rte_mbuf *pkts_burst[PKT_BURST_SZ]; - if (lcore_id == lcore_master) { + if (lcore_id == lcore_initial) { rte_delay_ms(KNI_TIMEOUT_MS); /* tests of handling kernel request */ if (system(IFCONFIG TEST_KNI_PORT" up") == -1) @@ -276,12 +276,12 @@ test_kni_allocate_lcores(void) { unsigned i, count = 0; - lcore_master = rte_get_master_lcore(); - printf("master lcore: %u\n", lcore_master); + lcore_initial = rte_get_initial_lcore(); + printf("initial lcore: %u\n", lcore_initial); for (i = 0; i < RTE_MAX_LCORE; i++) { if (count >=2 ) break; - if (rte_lcore_is_enabled(i) && i != lcore_master) { + if (rte_lcore_is_enabled(i) && i != lcore_initial) { count ++; if (count == 1) lcore_ingress = i; @@ -487,8 +487,8 @@ test_kni_processing(uint16_t port_id, struct rte_mempool *mp) if (ret != 0) goto fail_kni; - rte_eal_mp_remote_launch(test_kni_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(i) { + rte_eal_mp_remote_launch(test_kni_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(i) { if (rte_eal_wait_lcore(i) < 0) { ret = -1; goto fail_kni; diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index 71b3cfdde5cf..758e6194a852 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -1007,11 +1007,11 @@ test_malloc(void) else printf("test_realloc() passed\n"); /*----------------------------*/ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(test_align_overlap_per_lcore, NULL, lcore_id); } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) ret = -1; } @@ -1022,11 +1022,11 @@ test_malloc(void) else printf("test_align_overlap_per_lcore() passed\n"); /*----------------------------*/ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(test_reordered_free_per_lcore, NULL, lcore_id); } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) ret = -1; } @@ -1037,11 +1037,11 @@ test_malloc(void) else printf("test_reordered_free_per_lcore() passed\n"); /*----------------------------*/ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(test_random_alloc_free, NULL, lcore_id); } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) ret = -1; } diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 71bdab6917b1..f5f092b9478d 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -72,7 +72,7 @@ #ifdef RTE_MBUF_REFCNT_ATOMIC -static volatile uint32_t refcnt_stop_slaves; +static volatile uint32_t refcnt_stop_workers; static unsigned refcnt_lcore[RTE_MAX_LCORE]; #endif @@ -1000,7 +1000,7 @@ test_pktmbuf_free_segment(struct rte_mempool *pktmbuf_pool) #ifdef RTE_MBUF_REFCNT_ATOMIC static int -test_refcnt_slave(void *arg) +test_refcnt_worker(void *arg) { unsigned lcore, free; void *mp = 0; @@ -1010,7 +1010,7 @@ test_refcnt_slave(void *arg) printf("%s started at lcore %u\n", __func__, lcore); free = 0; - while (refcnt_stop_slaves == 0) { + while (refcnt_stop_workers == 0) { if (rte_ring_dequeue(refcnt_mbuf_ring, &mp) == 0) { free++; rte_pktmbuf_free(mp); @@ -1038,7 +1038,7 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter, /* For each mbuf in the pool: * - allocate mbuf, * - increment it's reference up to N+1, - * - enqueue it N times into the ring for slave cores to free. + * - enqueue it N times into the ring for worker cores to free. */ for (i = 0, n = rte_mempool_avail_count(refcnt_pool); i != n && (m = rte_pktmbuf_alloc(refcnt_pool)) != NULL; @@ -1062,7 +1062,7 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter, rte_panic("(lcore=%u, iter=%u): was able to allocate only " "%u from %u mbufs\n", lcore, iter, i, n); - /* wait till slave lcores will consume all mbufs */ + /* wait till worker lcores will consume all mbufs */ while (!rte_ring_empty(refcnt_mbuf_ring)) ; @@ -1083,8 +1083,8 @@ test_refcnt_iter(unsigned int lcore, unsigned int iter, } static int -test_refcnt_master(struct rte_mempool *refcnt_pool, - struct rte_ring *refcnt_mbuf_ring) +test_refcnt_main(struct rte_mempool *refcnt_pool, + struct rte_ring *refcnt_mbuf_ring) { unsigned i, lcore; @@ -1094,7 +1094,7 @@ test_refcnt_master(struct rte_mempool *refcnt_pool, for (i = 0; i != REFCNT_MAX_ITER; i++) test_refcnt_iter(lcore, i, refcnt_pool, refcnt_mbuf_ring); - refcnt_stop_slaves = 1; + refcnt_stop_workers = 1; rte_wmb(); printf("%s finished at lcore %u\n", __func__, lcore); @@ -1107,7 +1107,7 @@ static int test_refcnt_mbuf(void) { #ifdef RTE_MBUF_REFCNT_ATOMIC - unsigned int master, slave, tref; + unsigned int initial, worker, tref; int ret = -1; struct rte_mempool *refcnt_pool = NULL; struct rte_ring *refcnt_mbuf_ring = NULL; @@ -1139,26 +1139,26 @@ test_refcnt_mbuf(void) goto err; } - refcnt_stop_slaves = 0; + refcnt_stop_workers = 0; memset(refcnt_lcore, 0, sizeof (refcnt_lcore)); - rte_eal_mp_remote_launch(test_refcnt_slave, refcnt_mbuf_ring, - SKIP_MASTER); + rte_eal_mp_remote_launch(test_refcnt_worker, refcnt_mbuf_ring, + SKIP_INITIAL); - test_refcnt_master(refcnt_pool, refcnt_mbuf_ring); + test_refcnt_main(refcnt_pool, refcnt_mbuf_ring); rte_eal_mp_wait_lcore(); /* check that we porcessed all references */ tref = 0; - master = rte_get_master_lcore(); + initial = rte_get_initial_lcore(); - RTE_LCORE_FOREACH_SLAVE(slave) - tref += refcnt_lcore[slave]; + RTE_LCORE_FOREACH_WORKER(worker) + tref += refcnt_lcore[worker]; - if (tref != refcnt_lcore[master]) + if (tref != refcnt_lcore[initial]) rte_panic("referenced mbufs: %u, freed mbufs: %u\n", - tref, refcnt_lcore[master]); + tref, refcnt_lcore[initial]); rte_mempool_dump(stdout, refcnt_pool); rte_ring_dump(stdout, refcnt_mbuf_ring); diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c index ddccaafa9242..9cd9da19dd72 100644 --- a/app/test/test_mcslock.c +++ b/app/test/test_mcslock.c @@ -28,7 +28,7 @@ * These tests are derived from spin lock test cases. * * - The functional test takes all of these locks and launches the - * ''test_mcslock_per_core()'' function on each core (except the master). + * ''test_mcslock_per_core()'' function on each core (except the initial). * * - The function takes the global lock, display something, then releases * the global lock on each core. @@ -123,9 +123,9 @@ test_mcslock_perf(void) printf("\nTest with lock on %u cores...\n", (rte_lcore_count())); rte_atomic32_set(&synchro, 0); - rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MASTER); + rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_INITIAL); - /* start synchro and launch test on master */ + /* start synchro and launch test on initial lcore */ rte_atomic32_set(&synchro, 1); load_loop_fn(&lock); @@ -154,8 +154,8 @@ test_mcslock_try(__rte_unused void *arg) rte_mcslock_t ml_me = RTE_PER_LCORE(_ml_me); rte_mcslock_t ml_try_me = RTE_PER_LCORE(_ml_try_me); - /* Locked ml_try in the master lcore, so it should fail - * when trying to lock it in the slave lcore. + /* Locked ml_try in the initial lcore, so it should fail + * when trying to lock it in the worker lcore. */ if (rte_mcslock_trylock(&p_ml_try, &ml_try_me) == 0) { rte_mcslock_lock(&p_ml, &ml_me); @@ -185,20 +185,20 @@ test_mcslock(void) * Test mcs lock & unlock on each core */ - /* slave cores should be waiting: print it */ - RTE_LCORE_FOREACH_SLAVE(i) { + /* worker cores should be waiting: print it */ + RTE_LCORE_FOREACH_WORKER(i) { printf("lcore %d state: %d\n", i, (int) rte_eal_get_lcore_state(i)); } rte_mcslock_lock(&p_ml, &ml_me); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_eal_remote_launch(test_mcslock_per_core, NULL, i); } - /* slave cores should be busy: print it */ - RTE_LCORE_FOREACH_SLAVE(i) { + /* worker cores should be busy: print it */ + RTE_LCORE_FOREACH_WORKER(i) { printf("lcore %d state: %d\n", i, (int) rte_eal_get_lcore_state(i)); } @@ -210,19 +210,19 @@ test_mcslock(void) /* * Test if it could return immediately from try-locking a locked object. * Here it will lock the mcs lock object first, then launch all the - * slave lcores to trylock the same mcs lock object. - * All the slave lcores should give up try-locking a locked object and + * worker lcores to trylock the same mcs lock object. + * All the worker lcores should give up try-locking a locked object and * return immediately, and then increase the "count" initialized with * zero by one per times. * We can check if the "count" is finally equal to the number of all - * slave lcores to see if the behavior of try-locking a locked + * worker lcores to see if the behavior of try-locking a locked * mcslock object is correct. */ if (rte_mcslock_trylock(&p_ml_try, &ml_try_me) == 0) return -1; count = 0; - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_eal_remote_launch(test_mcslock_try, NULL, i); } rte_eal_mp_wait_lcore(); diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c index 60bda8aadbe8..383f3928f2c1 100644 --- a/app/test/test_mempool_perf.c +++ b/app/test/test_mempool_perf.c @@ -143,8 +143,8 @@ per_lcore_mempool_test(void *arg) stats[lcore_id].enq_count = 0; - /* wait synchro for slaves */ - if (lcore_id != rte_get_master_lcore()) + /* wait synchro for workers */ + if (lcore_id != rte_get_initial_lcore()) while (rte_atomic32_read(&synchro) == 0); start_cycles = rte_get_timer_cycles(); @@ -214,7 +214,7 @@ launch_cores(struct rte_mempool *mp, unsigned int cores) return -1; } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (cores == 1) break; cores--; @@ -222,13 +222,13 @@ launch_cores(struct rte_mempool *mp, unsigned int cores) mp, lcore_id); } - /* start synchro and launch test on master */ + /* start synchro and launch test on initial lcore */ rte_atomic32_set(&synchro, 1); ret = per_lcore_mempool_test(mp); cores = cores_save; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (cores == 1) break; cores--; diff --git a/app/test/test_mp_secondary.c b/app/test/test_mp_secondary.c index ac15ddbf2009..2cc1586fcde0 100644 --- a/app/test/test_mp_secondary.c +++ b/app/test/test_mp_secondary.c @@ -94,7 +94,7 @@ run_secondary_instances(void) #endif snprintf(coremask, sizeof(coremask), "%x", \ - (1 << rte_get_master_lcore())); + (1 << rte_get_initial_lcore())); ret |= launch_proc(argv1); ret |= launch_proc(argv2); diff --git a/app/test/test_pdump.c b/app/test/test_pdump.c index 6a1180bcb78e..d2d2df7a8016 100644 --- a/app/test/test_pdump.c +++ b/app/test/test_pdump.c @@ -184,7 +184,7 @@ run_pdump_server_tests(void) }; snprintf(coremask, sizeof(coremask), "%x", - (1 << rte_get_master_lcore())); + (1 << rte_get_initial_lcore())); ret = test_pdump_init(); ret |= launch_p(argv1); diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c index fcd00212f1eb..ff91a3cf5b2b 100644 --- a/app/test/test_per_lcore.c +++ b/app/test/test_per_lcore.c @@ -73,31 +73,31 @@ test_per_lcore(void) unsigned lcore_id; int ret; - rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(assign_vars, NULL, SKIP_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } - rte_eal_mp_remote_launch(display_vars, NULL, SKIP_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(display_vars, NULL, SKIP_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } /* test if it could do remote launch twice at the same time or not */ - ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MASTER); + ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_INITIAL); if (ret < 0) { printf("It fails to do remote launch but it should able to do\n"); return -1; } /* it should not be able to launch a lcore which is running */ - ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_MASTER); + ret = rte_eal_mp_remote_launch(test_per_lcore_delay, NULL, SKIP_INITIAL); if (ret == 0) { printf("It does remote launch successfully but it should not at this time\n"); return -1; } - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index 352cd47156ba..efe0814f175e 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -278,7 +278,7 @@ alloc_lcore(uint16_t socketid) for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { if (LCORE_AVAIL != lcore_conf[lcore_id].status || lcore_conf[lcore_id].socketid != socketid || - lcore_id == rte_get_master_lcore()) + lcore_id == rte_get_initial_lcore()) continue; lcore_conf[lcore_id].status = LCORE_USED; lcore_conf[lcore_id].nb_ports = 0; @@ -664,7 +664,7 @@ exec_burst(uint32_t flags, int lcore) static int test_pmd_perf(void) { - uint16_t nb_ports, num, nb_lcores, slave_id = (uint16_t)-1; + uint16_t nb_ports, num, nb_lcores, worker_id = (uint16_t)-1; uint16_t nb_rxd = MAX_TRAFFIC_BURST; uint16_t nb_txd = MAX_TRAFFIC_BURST; uint16_t portid; @@ -702,13 +702,13 @@ test_pmd_perf(void) RTE_ETH_FOREACH_DEV(portid) { if (socketid == -1) { socketid = rte_eth_dev_socket_id(portid); - slave_id = alloc_lcore(socketid); - if (slave_id == (uint16_t)-1) { + worker_id = alloc_lcore(socketid); + if (worker_id == (uint16_t)-1) { printf("No avail lcore to run test\n"); return -1; } printf("Performance test runs on lcore %u socket %u\n", - slave_id, socketid); + worker_id, socketid); } if (socketid != rte_eth_dev_socket_id(portid)) { @@ -765,8 +765,8 @@ test_pmd_perf(void) "rte_eth_promiscuous_enable: err=%s, port=%d\n", rte_strerror(-ret), portid); - lcore_conf[slave_id].portlist[num++] = portid; - lcore_conf[slave_id].nb_ports++; + lcore_conf[worker_id].portlist[num++] = portid; + lcore_conf[worker_id].nb_ports++; } check_all_ports_link_status(nb_ports, RTE_PORT_ALL); @@ -791,13 +791,13 @@ test_pmd_perf(void) if (NULL == do_measure) do_measure = measure_rxtx; - rte_eal_remote_launch(main_loop, NULL, slave_id); + rte_eal_remote_launch(main_loop, NULL, worker_id); - if (rte_eal_wait_lcore(slave_id) < 0) + if (rte_eal_wait_lcore(worker_id) < 0) return -1; } else if (sc_flag == SC_BURST_POLL_FIRST || sc_flag == SC_BURST_XMIT_FIRST) - if (exec_burst(sc_flag, slave_id) < 0) + if (exec_burst(sc_flag, worker_id) < 0) return -1; /* port tear down */ diff --git a/app/test/test_rcu_qsbr.c b/app/test/test_rcu_qsbr.c index 0a9e5ecd1a44..7ae66e4dfb76 100644 --- a/app/test/test_rcu_qsbr.c +++ b/app/test/test_rcu_qsbr.c @@ -1327,7 +1327,7 @@ test_rcu_qsbr_main(void) } num_cores = 0; - RTE_LCORE_FOREACH_SLAVE(core_id) { + RTE_LCORE_FOREACH_WORKER(core_id) { enabled_core_ids[num_cores] = core_id; num_cores++; } diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c index d35a6d089784..3017e71120ad 100644 --- a/app/test/test_rcu_qsbr_perf.c +++ b/app/test/test_rcu_qsbr_perf.c @@ -625,7 +625,7 @@ test_rcu_qsbr_main(void) rte_atomic64_init(&check_cycles); num_cores = 0; - RTE_LCORE_FOREACH_SLAVE(core_id) { + RTE_LCORE_FOREACH_WORKER(core_id) { enabled_core_ids[num_cores] = core_id; num_cores++; } diff --git a/app/test/test_ring_perf.c b/app/test/test_ring_perf.c index ee21faf71380..4d95e3c17f3d 100644 --- a/app/test/test_ring_perf.c +++ b/app/test/test_ring_perf.c @@ -297,7 +297,7 @@ run_on_core_pair(struct lcore_pair *cores, struct rte_ring *r, const int esize) lcore_count = 0; param1.size = param2.size = bulk_sizes[i]; param1.r = param2.r = r; - if (cores->c1 == rte_get_master_lcore()) { + if (cores->c1 == rte_get_initial_lcore()) { rte_eal_remote_launch(f2, ¶m2, cores->c2); f1(¶m1); rte_eal_wait_lcore(cores->c2); @@ -340,8 +340,8 @@ load_loop_fn_helper(struct thread_params *p, const int esize) if (burst == NULL) return -1; - /* wait synchro for slaves */ - if (lcore != rte_get_master_lcore()) + /* wait synchro for workers */ + if (lcore != rte_get_initial_lcore()) while (rte_atomic32_read(&synchro) == 0) rte_pause(); @@ -396,12 +396,12 @@ run_on_all_cores(struct rte_ring *r, const int esize) param.size = bulk_sizes[i]; param.r = r; - /* clear synchro and start slaves */ + /* clear synchro and start workers */ rte_atomic32_set(&synchro, 0); - if (rte_eal_mp_remote_launch(lcore_f, ¶m, SKIP_MASTER) < 0) + if (rte_eal_mp_remote_launch(lcore_f, ¶m, SKIP_INITIAL) < 0) return -1; - /* start synchro and launch test on master */ + /* start synchro and launch test on initial lcore */ rte_atomic32_set(&synchro, 1); lcore_f(¶m); @@ -552,7 +552,7 @@ test_ring_perf_esize(const int esize) goto test_fail; } - printf("\n### Testing using all slave nodes ###\n"); + printf("\n### Testing using all worker nodes ###\n"); if (run_on_all_cores(r, esize) < 0) goto test_fail; diff --git a/app/test/test_ring_stress_impl.h b/app/test/test_ring_stress_impl.h index 222d62bc4f4d..fab924515fc3 100644 --- a/app/test/test_ring_stress_impl.h +++ b/app/test/test_ring_stress_impl.h @@ -6,7 +6,7 @@ /** * Stress test for ring enqueue/dequeue operations. - * Performs the following pattern on each slave worker: + * Performs the following pattern on each worker worker: * dequeue/read-write data from the dequeued objects/enqueue. * Serves as both functional and performance test of ring * enqueue/dequeue operations under high contention @@ -348,8 +348,8 @@ test_mt1(int (*test)(void *)) memset(arg, 0, sizeof(arg)); - /* launch on all slaves */ - RTE_LCORE_FOREACH_SLAVE(lc) { + /* launch on all workers */ + RTE_LCORE_FOREACH_WORKER(lc) { arg[lc].rng = r; arg[lc].stats = init_stat; rte_eal_remote_launch(test, &arg[lc], lc); @@ -365,12 +365,12 @@ test_mt1(int (*test)(void *)) wrk_cmd = WRK_CMD_STOP; rte_smp_wmb(); - /* wait for slaves and collect stats. */ + /* wait for workers and collect stats. */ mc = rte_lcore_id(); arg[mc].stats = init_stat; rc = 0; - RTE_LCORE_FOREACH_SLAVE(lc) { + RTE_LCORE_FOREACH_WORKER(lc) { rc |= rte_eal_wait_lcore(lc); lcore_stat_aggr(&arg[mc].stats, &arg[lc].stats); if (verbose != 0) diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c index 61bee7d7c296..ea20318c4c84 100644 --- a/app/test/test_rwlock.c +++ b/app/test/test_rwlock.c @@ -99,8 +99,8 @@ load_loop_fn(__rte_unused void *arg) uint64_t lcount = 0; const unsigned int lcore = rte_lcore_id(); - /* wait synchro for slaves */ - if (lcore != rte_get_master_lcore()) + /* wait synchro for workers */ + if (lcore != rte_get_initial_lcore()) while (rte_atomic32_read(&synchro) == 0) ; @@ -134,12 +134,12 @@ test_rwlock_perf(void) printf("\nRwlock Perf Test on %u cores...\n", rte_lcore_count()); - /* clear synchro and start slaves */ + /* clear synchro and start workers */ rte_atomic32_set(&synchro, 0); - if (rte_eal_mp_remote_launch(load_loop_fn, NULL, SKIP_MASTER) < 0) + if (rte_eal_mp_remote_launch(load_loop_fn, NULL, SKIP_INITIAL) < 0) return -1; - /* start synchro and launch test on master */ + /* start synchro and launch test on initial lcore */ rte_atomic32_set(&synchro, 1); load_loop_fn(NULL); @@ -161,7 +161,7 @@ test_rwlock_perf(void) * - There is a global rwlock and a table of rwlocks (one per lcore). * * - The test function takes all of these locks and launches the - * ``test_rwlock_per_core()`` function on each core (except the master). + * ``test_rwlock_per_core()`` function on each core (except the initial). * * - The function takes the global write lock, display something, * then releases the global lock. @@ -187,21 +187,21 @@ rwlock_test1(void) rte_rwlock_write_lock(&sl); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_rwlock_write_lock(&sl_tab[i]); rte_eal_remote_launch(test_rwlock_per_core, NULL, i); } rte_rwlock_write_unlock(&sl); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_rwlock_write_unlock(&sl_tab[i]); rte_delay_ms(100); } rte_rwlock_write_lock(&sl); /* this message should be the last message of test */ - printf("Global write lock taken on master core %u\n", rte_lcore_id()); + printf("Global write lock taken on initial core %u\n", rte_lcore_id()); rte_rwlock_write_unlock(&sl); rte_eal_mp_wait_lcore(); @@ -462,26 +462,26 @@ try_rwlock_test_rda(void) try_test_reset(); /* start read test on all avaialble lcores */ - rte_eal_mp_remote_launch(try_read_lcore, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(try_read_lcore, NULL, CALL_INITIAL); rte_eal_mp_wait_lcore(); return process_try_lcore_stats(); } -/* all slave lcores grab RDLOCK, master one grabs WRLOCK */ +/* all worker lcores grab RDLOCK, initial one grabs WRLOCK */ static int try_rwlock_test_rds_wrm(void) { try_test_reset(); - rte_eal_mp_remote_launch(try_read_lcore, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(try_read_lcore, NULL, SKIP_INITIAL); try_write_lcore(NULL); rte_eal_mp_wait_lcore(); return process_try_lcore_stats(); } -/* master and even slave lcores grab RDLOCK, odd lcores grab WRLOCK */ +/* initial and even worker lcores grab RDLOCK, odd lcores grab WRLOCK */ static int try_rwlock_test_rde_wro(void) { @@ -489,7 +489,7 @@ try_rwlock_test_rde_wro(void) try_test_reset(); - mlc = rte_get_master_lcore(); + mlc = rte_get_initial_lcore(); RTE_LCORE_FOREACH(lc) { if (lc != mlc) { diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index 981e212130bf..6b23363425c9 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -30,7 +30,7 @@ static int testsuite_setup(void) { slcore_id = rte_get_next_lcore(/* start core */ -1, - /* skip master */ 1, + /* skip initial */ 1, /* wrap */ 0); return TEST_SUCCESS; @@ -532,12 +532,12 @@ service_lcore_add_del(void) TEST_ASSERT_EQUAL(1, rte_service_lcore_count(), "Service core count not equal to one"); uint32_t slcore_1 = rte_get_next_lcore(/* start core */ -1, - /* skip master */ 1, + /* skip initial */ 1, /* wrap */ 0); TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_1), "Service core add did not return zero"); uint32_t slcore_2 = rte_get_next_lcore(/* start core */ slcore_1, - /* skip master */ 1, + /* skip initial */ 1, /* wrap */ 0); TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_2), "Service core add did not return zero"); @@ -583,12 +583,12 @@ service_threaded_test(int mt_safe) /* add next 2 cores */ uint32_t slcore_1 = rte_get_next_lcore(/* start core */ -1, - /* skip master */ 1, + /* skip initial */ 1, /* wrap */ 0); TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_1), "mt safe lcore add fail"); uint32_t slcore_2 = rte_get_next_lcore(/* start core */ slcore_1, - /* skip master */ 1, + /* skip initial */ 1, /* wrap */ 0); TEST_ASSERT_EQUAL(0, rte_service_lcore_add(slcore_2), "mt safe lcore add fail"); diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c index 842990ed3b30..87dc8a1f1eeb 100644 --- a/app/test/test_spinlock.c +++ b/app/test/test_spinlock.c @@ -28,7 +28,7 @@ * - There is a global spinlock and a table of spinlocks (one per lcore). * * - The test function takes all of these locks and launches the - * ``test_spinlock_per_core()`` function on each core (except the master). + * ``test_spinlock_per_core()`` function on each core (except the initial). * * - The function takes the global lock, display something, then releases * the global lock. @@ -109,8 +109,8 @@ load_loop_fn(void *func_param) const int use_lock = *(int*)func_param; const unsigned lcore = rte_lcore_id(); - /* wait synchro for slaves */ - if (lcore != rte_get_master_lcore()) + /* wait synchro for workers */ + if (lcore != rte_get_initial_lcore()) while (rte_atomic32_read(&synchro) == 0); begin = rte_get_timer_cycles(); @@ -149,11 +149,11 @@ test_spinlock_perf(void) printf("\nTest with lock on %u cores...\n", rte_lcore_count()); - /* Clear synchro and start slaves */ + /* Clear synchro and start workers */ rte_atomic32_set(&synchro, 0); - rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MASTER); + rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_INITIAL); - /* start synchro and launch test on master */ + /* start synchro and launch test on initial lcore */ rte_atomic32_set(&synchro, 1); load_loop_fn(&lock); @@ -200,8 +200,8 @@ test_spinlock(void) int ret = 0; int i; - /* slave cores should be waiting: print it */ - RTE_LCORE_FOREACH_SLAVE(i) { + /* worker cores should be waiting: print it */ + RTE_LCORE_FOREACH_WORKER(i) { printf("lcore %d state: %d\n", i, (int) rte_eal_get_lcore_state(i)); } @@ -214,19 +214,19 @@ test_spinlock(void) rte_spinlock_lock(&sl); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_spinlock_lock(&sl_tab[i]); rte_eal_remote_launch(test_spinlock_per_core, NULL, i); } - /* slave cores should be busy: print it */ - RTE_LCORE_FOREACH_SLAVE(i) { + /* worker cores should be busy: print it */ + RTE_LCORE_FOREACH_WORKER(i) { printf("lcore %d state: %d\n", i, (int) rte_eal_get_lcore_state(i)); } rte_spinlock_unlock(&sl); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_spinlock_unlock(&sl_tab[i]); rte_delay_ms(10); } @@ -245,7 +245,7 @@ test_spinlock(void) } else rte_spinlock_recursive_unlock(&slr); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_eal_remote_launch(test_spinlock_recursive_per_core, NULL, i); } rte_spinlock_recursive_unlock(&slr); @@ -253,12 +253,12 @@ test_spinlock(void) /* * Test if it could return immediately from try-locking a locked object. - * Here it will lock the spinlock object first, then launch all the slave + * Here it will lock the spinlock object first, then launch all the worker * lcores to trylock the same spinlock object. - * All the slave lcores should give up try-locking a locked object and + * All the worker lcores should give up try-locking a locked object and * return immediately, and then increase the "count" initialized with zero * by one per times. - * We can check if the "count" is finally equal to the number of all slave + * We can check if the "count" is finally equal to the number of all worker * lcores to see if the behavior of try-locking a locked spinlock object * is correct. */ @@ -266,7 +266,7 @@ test_spinlock(void) return -1; } count = 0; - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_eal_remote_launch(test_spinlock_try, NULL, i); } rte_eal_mp_wait_lcore(); diff --git a/app/test/test_stack.c b/app/test/test_stack.c index c8dac1f55cdc..0ef5f47874f2 100644 --- a/app/test/test_stack.c +++ b/app/test/test_stack.c @@ -362,7 +362,7 @@ test_stack_multithreaded(uint32_t flags) rte_atomic64_init(&size); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { args[lcore_id].s = s; args[lcore_id].sz = &size; diff --git a/app/test/test_stack_perf.c b/app/test/test_stack_perf.c index 3ab7267b1b72..1a49667a91fc 100644 --- a/app/test/test_stack_perf.c +++ b/app/test/test_stack_perf.c @@ -180,7 +180,7 @@ run_on_core_pair(struct lcore_pair *cores, struct rte_stack *s, args[0].sz = args[1].sz = bulk_sizes[i]; args[0].s = args[1].s = s; - if (cores->c1 == rte_get_master_lcore()) { + if (cores->c1 == rte_get_initial_lcore()) { rte_eal_remote_launch(fn, &args[1], cores->c2); fn(&args[0]); rte_eal_wait_lcore(cores->c2); @@ -210,7 +210,7 @@ run_on_n_cores(struct rte_stack *s, lcore_function_t fn, int n) rte_atomic32_set(&lcore_barrier, n); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (++cnt >= n) break; @@ -235,7 +235,7 @@ run_on_n_cores(struct rte_stack *s, lcore_function_t fn, int n) avg = args[rte_lcore_id()].avg; cnt = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (++cnt >= n) break; avg += args[lcore_id].avg; diff --git a/app/test/test_ticketlock.c b/app/test/test_ticketlock.c index 66ab3d1a0248..3b4e68af24ce 100644 --- a/app/test/test_ticketlock.c +++ b/app/test/test_ticketlock.c @@ -28,7 +28,7 @@ * - There is a global ticketlock and a table of ticketlocks (one per lcore). * * - The test function takes all of these locks and launches the - * ``test_ticketlock_per_core()`` function on each core (except the master). + * ``test_ticketlock_per_core()`` function on each core (except the initial). * * - The function takes the global lock, display something, then releases * the global lock. @@ -110,8 +110,8 @@ load_loop_fn(void *func_param) const int use_lock = *(int *)func_param; const unsigned int lcore = rte_lcore_id(); - /* wait synchro for slaves */ - if (lcore != rte_get_master_lcore()) + /* wait synchro for workers */ + if (lcore != rte_get_initial_lcore()) while (rte_atomic32_read(&synchro) == 0) ; @@ -154,11 +154,11 @@ test_ticketlock_perf(void) lcount = 0; printf("\nTest with lock on %u cores...\n", rte_lcore_count()); - /* Clear synchro and start slaves */ + /* Clear synchro and start workers */ rte_atomic32_set(&synchro, 0); - rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_MASTER); + rte_eal_mp_remote_launch(load_loop_fn, &lock, SKIP_INITIAL); - /* start synchro and launch test on master */ + /* start synchro and launch test on initial lcore */ rte_atomic32_set(&synchro, 1); load_loop_fn(&lock); @@ -208,8 +208,8 @@ test_ticketlock(void) int ret = 0; int i; - /* slave cores should be waiting: print it */ - RTE_LCORE_FOREACH_SLAVE(i) { + /* worker cores should be waiting: print it */ + RTE_LCORE_FOREACH_WORKER(i) { printf("lcore %d state: %d\n", i, (int) rte_eal_get_lcore_state(i)); } @@ -217,25 +217,25 @@ test_ticketlock(void) rte_ticketlock_init(&tl); rte_ticketlock_init(&tl_try); rte_ticketlock_recursive_init(&tlr); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_ticketlock_init(&tl_tab[i]); } rte_ticketlock_lock(&tl); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_ticketlock_lock(&tl_tab[i]); rte_eal_remote_launch(test_ticketlock_per_core, NULL, i); } - /* slave cores should be busy: print it */ - RTE_LCORE_FOREACH_SLAVE(i) { + /* worker cores should be busy: print it */ + RTE_LCORE_FOREACH_WORKER(i) { printf("lcore %d state: %d\n", i, (int) rte_eal_get_lcore_state(i)); } rte_ticketlock_unlock(&tl); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_ticketlock_unlock(&tl_tab[i]); rte_delay_ms(10); } @@ -254,7 +254,7 @@ test_ticketlock(void) } else rte_ticketlock_recursive_unlock(&tlr); - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_eal_remote_launch(test_ticketlock_recursive_per_core, NULL, i); } @@ -264,19 +264,19 @@ test_ticketlock(void) /* * Test if it could return immediately from try-locking a locked object. * Here it will lock the ticketlock object first, then launch all the - * slave lcores to trylock the same ticketlock object. - * All the slave lcores should give up try-locking a locked object and + * worker lcores to trylock the same ticketlock object. + * All the worker lcores should give up try-locking a locked object and * return immediately, and then increase the "count" initialized with * zero by one per times. * We can check if the "count" is finally equal to the number of all - * slave lcores to see if the behavior of try-locking a locked + * worker lcores to see if the behavior of try-locking a locked * ticketlock object is correct. */ if (rte_ticketlock_trylock(&tl_try) == 0) return -1; count = 0; - RTE_LCORE_FOREACH_SLAVE(i) { + RTE_LCORE_FOREACH_WORKER(i) { rte_eal_remote_launch(test_ticketlock_try, NULL, i); } rte_eal_mp_wait_lcore(); diff --git a/app/test/test_timer.c b/app/test/test_timer.c index 5933f56ed544..37a944e32bcd 100644 --- a/app/test/test_timer.c +++ b/app/test/test_timer.c @@ -37,7 +37,7 @@ * - All cores then simultaneously are set to schedule all the timers at * the same time, so conflicts should occur. * - Then there is a delay while we wait for the timers to expire - * - Then the master lcore calls timer_manage() and we check that all + * - Then the initial lcore calls timer_manage() and we check that all * timers have had their callbacks called exactly once - no more no less. * - Then we repeat the process, except after setting up the timers, we have * all cores randomly reschedule them. @@ -58,7 +58,7 @@ * * - timer0 * - * - At initialization, timer0 is loaded by the master core, on master core + * - At initialization, timer0 is loaded by the initial core, on initial lcore core * in "single" mode (time = 1 second). * - In the first 19 callbacks, timer0 is reloaded on the same core, * then, it is explicitly stopped at the 20th call. @@ -66,21 +66,21 @@ * * - timer1 * - * - At initialization, timer1 is loaded by the master core, on the - * master core in "single" mode (time = 2 seconds). + * - At initialization, timer1 is loaded by the initial core, on the + * initial core in "single" mode (time = 2 seconds). * - In the first 9 callbacks, timer1 is reloaded on another * core. After the 10th callback, timer1 is not reloaded anymore. * * - timer2 * - * - At initialization, timer2 is loaded by the master core, on the - * master core in "periodical" mode (time = 1 second). + * - At initialization, timer2 is loaded by the initial core, on the + * initial core in "periodical" mode (time = 1 second). * - In the callback, when t=25s, it stops timer3 and reloads timer0 * on the current core. * * - timer3 * - * - At initialization, timer3 is loaded by the master core, on + * - At initialization, timer3 is loaded by the initial core, on * another core in "periodical" mode (time = 1 second). * - It is stopped at t=25s by timer2. */ @@ -201,68 +201,68 @@ timer_stress_main_loop(__rte_unused void *arg) return 0; } -/* Need to synchronize slave lcores through multiple steps. */ -enum { SLAVE_WAITING = 1, SLAVE_RUN_SIGNAL, SLAVE_RUNNING, SLAVE_FINISHED }; -static rte_atomic16_t slave_state[RTE_MAX_LCORE]; +/* Need to synchronize worker lcores through multiple steps. */ +enum { WORKER_WAITING = 1, WORKER_RUN_SIGNAL, WORKER_RUNNING, WORKER_FINISHED }; +static rte_atomic16_t worker_state[RTE_MAX_LCORE]; static void -master_init_slaves(void) +init_workers(void) { unsigned i; - RTE_LCORE_FOREACH_SLAVE(i) { - rte_atomic16_set(&slave_state[i], SLAVE_WAITING); + RTE_LCORE_FOREACH_WORKER(i) { + rte_atomic16_set(&worker_state[i], WORKER_WAITING); } } static void -master_start_slaves(void) +start_workers(void) { unsigned i; - RTE_LCORE_FOREACH_SLAVE(i) { - rte_atomic16_set(&slave_state[i], SLAVE_RUN_SIGNAL); + RTE_LCORE_FOREACH_WORKER(i) { + rte_atomic16_set(&worker_state[i], WORKER_RUN_SIGNAL); } - RTE_LCORE_FOREACH_SLAVE(i) { - while (rte_atomic16_read(&slave_state[i]) != SLAVE_RUNNING) + RTE_LCORE_FOREACH_WORKER(i) { + while (rte_atomic16_read(&worker_state[i]) != WORKER_RUNNING) rte_pause(); } } static void -master_wait_for_slaves(void) +wait_for_workers(void) { unsigned i; - RTE_LCORE_FOREACH_SLAVE(i) { - while (rte_atomic16_read(&slave_state[i]) != SLAVE_FINISHED) + RTE_LCORE_FOREACH_WORKER(i) { + while (rte_atomic16_read(&worker_state[i]) != WORKER_FINISHED) rte_pause(); } } static void -slave_wait_to_start(void) +worker_wait_to_start(void) { unsigned lcore_id = rte_lcore_id(); - while (rte_atomic16_read(&slave_state[lcore_id]) != SLAVE_RUN_SIGNAL) + while (rte_atomic16_read(&worker_state[lcore_id]) != WORKER_RUN_SIGNAL) rte_pause(); - rte_atomic16_set(&slave_state[lcore_id], SLAVE_RUNNING); + rte_atomic16_set(&worker_state[lcore_id], WORKER_RUNNING); } static void -slave_finish(void) +worker_finish(void) { unsigned lcore_id = rte_lcore_id(); - rte_atomic16_set(&slave_state[lcore_id], SLAVE_FINISHED); + rte_atomic16_set(&worker_state[lcore_id], WORKER_FINISHED); } static volatile int cb_count = 0; /* callback for second stress test. will only be called - * on master lcore */ + * on initial lcore */ static void timer_stress2_cb(struct rte_timer *tim __rte_unused, void *arg __rte_unused) { @@ -278,35 +278,35 @@ timer_stress2_main_loop(__rte_unused void *arg) int i, ret; uint64_t delay = rte_get_timer_hz() / 20; unsigned lcore_id = rte_lcore_id(); - unsigned master = rte_get_master_lcore(); + unsigned initial = rte_get_initial_lcore(); int32_t my_collisions = 0; static rte_atomic32_t collisions; - if (lcore_id == master) { + if (lcore_id == initial) { cb_count = 0; test_failed = 0; rte_atomic32_set(&collisions, 0); - master_init_slaves(); + init_workers(); timers = rte_malloc(NULL, sizeof(*timers) * NB_STRESS2_TIMERS, 0); if (timers == NULL) { printf("Test Failed\n"); printf("- Cannot allocate memory for timers\n" ); test_failed = 1; - master_start_slaves(); + start_workers(); goto cleanup; } for (i = 0; i < NB_STRESS2_TIMERS; i++) rte_timer_init(&timers[i]); - master_start_slaves(); + start_workers(); } else { - slave_wait_to_start(); + worker_wait_to_start(); if (test_failed) goto cleanup; } - /* have all cores schedule all timers on master lcore */ + /* have all cores schedule all timers on initial lcore */ for (i = 0; i < NB_STRESS2_TIMERS; i++) { - ret = rte_timer_reset(&timers[i], delay, SINGLE, master, + ret = rte_timer_reset(&timers[i], delay, SINGLE, initial, timer_stress2_cb, NULL); /* there will be collisions when multiple cores simultaneously * configure the same timers */ @@ -320,14 +320,14 @@ timer_stress2_main_loop(__rte_unused void *arg) rte_delay_ms(100); /* all cores rendezvous */ - if (lcore_id == master) { - master_wait_for_slaves(); + if (lcore_id == initial) { + wait_for_workers(); } else { - slave_finish(); + worker_finish(); } /* now check that we get the right number of callbacks */ - if (lcore_id == master) { + if (lcore_id == initial) { my_collisions = rte_atomic32_read(&collisions); if (my_collisions != 0) printf("- %d timer reset collisions (OK)\n", my_collisions); @@ -338,23 +338,23 @@ timer_stress2_main_loop(__rte_unused void *arg) printf("- Expected %d callbacks, got %d\n", NB_STRESS2_TIMERS, cb_count); test_failed = 1; - master_start_slaves(); + start_workers(); goto cleanup; } cb_count = 0; /* proceed */ - master_start_slaves(); + start_workers(); } else { /* proceed */ - slave_wait_to_start(); + worker_wait_to_start(); if (test_failed) goto cleanup; } /* now test again, just stop and restart timers at random after init*/ for (i = 0; i < NB_STRESS2_TIMERS; i++) - rte_timer_reset(&timers[i], delay, SINGLE, master, + rte_timer_reset(&timers[i], delay, SINGLE, initial, timer_stress2_cb, NULL); /* pick random timer to reset, stopping them first half the time */ @@ -362,7 +362,7 @@ timer_stress2_main_loop(__rte_unused void *arg) int r = rand() % NB_STRESS2_TIMERS; if (i % 2) rte_timer_stop(&timers[r]); - rte_timer_reset(&timers[r], delay, SINGLE, master, + rte_timer_reset(&timers[r], delay, SINGLE, initial, timer_stress2_cb, NULL); } @@ -370,8 +370,8 @@ timer_stress2_main_loop(__rte_unused void *arg) rte_delay_ms(100); /* now check that we get the right number of callbacks */ - if (lcore_id == master) { - master_wait_for_slaves(); + if (lcore_id == initial) { + wait_for_workers(); rte_timer_manage(); if (cb_count != NB_STRESS2_TIMERS) { @@ -386,14 +386,14 @@ timer_stress2_main_loop(__rte_unused void *arg) } cleanup: - if (lcore_id == master) { - master_wait_for_slaves(); + if (lcore_id == initial) { + wait_for_workers(); if (timers != NULL) { rte_free(timers); timers = NULL; } } else { - slave_finish(); + worker_finish(); } return 0; @@ -465,7 +465,7 @@ timer_basic_main_loop(__rte_unused void *arg) int64_t diff = 0; /* launch all timers on core 0 */ - if (lcore_id == rte_get_master_lcore()) { + if (lcore_id == rte_get_initial_lcore()) { mytimer_reset(&mytiminfo[0], hz/4, SINGLE, lcore_id, timer_basic_cb); mytimer_reset(&mytiminfo[1], hz/2, SINGLE, lcore_id, @@ -563,7 +563,7 @@ test_timer(void) /* start other cores */ printf("Start timer stress tests\n"); - rte_eal_mp_remote_launch(timer_stress_main_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(timer_stress_main_loop, NULL, CALL_INITIAL); rte_eal_mp_wait_lcore(); /* stop timer 0 used for stress test */ @@ -572,7 +572,7 @@ test_timer(void) /* run a second, slightly different set of stress tests */ printf("\nStart timer stress tests 2\n"); test_failed = 0; - rte_eal_mp_remote_launch(timer_stress2_main_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(timer_stress2_main_loop, NULL, CALL_INITIAL); rte_eal_mp_wait_lcore(); if (test_failed) return TEST_FAILED; @@ -584,7 +584,7 @@ test_timer(void) /* start other cores */ printf("\nStart timer basic tests\n"); - rte_eal_mp_remote_launch(timer_basic_main_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(timer_basic_main_loop, NULL, CALL_INITIAL); rte_eal_mp_wait_lcore(); /* stop all timers */ diff --git a/app/test/test_timer_racecond.c b/app/test/test_timer_racecond.c index 4fc917995415..5b8941950c30 100644 --- a/app/test/test_timer_racecond.c +++ b/app/test/test_timer_racecond.c @@ -56,8 +56,8 @@ static struct rte_timer timer[N_TIMERS]; static unsigned timer_lcore_id[N_TIMERS]; -static unsigned master; -static volatile unsigned stop_slaves; +static unsigned int initial_lcore; +static volatile unsigned stop_workers; static int reload_timer(struct rte_timer *tim); @@ -95,7 +95,8 @@ reload_timer(struct rte_timer *tim) (tim - timer); int ret; - ret = rte_timer_reset(tim, ticks, PERIODICAL, master, timer_cb, NULL); + ret = rte_timer_reset(tim, ticks, PERIODICAL, + initial_lcore, timer_cb, NULL); if (ret != 0) { rte_log(RTE_LOG_DEBUG, timer_logtype_test, "- core %u failed to reset timer %" PRIuPTR " (OK)\n", @@ -106,7 +107,7 @@ reload_timer(struct rte_timer *tim) } static int -slave_main_loop(__rte_unused void *arg) +worker_main_loop(__rte_unused void *arg) { unsigned lcore_id = rte_lcore_id(); unsigned i; @@ -115,7 +116,7 @@ slave_main_loop(__rte_unused void *arg) printf("Starting main loop on core %u\n", lcore_id); - while (!stop_slaves) { + while (!stop_workers) { /* Wait until the timer manager is running. * We know it's running when we see timer[0] NOT pending. */ @@ -152,7 +153,7 @@ test_timer_racecond(void) unsigned lcore_id; unsigned i; - master = lcore_id = rte_lcore_id(); + initial_lcore = lcore_id = rte_lcore_id(); hz = rte_get_timer_hz(); /* init and start timers */ @@ -161,8 +162,8 @@ test_timer_racecond(void) ret = reload_timer(&timer[i]); TEST_ASSERT(ret == 0, "reload_timer failed"); - /* Distribute timers to slaves. - * Note that we assign timer[0] to the master. + /* Distribute timers to workers. + * Note that we assign timer[0] to the inital lcore. */ timer_lcore_id[i] = lcore_id; lcore_id = rte_get_next_lcore(lcore_id, 1, 1); @@ -172,11 +173,11 @@ test_timer_racecond(void) cur_time = rte_get_timer_cycles(); end_time = cur_time + (hz * TEST_DURATION_S); - /* start slave cores */ - stop_slaves = 0; + /* start worker cores */ + stop_workers = 0; printf("Start timer manage race condition test (%u seconds)\n", TEST_DURATION_S); - rte_eal_mp_remote_launch(slave_main_loop, NULL, SKIP_MASTER); + rte_eal_mp_remote_launch(worker_main_loop, NULL, SKIP_INITIAL); while (diff >= 0) { /* run the timers */ @@ -189,9 +190,9 @@ test_timer_racecond(void) diff = end_time - cur_time; } - /* stop slave cores */ + /* stop worker cores */ printf("Stopping timer manage race condition test\n"); - stop_slaves = 1; + stop_workers = 1; rte_eal_mp_wait_lcore(); /* stop timers */ diff --git a/app/test/test_timer_secondary.c b/app/test/test_timer_secondary.c index 7a3bc873b359..86f187280120 100644 --- a/app/test/test_timer_secondary.c +++ b/app/test/test_timer_secondary.c @@ -141,7 +141,7 @@ test_timer_secondary(void) unsigned int *mgr_lcorep = &test_info->mgr_lcore; unsigned int *sec_lcorep = &test_info->sec_lcore; - *mstr_lcorep = rte_get_master_lcore(); + *mstr_lcorep = rte_get_initial_lcore(); *mgr_lcorep = rte_get_next_lcore(*mstr_lcorep, 1, 1); *sec_lcorep = rte_get_next_lcore(*mgr_lcorep, 1, 1); diff --git a/app/test/test_trace_perf.c b/app/test/test_trace_perf.c index 50c7381b77e7..e1ad8e6f555c 100644 --- a/app/test/test_trace_perf.c +++ b/app/test/test_trace_perf.c @@ -132,7 +132,7 @@ run_test(const char *str, lcore_function_t f, struct test_data *data, size_t sz) memset(data, 0, sz); data->nb_workers = rte_lcore_count() - 1; - RTE_LCORE_FOREACH_SLAVE(id) + RTE_LCORE_FOREACH_WORKER(id) rte_eal_remote_launch(f, &data->ldata[worker++], id); wait_till_workers_are_ready(data); @@ -140,7 +140,7 @@ run_test(const char *str, lcore_function_t f, struct test_data *data, size_t sz) measure_perf(str, data); signal_workers_to_finish(data); - RTE_LCORE_FOREACH_SLAVE(id) + RTE_LCORE_FOREACH_WORKER(id) rte_eal_wait_lcore(id); } From patchwork Fri Jun 5 22:58:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70908 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9C2CAA0350; Sat, 6 Jun 2020 01:02:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2231B1D65A; Sat, 6 Jun 2020 00:59:29 +0200 (CEST) Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) by dpdk.org (Postfix) with ESMTP id 663561D666 for ; Sat, 6 Jun 2020 00:59:26 +0200 (CEST) Received: by mail-pf1-f173.google.com with SMTP id x22so5641011pfn.3 for ; Fri, 05 Jun 2020 15:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JC/yXr/kjpdZ89wjQ525wv9Hf2qxUo78XSVSDD6dE3g=; b=rVd7yBmViRnZ88xalTmsrfV3qXaynBUWKIpmzbN9ebCP+akK1lxUlgkv8AqTykm0nj DgwRIM/+sZewrq2usiHeKJf9YU3TP8Tes6J1u18HIzvQ0ON7RUtrApg4X34k7TqmpujH zLxKuf7axnTfH+EmLMg92z8G5EVP32DJNdvYbj03Sj18q0fooi50Wfj5sKmIdpJ8Dyd5 imKUoOk9yfbJQhLa/BG50qHe9BTwvHZjR3yPXrhb7Z7AZYEQe9LrJeIlUvX/gcvi+mnY RCYu48I9Cex/cOw1Sh3Puo1B0/tzmZ2FfJ4EA5YhGpSL69Kde87o3VpYrb0Easz+4+Qh ixpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JC/yXr/kjpdZ89wjQ525wv9Hf2qxUo78XSVSDD6dE3g=; b=ngr0GkxjoOUCltCtRSvi4V8tHNKmGJFC9BrXfQmhhZGdC6ZFHz6IsrL4Bl3SCbg/lD wR3YVDG9OrwMeBmQqi1h5+/lQ9wMJBTM06npVpIhNkHzLvzCep1REVJ9WGhgtWwJ223G nE1knS8qzjVbG2wrB4K8BPsywiChpxlkOSNR+Y/IoY0XwSOC2lRoP6/hE57QScM8sJoE sfVPClvCEnLtnO40IIga38/U62mHI370Twi3tJKjeGHGqr8XQZhnJOoIqAKjRVpdI5fw 1qEstst8NJPa5GlFCYe9WJAssiBJvhD0Y95ik4xCBrsv2DwFZz6yShR7pB7iFCS5sWPZ Gb3Q== X-Gm-Message-State: AOAM533CpcGtvKVBc60TiKEElPRe3XaKd8pE9eaeSN3zbFx5m8a3U72M 7x+uhIbGvlisdy9eX9P2rQOzR3Brhrg= X-Google-Smtp-Source: ABdhPJypMgKy85NjW6+QLY2Oer6eztBgk4q6QHeqFUJ43W9K2ZT5Yj6MGLkhiIPA+MSoDTywJOOpXA== X-Received: by 2002:a62:168d:: with SMTP id 135mr11172041pfw.239.1591397965466; Fri, 05 Jun 2020 15:59:25 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:24 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , bernard.iremonger@intel.com Date: Fri, 5 Jun 2020 15:58:06 -0700 Message-Id: <20200605225811.26342-22-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 21/26] doc: fix incorrect reference to master process X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Correct terminolgy here is primary process. This is a bug in original doc. Fixes: fc1f2750a3ec ("doc: programmers guide") Cc: bernard.iremonger@intel.com Signed-off-by: Stephen Hemminger --- doc/guides/prog_guide/thread_safety_dpdk_functions.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/guides/prog_guide/thread_safety_dpdk_functions.rst b/doc/guides/prog_guide/thread_safety_dpdk_functions.rst index 0f539db2b869..5618e25e47fb 100644 --- a/doc/guides/prog_guide/thread_safety_dpdk_functions.rst +++ b/doc/guides/prog_guide/thread_safety_dpdk_functions.rst @@ -61,8 +61,8 @@ rather than subsequently in the forwarding threads. However, the DPDK performs checks to ensure that libraries are only initialized once. If initialization is attempted more than once, an error is returned. -In the multi-process case, the configuration information of shared memory will only be initialized by the master process. -Thereafter, both master and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones. +In the multi-process case, the configuration information of shared memory will only be initialized by the primary process. +Thereafter, both primary and secondary processes can allocate/release any objects of memory that finally rely on rte_malloc or memzones. Interrupt Thread ---------------- From patchwork Fri Jun 5 22:58:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70910 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 153D5A0350; Sat, 6 Jun 2020 01:02:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E90711D674; Sat, 6 Jun 2020 00:59:31 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by dpdk.org (Postfix) with ESMTP id 896AF1D5F7 for ; Sat, 6 Jun 2020 00:59:28 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id jz3so3250819pjb.0 for ; Fri, 05 Jun 2020 15:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pO1HDRITrZAeYTl/iGFqxFoiU2gbe48mnlvpeZqUn5s=; b=gvAL215j+9v/2pnzCdRxrW5uul4rd+Fe21E+CwugxKuiCeZABW54h8jWgUy/TRzUuL a1jKAGHCfx0b6dJFR/UnFAPhicMFQauHouks6i24h6eD5Q69Lz2m1YoSXl8D3rQdKJfR hugykFSfcbY22m5U2K9CQOH7LvtKhvnqz1b1Q21gAKfWmllE4J8aoJARiCXyawxj9yko Ig5F6kvBGrJZgBZ4JEXBF8hjIHOKVRaYkQLAtnvV46SwI9F+clJEF3JUdkHdE6pya964 LMq2R7DrttY+A2APKCslAr9YzKHRp7fKfMkQxQegOp1lc6WuH54YqwwomUiStSutGLr5 rtBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pO1HDRITrZAeYTl/iGFqxFoiU2gbe48mnlvpeZqUn5s=; b=XJ8tvNu5xQ3xjs0yJaPBfwFh/s2PvLellj0UldUXMBDNJLHHR3zlrXL1T6VeY2nHSG W3KMe2PcysEOceFp5TYUU3/8XhmaGwslTsVgZ4EfkRYgpkwzRo0an8mE3oK9XHLrjDDK XTsiWa49h98IH2cNi4OYt9VzRNRn09d9cyYd+L9zc4PuFRAoHPDVPKvMZ9AoW88cO3eP naUMz6iUbpj4oFmfTBcugK/LXImJBBbYozXY5oc3Xzgms6fzxPtIilm1YlwR04gCUBmu RhmCSPa3wgBkFgj11r3ME1ErtEQ5HCHfp/zUXKsls+zPtmA5Nek3/H+UpDlRMTaR97Uy Je1g== X-Gm-Message-State: AOAM5326M0VJaBlmE7LUOPLYbSGlVrRTfsM8pj9qdnCaqnjPn1A3Be8o EZs6cWyag5RUptt6iXKSN8ngC7EJp0g= X-Google-Smtp-Source: ABdhPJxICwH+Wlpxm0Czlt6q6jf+PesIYbm16RHas3MCeJN2SAYOAK3AtDd7VvF/iZmiB1rtBtV/Ug== X-Received: by 2002:a17:90b:110d:: with SMTP id gi13mr5526537pjb.173.1591397967087; Fri, 05 Jun 2020 15:59:27 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:25 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:07 -0700 Message-Id: <20200605225811.26342-23-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 22/26] doc: update references to master/slave lcore in samples X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" New terms are initial and worker lcores. Signed-off-by: Stephen Hemminger --- doc/guides/sample_app_ug/hello_world.rst | 2 +- doc/guides/sample_app_ug/ioat.rst | 2 +- doc/guides/sample_app_ug/l3_forward_graph.rst | 6 +++--- doc/guides/sample_app_ug/multi_process.rst | 4 ++-- doc/guides/sample_app_ug/performance_thread.rst | 2 +- doc/guides/sample_app_ug/qos_scheduler.rst | 2 +- doc/guides/sample_app_ug/timer.rst | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/guides/sample_app_ug/hello_world.rst b/doc/guides/sample_app_ug/hello_world.rst index 46f997a7dce3..8fbcc1898215 100644 --- a/doc/guides/sample_app_ug/hello_world.rst +++ b/doc/guides/sample_app_ug/hello_world.rst @@ -75,7 +75,7 @@ The code that launches the function on each lcore is as follows: .. code-block:: c - /* call lcore_hello() on every slave lcore */ + /* call lcore_hello() on every worker lcore */ RTE_LCORE_FOREACH_SLAVE(lcore_id) { rte_eal_remote_launch(lcore_hello, NULL, lcore_id); diff --git a/doc/guides/sample_app_ug/ioat.rst b/doc/guides/sample_app_ug/ioat.rst index bab7654b8d4d..9fb2f4e30b71 100644 --- a/doc/guides/sample_app_ug/ioat.rst +++ b/doc/guides/sample_app_ug/ioat.rst @@ -208,7 +208,7 @@ After that each port application assigns resources needed. cfg.nb_lcores = rte_lcore_count() - 1; if (cfg.nb_lcores < 1) rte_exit(EXIT_FAILURE, - "There should be at least one slave lcore.\n"); + "There should be at least one worker lcore.\n"); ret = 0; diff --git a/doc/guides/sample_app_ug/l3_forward_graph.rst b/doc/guides/sample_app_ug/l3_forward_graph.rst index df50827bab86..4ac96fc0c2f7 100644 --- a/doc/guides/sample_app_ug/l3_forward_graph.rst +++ b/doc/guides/sample_app_ug/l3_forward_graph.rst @@ -22,7 +22,7 @@ Run-time path is main thing that differs from L3 forwarding sample application. Difference is that forwarding logic starting from Rx, followed by LPM lookup, TTL update and finally Tx is implemented inside graph nodes. These nodes are interconnected in graph framework. Application main loop needs to walk over -graph using ``rte_graph_walk()`` with graph objects created one per slave lcore. +graph using ``rte_graph_walk()`` with graph objects created one per worker lcore. The lookup method is as per implementation of ``ip4_lookup`` graph node. The ID of the output interface for the input packet is the next hop returned by @@ -265,7 +265,7 @@ headers will be provided run-time using ``rte_node_ip4_route_add()`` and Since currently ``ip4_lookup`` and ``ip4_rewrite`` nodes don't support lock-less mechanisms(RCU, etc) to add run-time forwarding data like route and rewrite data, forwarding data is added before packet processing loop is - launched on slave lcore. + launched on worker lcore. .. code-block:: c @@ -297,7 +297,7 @@ Packet Forwarding using Graph Walk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Now that all the device configurations are done, graph creations are done and -forwarding data is updated with nodes, slave lcores will be launched with graph +forwarding data is updated with nodes, worker lcores will be launched with graph main loop. Graph main loop is very simple in the sense that it needs to continuously call a non-blocking API ``rte_graph_walk()`` with it's lcore specific graph object that was already created. diff --git a/doc/guides/sample_app_ug/multi_process.rst b/doc/guides/sample_app_ug/multi_process.rst index f2a79a639763..017819a1a76f 100644 --- a/doc/guides/sample_app_ug/multi_process.rst +++ b/doc/guides/sample_app_ug/multi_process.rst @@ -66,7 +66,7 @@ The process should start successfully and display a command prompt as follows: EAL: check igb_uio module EAL: check module finished - EAL: Master core 0 is ready (tid=54e41820) + EAL: Initial core 0 is ready (tid=54e41820) EAL: Core 1 is ready (tid=53b32700) Starting core 1 @@ -92,7 +92,7 @@ At any stage, either process can be terminated using the quit command. .. code-block:: console - EAL: Master core 10 is ready (tid=b5f89820) EAL: Master core 8 is ready (tid=864a3820) + EAL: Initial core 10 is ready (tid=b5f89820) EAL: Master core 8 is ready (tid=864a3820) EAL: Core 11 is ready (tid=84ffe700) EAL: Core 9 is ready (tid=85995700) Starting core 11 Starting core 9 simple_mp > send hello_secondary simple_mp > core 9: Received 'hello_secondary' diff --git a/doc/guides/sample_app_ug/performance_thread.rst b/doc/guides/sample_app_ug/performance_thread.rst index b04d0ba444af..f694f3dfc998 100644 --- a/doc/guides/sample_app_ug/performance_thread.rst +++ b/doc/guides/sample_app_ug/performance_thread.rst @@ -1217,5 +1217,5 @@ Setting ``LTHREAD_DIAG`` also enables counting of statistics about cache and queue usage, and these statistics can be displayed by calling the function ``lthread_diag_stats_display()``. This function also performs a consistency check on the caches and queues. The function should only be called from the -master EAL thread after all slave threads have stopped and returned to the C +master EAL thread after all worker threads have stopped and returned to the C main program, otherwise the consistency check will fail. diff --git a/doc/guides/sample_app_ug/qos_scheduler.rst b/doc/guides/sample_app_ug/qos_scheduler.rst index b5010657a7d8..3258f08358d1 100644 --- a/doc/guides/sample_app_ug/qos_scheduler.rst +++ b/doc/guides/sample_app_ug/qos_scheduler.rst @@ -71,7 +71,7 @@ Optional application parameters include: In this mode, the application shows a command line that can be used for obtaining statistics while scheduling is taking place (see interactive mode below for more information). -* --mst n: Master core index (the default value is 1). +* --mst n: Initial core index (the default value is 1). * --rsz "A, B, C": Ring sizes: diff --git a/doc/guides/sample_app_ug/timer.rst b/doc/guides/sample_app_ug/timer.rst index 98d762d2388c..ff6f6581bd54 100644 --- a/doc/guides/sample_app_ug/timer.rst +++ b/doc/guides/sample_app_ug/timer.rst @@ -49,11 +49,11 @@ In addition to EAL initialization, the timer subsystem must be initialized, by c rte_timer_subsystem_init(); After timer creation (see the next paragraph), -the main loop is executed on each slave lcore using the well-known rte_eal_remote_launch() and also on the master. +the main loop is executed on each worker lcore using the well-known rte_eal_remote_launch() and also on the master. .. code-block:: c - /* call lcore_mainloop() on every slave lcore */ + /* call lcore_mainloop() on every worker lcore */ RTE_LCORE_FOREACH_SLAVE(lcore_id) { rte_eal_remote_launch(lcore_mainloop, NULL, lcore_id); From patchwork Fri Jun 5 22:58:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70911 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2347A04F1; Sat, 6 Jun 2020 01:02:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3DB101D678; Sat, 6 Jun 2020 00:59:33 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id 256311D54D for ; Sat, 6 Jun 2020 00:59:30 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id t16so4263775plo.7 for ; Fri, 05 Jun 2020 15:59:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iHp5I28Rhvkqv+EcqHvX8xXCowHRpC96695yJaSa/3M=; b=EdyXmF+2NTuhM/8vqqHYzsimaXE7m8+OQVjRNLY6WQccM+6SWfHrjCyPGS3vKZ6Iqc UMkb0WikzOKEexe20cmqtE6dTu7DviWppKhzaYOvuKxMnNtpJmj/VbOQVeMMzUW9Dd/Z WGD2uAogYzyROVp9gTmwSDX6Zkkcnsres8pUslG/VHl9sAoUAYRuQW1+ikhH0HVJrt5W BeKLj44aasr4XQe3eFdvrYiJ6emttil7/0li7NOCX0146LHL5UKZNFJl+SVkeooxcHA8 w5AGfDlD8Ew3re8KHaqM08rITVW5VhXuw2WWCLnfI5mVGpKJ5yqAhN5pSn6QC+c4GMrg 7sTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iHp5I28Rhvkqv+EcqHvX8xXCowHRpC96695yJaSa/3M=; b=kLIl2dQkqBs/p8pdcUVvlnHiXE5Z0Od6gesT0Lzc3RTakPAmC16L9wRrJxLOWIV6AR 2VtTa/5IT9YnRsO3woZTQI4xMMOdsJRkl0v81Hplk1Irc2VzjQiOAkDH9izvKla/NzEu MFz5v6mguMbN69KNMGNLW9Yuz6GkbGMh+kW23PTJp9C6dEyodYNcIzVWRJUGcOEt4e7S QdNdagpzcgLdLNi5SRK1TnRNhjlNbb39KB4NogocshRt3fD65UfcE7ySU2VMB2+GSxK0 +xTdl0EszA5+G3+hKoOHq1Lyhuk/2wxLHQTQ96W94/BewRHQQKKod6QY6UspCFNIjLfn WogA== X-Gm-Message-State: AOAM530bJQoisOd7nGhdUSQn4we/G0Mt3EBN3iksKvjKPbI0QAi+Omwj ftGCQEQWBe6733UDaJz3nhss41W5AEw= X-Google-Smtp-Source: ABdhPJx/1QpY/SoHhoVoLhtur+jHJ/GaUjfjh1douTfX1gMEb9hkF6blm7/pvldHSK0idXGB9qx2qg== X-Received: by 2002:a17:90a:20a3:: with SMTP id f32mr3584947pjg.171.1591397968666; Fri, 05 Jun 2020 15:59:28 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:27 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:08 -0700 Message-Id: <20200605225811.26342-24-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 23/26] doc: replace master lcore terminology X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" A few places in documentation refer to master lcore Signed-off-by: Stephen Hemminger --- doc/guides/howto/debug_troubleshoot.rst | 2 +- doc/guides/linux_gsg/eal_args.include.rst | 4 ++-- doc/guides/nics/bnxt.rst | 2 +- doc/guides/sample_app_ug/hello_world.rst | 2 +- doc/guides/sample_app_ug/timer.rst | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/guides/howto/debug_troubleshoot.rst b/doc/guides/howto/debug_troubleshoot.rst index cef016b2fef4..fdeaabe62206 100644 --- a/doc/guides/howto/debug_troubleshoot.rst +++ b/doc/guides/howto/debug_troubleshoot.rst @@ -311,7 +311,7 @@ Custom worker function :numref:`dtg_distributor_worker`. SERVICE. Check performance functions are mapped to run on the cores. * For high-performance execution logic ensure running it on correct NUMA - and non-master core. + and worker core. * Analyze run logic with ``rte_dump_stack``, ``rte_dump_registers`` and ``rte_memdump`` for more insights. diff --git a/doc/guides/linux_gsg/eal_args.include.rst b/doc/guides/linux_gsg/eal_args.include.rst index 0fe44579689b..ca7508fb423e 100644 --- a/doc/guides/linux_gsg/eal_args.include.rst +++ b/doc/guides/linux_gsg/eal_args.include.rst @@ -33,9 +33,9 @@ Lcore-related options At a given instance only one core option ``--lcores``, ``-l`` or ``-c`` can be used. -* ``--master-lcore `` +* ``--initial-lcore `` - Core ID that is used as master. + Core ID that is used as initial lcore. * ``-s `` diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst index ed650187e0d7..efe4461d7a32 100644 --- a/doc/guides/nics/bnxt.rst +++ b/doc/guides/nics/bnxt.rst @@ -403,7 +403,7 @@ The application enables multiple TX and RX queues when it is started. .. code-block:: console -   testpmd -l 1,3,5 --master-lcore 1 --txq=2 –rxq=2 --nb-cores=2 +   testpmd -l 1,3,5 --initial-lcore 1 --txq=2 –rxq=2 --nb-cores=2 **TSS** diff --git a/doc/guides/sample_app_ug/hello_world.rst b/doc/guides/sample_app_ug/hello_world.rst index 8fbcc1898215..fd101f7ca56d 100644 --- a/doc/guides/sample_app_ug/hello_world.rst +++ b/doc/guides/sample_app_ug/hello_world.rst @@ -77,7 +77,7 @@ The code that launches the function on each lcore is as follows: /* call lcore_hello() on every worker lcore */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(lcore_hello, NULL, lcore_id); } diff --git a/doc/guides/sample_app_ug/timer.rst b/doc/guides/sample_app_ug/timer.rst index ff6f6581bd54..14deafd84d03 100644 --- a/doc/guides/sample_app_ug/timer.rst +++ b/doc/guides/sample_app_ug/timer.rst @@ -55,7 +55,7 @@ the main loop is executed on each worker lcore using the well-known rte_eal_remo /* call lcore_mainloop() on every worker lcore */ - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_eal_remote_launch(lcore_mainloop, NULL, lcore_id); } From patchwork Fri Jun 5 22:58:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70912 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64660A0350; Sat, 6 Jun 2020 01:02:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5BFCA1D67D; Sat, 6 Jun 2020 00:59:34 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by dpdk.org (Postfix) with ESMTP id 5F4361D66B for ; Sat, 6 Jun 2020 00:59:31 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id d8so1087987plo.12 for ; Fri, 05 Jun 2020 15:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GqyF/EDeBkYxN82C6idi0dwMMhUpnwV1kwVUEHXnD1A=; b=RcJAZoPgj4ErNbkVDQFY8zGave3vEOjHNGa7d/jr5++qVFXN7E7eL86qKA23/nOoL9 L0xQIhsc6cPEbUlxYyNil5GoJ4I3VxpLcRS2ySglkqx9E0P3c/xnPwRcnBf/iwGsDndD ZbZH1pBPGpB6gQWyzG71gRiJhWWpKU0QseqG91v1WAWEGXjBHjqoRonFIaDh0/N+l6dk QNZfcUxJO90EdhAnf7LRbJHK/RyYPfB1r8vHqGqUH7pSpxKhFdcDEmdzUpjk00eodB3Y nkbuAXJWd5XPz/MOCUB76pofV3BXJNaH1CzGEp5Ox3HYWWJbX0SsiLcXrzbtfLfRrjEI VV3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GqyF/EDeBkYxN82C6idi0dwMMhUpnwV1kwVUEHXnD1A=; b=FxtUownMD2+UYtnK+2ypORtBbxacqSwGlG9tdzBjuhvcn5QA1zB4crCjbwI+bSdvtY H1JNo50YrsXzf0ognAKaL8ycKcGRxLUvyLMm8muWzSdwxgsK69DrEgDc1PpFAixj9ked MzoZP2z9chXMXL/a32f3zJ32Jkcy91OzNhI+1keanSLuqGjeiSZLeB2a4XPXDaAIgnto gUQ2J4sHoflc5Yc/kZIY9ZEPoGH/9S1BaZCdwbeBHPymfqCC6Ox90jfrkUXoazb5IXPq gAGW44E7b4Qj8mQ9wX3+BOmrvM+31PK36zXnwa9IvcAM9rLNhynhBccZa04Oy2A3NnSW B1XQ== X-Gm-Message-State: AOAM5303SvYE8vcDIHputwIXB/WsUC+B369IQOg/tXXee0fkX72c8lM2 yY2I3S45qBle4cEh4zQmv0f2/sk5wrw= X-Google-Smtp-Source: ABdhPJydnakrbxzKszcvEwHgBFocJmCt+6M7xwVmuQ7z5qJxTzyPkKYZk+rnzaS3Q7TkBnUZ8vQnfw== X-Received: by 2002:a17:90a:c717:: with SMTP id o23mr5409940pjt.195.1591397970207; Fri, 05 Jun 2020 15:59:30 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:29 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:09 -0700 Message-Id: <20200605225811.26342-25-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 24/26] app/pdump: replace references to master/slave lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial and worker lcore instead. Signed-off-by: Stephen Hemminger --- app/pdump/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index c38c53719e7d..1590a716a31d 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -947,7 +947,7 @@ dump_packets(void) rte_exit(EXIT_FAILURE, "failed to wait\n"); } - /* master core */ + /* initial core */ while (!quit_signal) ; } From patchwork Fri Jun 5 22:58:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70913 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C96CBA0350; Sat, 6 Jun 2020 01:03:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8BD141D682; Sat, 6 Jun 2020 00:59:35 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id C78741D678 for ; Sat, 6 Jun 2020 00:59:32 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id h185so5641563pfg.2 for ; Fri, 05 Jun 2020 15:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D1HSksb5+Y30u9QLEXj+JoT7XoCOw3zszWvq8UyvLTA=; b=waSuo/NXZIvy6KZaB5XQ0XQpVO4qZ6wA1CAhRb6NKqqw6YMtZ+tunDztUQyPYTLfYK 7TFvcjg0fWiM5Wc7lU+zPsL36lnHns4YuJIQ/ET9jAbN8eTfDW/1tEyMIsR3o4htFYyI so574VDmwJYf/CIoj3eNxuI7tpiuF1IS1isi4kGYKGzbAn83aIfI1wbHJTnCBE1MbKr5 4g3eNpxspu8cfnGWhuPnQS+EUDxEwJc9OBeqvpPzT0kjAMigIRClQZt3D4+p7Hn8yePy CsGh/a6NGTeKlTrc8aFWa19B3vLGwPtOPC9adrLTnkSQt3HIznuRF2MQlhiw4pGBDVru aX2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D1HSksb5+Y30u9QLEXj+JoT7XoCOw3zszWvq8UyvLTA=; b=gY3uaxPo477NnZfT86QWKw90/tUJuQrtQ7z7/Oq+PiyBj/BAhYhGsWbN7xAE2LRQsM hoB8x8C4rzYybHbRXbL/GzYzBWy2Niv6yeJJmUW/J6Nc05Q9DQCSbzJ+1aS1BXC880/v DhcaiYcvzf05hmaVwI+to0nWGJ7+1d02PHoE4ebwW7ZYmvzHsMO9OOwVyzDuN/ftNJ5O dEHbDozTysIzMYxAsOCrfxWhGFtsfBO+V6YHx2U3QueU/njE1XCTAh08XqYSYhG4u/op n7BY8fSr6fTwO7xS1g6PEHVCWvbeDHMAQh5zwPotFwzhcxJLaTcTrHzqB6I8KjLx0Y2W mTng== X-Gm-Message-State: AOAM533WSzcq2VL3LjYnfoAwcHiYnS5IV56PcgP4UVeuWxu6PD2dsQTO yV/tS+qChrJmmpLY2KwiJbWNOBr3ITA= X-Google-Smtp-Source: ABdhPJwZ2vtD0lEymO2ktpBCsEtWBhG5R85qjxbNrzdbVXtPSeiZv/P+AOxGvUFaHN+iaGjeLx4nnw== X-Received: by 2002:a62:5285:: with SMTP id g127mr11772748pfb.222.1591397971452; Fri, 05 Jun 2020 15:59:31 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:30 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:10 -0700 Message-Id: <20200605225811.26342-26-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 25/26] app/test-XXX: replace reference to master/slave X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use new terminology for lcore's Signed-off-by: Stephen Hemminger --- app/test-acl/main.c | 2 +- app/test-bbdev/test_bbdev_perf.c | 16 ++++++++-------- app/test-compress-perf/main.c | 8 ++++---- app/test-crypto-perf/main.c | 14 +++++++------- app/test-pipeline/main.c | 4 ++-- app/test-sad/main.c | 4 ++-- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/app/test-acl/main.c b/app/test-acl/main.c index 0a5dfb621d5e..72ff26674dac 100644 --- a/app/test-acl/main.c +++ b/app/test-acl/main.c @@ -1085,7 +1085,7 @@ main(int argc, char **argv) if (config.trace_file != NULL) tracef_init(); - RTE_LCORE_FOREACH_SLAVE(lcore) + RTE_LCORE_FOREACH_WORKER(lcore) rte_eal_remote_launch(search_ip5tuples, NULL, lcore); search_ip5tuples(NULL); diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 45c0d62acabc..fecd20f72e8a 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -3651,14 +3651,14 @@ bler_test(struct active_device *ad, rte_atomic16_set(&op_params->sync, SYNC_WAIT); - /* Master core is set at first entry */ + /* Initial core is set at first entry */ t_params[0].dev_id = ad->dev_id; t_params[0].lcore_id = rte_lcore_id(); t_params[0].op_params = op_params; t_params[0].queue_id = ad->queue_ids[used_cores++]; t_params[0].iter_count = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (used_cores >= num_lcores) break; @@ -3675,7 +3675,7 @@ bler_test(struct active_device *ad, rte_atomic16_set(&op_params->sync, SYNC_START); ret = bler_function(&t_params[0]); - /* Master core is always used */ + /* Initial core is always used */ for (used_cores = 1; used_cores < num_lcores; used_cores++) ret |= rte_eal_wait_lcore(t_params[used_cores].lcore_id); @@ -3769,14 +3769,14 @@ throughput_test(struct active_device *ad, rte_atomic16_set(&op_params->sync, SYNC_WAIT); - /* Master core is set at first entry */ + /* Initial core is set at first entry */ t_params[0].dev_id = ad->dev_id; t_params[0].lcore_id = rte_lcore_id(); t_params[0].op_params = op_params; t_params[0].queue_id = ad->queue_ids[used_cores++]; t_params[0].iter_count = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (used_cores >= num_lcores) break; @@ -3793,7 +3793,7 @@ throughput_test(struct active_device *ad, rte_atomic16_set(&op_params->sync, SYNC_START); ret = throughput_function(&t_params[0]); - /* Master core is always used */ + /* Initial core is always used */ for (used_cores = 1; used_cores < num_lcores; used_cores++) ret |= rte_eal_wait_lcore(t_params[used_cores].lcore_id); @@ -3817,7 +3817,7 @@ throughput_test(struct active_device *ad, /* In interrupt TC we need to wait for the interrupt callback to deqeue * all pending operations. Skip waiting for queues which reported an * error using processing_status variable. - * Wait for master lcore operations. + * Wait for initial lcore operations. */ tp = &t_params[0]; while ((rte_atomic16_read(&tp->nb_dequeued) < @@ -3830,7 +3830,7 @@ throughput_test(struct active_device *ad, tp->mbps /= TEST_REPETITIONS; ret |= (int)rte_atomic16_read(&tp->processing_status); - /* Wait for slave lcores operations */ + /* Wait for worker lcores operations */ for (used_cores = 1; used_cores < num_lcores; used_cores++) { tp = &t_params[used_cores]; diff --git a/app/test-compress-perf/main.c b/app/test-compress-perf/main.c index ed21605d89c2..cc9951a9b107 100644 --- a/app/test-compress-perf/main.c +++ b/app/test-compress-perf/main.c @@ -389,7 +389,7 @@ main(int argc, char **argv) i = 0; uint8_t qp_id = 0, cdev_index = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -413,7 +413,7 @@ main(int argc, char **argv) while (test_data->level <= test_data->level_lst.max) { i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -424,7 +424,7 @@ main(int argc, char **argv) i++; } i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -449,7 +449,7 @@ main(int argc, char **argv) case ST_DURING_TEST: i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index 7bb286ccbe6c..9cab779e164c 100644 --- a/app/test-crypto-perf/main.c +++ b/app/test-crypto-perf/main.c @@ -590,7 +590,7 @@ main(int argc, char **argv) i = 0; uint8_t qp_id = 0, cdev_index = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -654,7 +654,7 @@ main(int argc, char **argv) distribution_total[buffer_size_count - 1]; i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -664,7 +664,7 @@ main(int argc, char **argv) i++; } i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -684,7 +684,7 @@ main(int argc, char **argv) while (opts.test_buffer_size <= opts.max_buffer_size) { i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -694,7 +694,7 @@ main(int argc, char **argv) i++; } i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -718,7 +718,7 @@ main(int argc, char **argv) } i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; @@ -738,7 +738,7 @@ main(int argc, char **argv) err: i = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (i == total_nb_qps) break; diff --git a/app/test-pipeline/main.c b/app/test-pipeline/main.c index 7f0d6d3f1862..a54c32a32d17 100644 --- a/app/test-pipeline/main.c +++ b/app/test-pipeline/main.c @@ -66,8 +66,8 @@ main(int argc, char **argv) app_init(); /* Launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(app_lcore_main_loop, NULL, CALL_MASTER); - RTE_LCORE_FOREACH_SLAVE(lcore) { + rte_eal_mp_remote_launch(app_lcore_main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore) { if (rte_eal_wait_lcore(lcore) < 0) return -1; } diff --git a/app/test-sad/main.c b/app/test-sad/main.c index b01e84c570bb..38cd40ee87cf 100644 --- a/app/test-sad/main.c +++ b/app/test-sad/main.c @@ -657,11 +657,11 @@ main(int argc, char **argv) add_rules(sad, 10); if (config.parallel_lookup) - rte_eal_mp_remote_launch(lookup, sad, SKIP_MASTER); + rte_eal_mp_remote_launch(lookup, sad, SKIP_INITIAL); lookup(sad); if (config.parallel_lookup) - RTE_LCORE_FOREACH_SLAVE(lcore_id) + RTE_LCORE_FOREACH_WORKER(lcore_id) if (rte_eal_wait_lcore(lcore_id) < 0) return -1; From patchwork Fri Jun 5 22:58:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70914 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 447D4A0350; Sat, 6 Jun 2020 01:03:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 219521D68E; Sat, 6 Jun 2020 00:59:37 +0200 (CEST) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by dpdk.org (Postfix) with ESMTP id CC59C1D680 for ; Sat, 6 Jun 2020 00:59:34 +0200 (CEST) Received: by mail-pl1-f179.google.com with SMTP id t7so4276674plr.0 for ; Fri, 05 Jun 2020 15:59:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HVxhS9CDT6vcCZ3vdHAapIoebNGTFRveRuUj4bTdETQ=; b=ckFE3vp3LQq5cI8PiqTw92FUiPACZEHMPCGTw/FMtBOaxyO+XwFy7clExS3lcol+5/ Ra1jDriKutBeXcU95z1gsiclT2gfHInjCJ44NyGd1l0W4KTcWGqYIqXBxqQ6TpXD5SU9 JbWwLMnovBywT3pYqsdwqII02zDS/f8Jmvj7HJUlGCKrQG+H0/dmqrGfKdp6WjaTnVfG KF7h5Wl1Z59jmNBCPQ7NPbjKueEu/JW+XGkkKlwpuM04yVzk3iw8NzSwB1N1ReBGY4BK Wr/R30v55GxVEn+NeIAyjICNCTA9jQVWNslP7G35dN94UJ20oZwcQgrot+BlKhPakdte FOYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HVxhS9CDT6vcCZ3vdHAapIoebNGTFRveRuUj4bTdETQ=; b=PHsx6HquvrRpzQp1xlfiw/fYozzVK1W32M1CXaDWszkFup92akMbzN0qUy53myOgpr CqfFvtmWaGK/jKTp/4VQyCZKn3zZnwXIAG+g6kSuBKZeHHrP9txsDvj32KuYEQPWEKdq /VeTUA9WTO0UWfZsDyiV1LVSjyGpa11JJqfmYTxfIF5e2MiHKLc11sBgTxQ5G51MLV5K 5+BGb4IDK902iz+JS2WARLHnHI/WU9v3aDeFrAC3nvbH8M3P1Pq696NC01XQN4LUKG10 NQ7Z8A2pRU0dLCa87kj+ssOmE3Qam6JmoOsaplwiMLIjWgEa6iMFuKi1QRu1k/K8ec3k Ymdg== X-Gm-Message-State: AOAM532waVRCNDkbsZoEgtYuZDk51aqRCmkjTuQEZM0Q0FycOXzDV7Q/ 2lNZ+sMLTD0kUXTyg7NEdcLqZvNsp8Y= X-Google-Smtp-Source: ABdhPJy4SmwFC7vMHZe4LxAYiqrtgCd1kCuDFIaFkqoK+ugEf7VfH5poDQYv98W+eGHShmZh906kEg== X-Received: by 2002:a17:902:9007:: with SMTP id a7mr12448623plp.194.1591397972834; Fri, 05 Jun 2020 15:59:32 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:31 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:58:11 -0700 Message-Id: <20200605225811.26342-27-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 26/26] eal: mark old naming as deprecated X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use of old RTE_LCORE_FOREACH_SLAVE and rte_get_master_lcore_id() are marked as deprecated. All uses of these in DPDK itself is gone. This will cause warnings for applications still using them. Signed-off-by: Stephen Hemminger --- lib/librte_eal/include/rte_launch.h | 4 ++-- lib/librte_eal/include/rte_lcore.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/include/rte_launch.h b/lib/librte_eal/include/rte_launch.h index 9b68685d99d4..8d58ca5302a7 100644 --- a/lib/librte_eal/include/rte_launch.h +++ b/lib/librte_eal/include/rte_launch.h @@ -76,8 +76,8 @@ enum rte_rmt_call_initial_t { /** * Deprecated backward compatiable definitions */ -#define SKIP_MASTER SKIP_INITIAL -#define CALL_MASTER CALL_INITIAL +#define SKIP_MASTER _Pragma("GCC warning \"'SKIP_MASTER' is deprecated\"") SKIP_INITIAL +#define CALL_MASTER _Pragma("GCC warning \"'CALL_MASTER' is deprecated\"") CALL_INITIAL /** * Launch a function on all lcores. diff --git a/lib/librte_eal/include/rte_lcore.h b/lib/librte_eal/include/rte_lcore.h index 069cb1f427b9..eaa7c0f0b67c 100644 --- a/lib/librte_eal/include/rte_lcore.h +++ b/lib/librte_eal/include/rte_lcore.h @@ -67,6 +67,7 @@ unsigned int rte_get_initial_lcore(void); * @return * the id of the initial lcore */ +__rte_deprecated unsigned int rte_get_master_lcore(void); /** @@ -216,7 +217,8 @@ unsigned int rte_get_next_lcore(unsigned int i, int skip_initial, int wrap); /** * Backward compatibility */ -#define RTE_LCORE_FOREACH_SLAVE(x) \ +#define RTE_LCORE_FOREACH_SLAVE(x) \ + _Pragma("GCC warning \"'RTE_LCORE_FOREACH_SLAVE' macro is deprecated\"") \ RTE_LCORE_FOREACH_WORKER(x)