From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH v3 01/27] eal: rename terms used for DPDK lcores
Date: Wed, 1 Jul 2020 12:46:24 -0700 [thread overview]
Message-ID: <20200701194650.10705-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20200701194650.10705-1-stephen@networkplumber.org>
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 <stephen@networkplumber.org>
---
doc/guides/nics/memif.rst | 4 +-
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 | 31 +++++++----
lib/librte_eal/freebsd/eal_thread.c | 34 ++++++------
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 | 10 ++--
lib/librte_eal/linux/eal_thread.c | 34 ++++++------
lib/librte_eal/rte_eal_version.map | 1 +
lib/librte_eal/windows/eal.c | 18 ++++---
lib/librte_eal/windows/eal_thread.c | 32 +++++------
21 files changed, 230 insertions(+), 186 deletions(-)
diff --git a/doc/guides/nics/memif.rst b/doc/guides/nics/memif.rst
index ddeebed25ccd..9c67d7141cbe 100644
--- a/doc/guides/nics/memif.rst
+++ b/doc/guides/nics/memif.rst
@@ -106,13 +106,13 @@ region n (no-zero-copy):
+-----------------------+-------------------------------------------------------------------------+
| Rings | Buffers |
+-----------+-----------+-----------------+---+---------------------------------------------------+
-| S2M rings | M2S rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(s2m + m2s))-1 |
+| S2M rings | M2S rings | packet buffer 0 | . | pb ((1 << pmd->run.log2_ring_size)*(w2i + i2w))-1 |
+-----------+-----------+-----------------+---+---------------------------------------------------+
S2M OR M2S Rings:
+--------+--------+-----------------------+
-| ring 0 | ring 1 | ring num_s2m_rings - 1|
+| ring 0 | ring 1 | ring num_w2i_rings - 1|
+--------+--------+-----------------------+
ring 0:
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 24b223ebfd0f..48a82cce9ad7 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -79,7 +79,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 },
@@ -142,7 +142,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;
@@ -485,12 +485,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;
}
@@ -658,12 +658,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;
}
@@ -746,25 +746,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;
}
@@ -1502,10 +1502,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;
@@ -1673,9 +1673,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));
}
}
@@ -1707,12 +1707,12 @@ eal_adjust_config(struct internal_config *internal_cfg)
if (internal_conf->process_type == RTE_PROC_AUTO)
internal_conf->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);
@@ -1732,8 +1732,8 @@ eal_check_common_options(struct internal_config *internal_cfg)
const struct internal_config *internal_conf =
eal_get_internal_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;
}
@@ -1831,7 +1831,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 46bcae930590..9ef057d9b0f3 100644
--- a/lib/librte_eal/common/eal_private.h
+++ b/lib/librte_eal/common/eal_private.h
@@ -20,8 +20,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 */
@@ -42,7 +42,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..35301d852bc2 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_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 8c75cba79a71..c7cc79ce65c3 100644
--- a/lib/librte_eal/freebsd/eal.c
+++ b/lib/librte_eal/freebsd/eal.c
@@ -622,10 +622,14 @@ eal_check_mem_on_local_socket(void)
int socket_id;
const struct rte_config *config = rte_eal_get_configuration();
+<<<<<<< HEAD
socket_id = rte_lcore_to_socket_id(config->master_lcore);
+=======
+ socket_id = rte_lcore_to_socket_id(rte_config.initial_lcore);
+>>>>>>> 28604a3e5a3a... eal: rename terms used for DPDK lcores
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");
}
@@ -845,23 +849,32 @@ rte_eal_init(int argc, char **argv)
eal_check_mem_on_local_socket();
- eal_thread_init_master(config->master_lcore);
+<<<<<<< HEAD
+ eal_thread_initial_lcore(config->master_lcore);
ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
config->master_lcore, thread_id, cpuset,
+=======
+ eal_thread_set_initial_lcore(rte_config.initial_lcore);
+
+ ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
+
+ RTE_LOG(DEBUG, EAL, "Initial lcore %u is ready (tid=%p;cpuset=[%s%s])\n",
+ rte_config.initial_lcore, thread_id, cpuset,
+>>>>>>> 28604a3e5a3a... eal: rename terms used for DPDK lcores
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;
@@ -874,15 +887,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..5fff09c017c1 100644
--- a/lib/librte_eal/freebsd/eal_thread.c
+++ b/lib/librte_eal/freebsd/eal_thread.c
@@ -30,35 +30,35 @@ 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 i2w = lcore_config[worker_id].pipe_init2worker[1];
+ int w2i = 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;
while (n == 0 || (n < 0 && errno == EINTR))
- n = write(m2s, &c, 1);
+ n = write(i2w, &c, 1);
if (n < 0)
rte_panic("cannot write on configuration pipe\n");
/* wait ack */
do {
- n = read(s2m, &c, 1);
+ n = read(w2i, &c, 1);
} while (n < 0 && errno == EINTR);
if (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;
@@ -101,21 +101,21 @@ eal_thread_loop(__rte_unused void *arg)
int n, ret;
unsigned lcore_id;
pthread_t thread_id;
- int m2s, s2m;
+ int i2w, w2i;
char cpuset[RTE_CPU_AFFINITY_STR_LEN];
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];
+ i2w = lcore_config[lcore_id].pipe_init2worker[0];
+ w2i = lcore_config[lcore_id].pipe_worker2init[1];
/* set the lcore ID in per-lcore memory area */
RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -138,7 +138,7 @@ eal_thread_loop(__rte_unused void *arg)
/* wait command */
do {
- n = read(m2s, &c, 1);
+ n = read(i2w, &c, 1);
} while (n < 0 && errno == EINTR);
if (n <= 0)
@@ -149,7 +149,7 @@ eal_thread_loop(__rte_unused void *arg)
/* send ack */
n = 0;
while (n == 0 || (n < 0 && errno == EINTR))
- n = write(s2m, &c, 1);
+ n = write(w2i, &c, 1);
if (n < 0)
rte_panic("cannot write on configuration pipe\n");
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 bcfef0cfaa62..f2b47184d72f 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); \
i<RTE_MAX_LCORE; \
i = rte_get_next_lcore(i, 1, 0))
+/**
+ * Backward compatibility
+ */
+#define RTE_LCORE_FOREACH_SLAVE(x) \
+ RTE_LCORE_FOREACH_WORKER(x)
+
+
/**
* Set core affinity of the current thread.
* Support both EAL and non-EAL thread and update TLS.
diff --git a/lib/librte_eal/linux/eal.c b/lib/librte_eal/linux/eal.c
index 3b56d14da1d4..5289b99d1959 100644
--- a/lib/librte_eal/linux/eal.c
+++ b/lib/librte_eal/linux/eal.c
@@ -855,10 +855,10 @@ eal_check_mem_on_local_socket(void)
int socket_id;
const struct rte_config *config = rte_eal_get_configuration();
- socket_id = rte_lcore_to_socket_id(config->master_lcore);
+ socket_id = rte_lcore_to_socket_id(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");
}
static int
@@ -1184,23 +1184,23 @@ rte_eal_init(int argc, char **argv)
eal_check_mem_on_local_socket();
- eal_thread_init_master(config->master_lcore);
+ eal_thread_initial_lcore(config->initial_lcore);
ret = eal_thread_dump_affinity(cpuset, sizeof(cpuset));
- RTE_LOG(DEBUG, EAL, "Master lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
- config->master_lcore, (uintptr_t)thread_id, cpuset,
+ RTE_LOG(DEBUG, EAL, "Initial lcore %u is ready (tid=%zx;cpuset=[%s%s])\n",
+ config->initial_lcore, (uintptr_t)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;
@@ -1213,7 +1213,7 @@ 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);
ret = rte_thread_setname(lcore_config[i].thread_id,
thread_name);
if (ret != 0)
@@ -1222,10 +1222,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();
/* initialize services so vdevs register service during bus_probe. */
diff --git a/lib/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c
index 89725291b0ce..1cbb8aab6016 100644
--- a/lib/librte_eal/linux/eal_memory.c
+++ b/lib/librte_eal/linux/eal_memory.c
@@ -1737,7 +1737,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
@@ -1751,7 +1751,7 @@ memseg_primary_init_32(void)
for (i = 0; i < rte_socket_count(); i++) {
int hp_sizes = (int) internal_conf->num_hugepage_sizes;
uint64_t max_socket_mem, cur_socket_mem;
- unsigned int master_lcore_socket;
+ unsigned int initial_lcore_socket;
struct rte_config *cfg = rte_eal_get_configuration();
bool skip;
@@ -1767,10 +1767,10 @@ memseg_primary_init_32(void)
skip = active_sockets != 0 &&
internal_conf->socket_mem[socket_id] == 0;
/* ...or if we didn't specifically request memory on *any*
- * socket, and this is not master lcore
+ * socket, and this is not 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..324e9a73060b 100644
--- a/lib/librte_eal/linux/eal_thread.c
+++ b/lib/librte_eal/linux/eal_thread.c
@@ -30,35 +30,35 @@ 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 i2w = lcore_config[worker_id].pipe_init2worker[1];
+ int w2i = 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;
while (n == 0 || (n < 0 && errno == EINTR))
- n = write(m2s, &c, 1);
+ n = write(i2w, &c, 1);
if (n < 0)
rte_panic("cannot write on configuration pipe\n");
/* wait ack */
do {
- n = read(s2m, &c, 1);
+ n = read(w2i, &c, 1);
} while (n < 0 && errno == EINTR);
if (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_initial_lcore(unsigned lcore_id)
{
/* set the lcore ID in per-lcore memory area */
RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -101,21 +101,21 @@ eal_thread_loop(__rte_unused void *arg)
int n, ret;
unsigned lcore_id;
pthread_t thread_id;
- int m2s, s2m;
+ int i2w, w2i;
char cpuset[RTE_CPU_AFFINITY_STR_LEN];
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];
+ i2w = lcore_config[lcore_id].pipe_init2worker[0];
+ w2i = lcore_config[lcore_id].pipe_worker2init[1];
/* set the lcore ID in per-lcore memory area */
RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -138,7 +138,7 @@ eal_thread_loop(__rte_unused void *arg)
/* wait command */
do {
- n = read(m2s, &c, 1);
+ n = read(i2w, &c, 1);
} while (n < 0 && errno == EINTR);
if (n <= 0)
@@ -149,7 +149,7 @@ eal_thread_loop(__rte_unused void *arg)
/* send ack */
n = 0;
while (n == 0 || (n < 0 && errno == EINTR))
- n = write(s2m, &c, 1);
+ n = write(w2i, &c, 1);
if (n < 0)
rte_panic("cannot write on configuration pipe\n");
diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map
index 196eef5afab7..fb8f8a32beaf 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 eb10b4ef9689..f3ff4f921bcc 100644
--- a/lib/librte_eal/windows/eal.c
+++ b/lib/librte_eal/windows/eal.c
@@ -273,6 +273,7 @@ rte_eal_init(int argc, char **argv)
if (fctret < 0)
exit(1);
+<<<<<<< HEAD
/* Prevent creation of shared memory files. */
if (internal_conf->in_memory == 0) {
RTE_LOG(WARNING, EAL, "Multi-process support is requested, "
@@ -333,7 +334,7 @@ rte_eal_init(int argc, char **argv)
return -1;
}
- eal_thread_init_master(config->master_lcore);
+ eal_thread_initial_lcore(config->master_lcore);
bscan = rte_bus_scan();
if (bscan < 0) {
@@ -341,17 +342,20 @@ rte_eal_init(int argc, char **argv)
rte_errno = ENODEV;
return -1;
}
+=======
+ eal_thread_set_initial_lcore(rte_config.initial_lcore);
+>>>>>>> 28604a3e5a3a... eal: rename terms used for DPDK lcores
- 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");
@@ -363,10 +367,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 3dd56519c99a..b3a8a47be313 100644
--- a/lib/librte_eal/windows/eal_thread.c
+++ b/lib/librte_eal/windows/eal_thread.c
@@ -21,34 +21,34 @@ 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 i2w = lcore_config[worker_id].pipe_init2worker[1];
+ int w2i = 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;
while (n == 0 || (n < 0 && errno == EINTR))
- n = _write(m2s, &c, 1);
+ n = _write(i2w, &c, 1);
if (n < 0)
rte_panic("cannot write on configuration pipe\n");
/* wait ack */
do {
- n = _read(s2m, &c, 1);
+ n = _read(w2i, &c, 1);
} while (n < 0 && errno == EINTR);
if (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;
@@ -72,21 +72,21 @@ eal_thread_loop(void *arg __rte_unused)
int n, ret;
unsigned int lcore_id;
pthread_t thread_id;
- int m2s, s2m;
+ int i2w, w2i;
char cpuset[RTE_CPU_AFFINITY_STR_LEN];
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];
+ i2w = lcore_config[lcore_id].pipe_init2worker[0];
+ w2i = lcore_config[lcore_id].pipe_worker2init[1];
/* set the lcore ID in per-lcore memory area */
RTE_PER_LCORE(_lcore_id) = lcore_id;
@@ -100,7 +100,7 @@ eal_thread_loop(void *arg __rte_unused)
/* wait command */
do {
- n = _read(m2s, &c, 1);
+ n = _read(i2w, &c, 1);
} while (n < 0 && errno == EINTR);
if (n <= 0)
@@ -111,7 +111,7 @@ eal_thread_loop(void *arg __rte_unused)
/* send ack */
n = 0;
while (n == 0 || (n < 0 && errno == EINTR))
- n = _write(s2m, &c, 1);
+ n = _write(w2i, &c, 1);
if (n < 0)
rte_panic("cannot write on configuration pipe\n");
--
2.26.2
next prev parent reply other threads:[~2020-07-01 19:47 UTC|newest]
Thread overview: 186+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 21:02 [dpdk-dev] [RFC] doc: change to diverse and inclusive language Stephen Hemminger
2020-06-05 1:04 ` [dpdk-dev] [RFC] replace master/slave with primary/secondary Stephen Hemminger
2020-06-05 10:43 ` Gaëtan Rivet
2020-06-05 11:14 ` Ananyev, Konstantin
2020-06-05 16:33 ` Stephen Hemminger
2020-06-05 17:10 ` Wiles, Keith
2020-06-05 17:45 ` Stephen Hemminger
2020-06-05 19:23 ` Wiles, Keith
2020-06-05 19:53 ` Stephen Hemminger
2020-06-05 20:09 ` Wiles, Keith
2020-06-05 11:28 ` Bruce Richardson
2020-06-05 12:15 ` Gaëtan Rivet
2020-06-05 15:27 ` Stephen Hemminger
2020-06-05 7:54 ` [dpdk-dev] [RFC] doc: change to diverse and inclusive language Luca Boccassi
2020-06-05 8:35 ` Bruce Richardson
2020-06-05 21:40 ` Aaron Conole
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 00/26] Change references to master/slave to Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 01/26] eal: rename terms used for DPDK lcores Stephen Hemminger
2020-06-29 17:04 ` Bruce Richardson
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 02/26] kni: fix reference to master/slave process Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 03/26] bbdev: rename master to initial lcore Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 04/26] librte_power: change reference to rte_master_lcore Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 05/26] drivers: replace master/slave terminolgy Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 06/26] examples/distrutor: rename master to initial Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 07/26] examples/bond: replace references to master lcore Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 08/26] examples/ethtool-app: replace references to slave with worker Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 09/26] examples/ip_pipeline: replace references to master_lcore Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 10/26] examples/qos_{meter/sched}: replace references to master lcore Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 11/26] examples/l3fwd: " Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 12/26] examples/l2fwd: " Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 13/26] examples/multi_process: " Stephen Hemminger
2020-06-05 22:57 ` [dpdk-dev] [RFC v2 14/26] examples/performance-thread: replace reference " Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 15/26] examples/ptpclient: replace references " Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 16/26] examples/ipcsec-secgw: " Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 17/26] examples: replace reference " Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 18/26] app/test-pmd: change references to master/slave Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 19/26] test-eventdev: replace references to slave with worker lcores Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 20/26] app/test: repalce refernces to master/slave Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 21/26] doc: fix incorrect reference to master process Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 22/26] doc: update references to master/slave lcore in samples Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 23/26] doc: replace master lcore terminology Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 24/26] app/pdump: replace references to master/slave lcore Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 25/26] app/test-XXX: replace reference to master/slave Stephen Hemminger
2020-06-05 22:58 ` [dpdk-dev] [RFC v2 26/26] eal: mark old naming as deprecated Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 00/27] Replace references to master and slave Stephen Hemminger
2020-07-01 19:46 ` Stephen Hemminger [this message]
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 02/27] kni: fix reference to master/slave process Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 03/27] bbdev: rename master to initial lcore Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 04/27] librte_power: change reference to rte_master_lcore Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 05/27] drivers: replace master/slave terminolgy Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 06/27] examples/distrutor: rename master to initial Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 07/27] examples/bond: replace references to master lcore Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 08/27] examples/ethtool-app: replace references to slave with worker Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 09/27] examples/ip_pipeline: replace references to master_lcore Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 10/27] examples/qos_{meter/sched}: replace references to master lcore Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 11/27] examples/l3fwd: " Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 12/27] examples/l2fwd: " Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 13/27] examples/multi_process: " Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 14/27] examples/performance-thread: replace reference " Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 15/27] examples/ptpclient: replace references " Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 16/27] examples/ipcsec-secgw: " Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 17/27] examples: replace reference " Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 18/27] app/test-pmd: change references to master/slave Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 19/27] test-eventdev: replace references to slave with worker lcores Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 20/27] app/test: replace refernces to master/slave Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 21/27] doc: fix incorrect reference to master process Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 22/27] doc: update references to master/slave lcore in documentation Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 23/27] app/pdump: replace references to master/slave lcore Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 24/27] app/test-XXX: replace reference to master/slave Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 25/27] eal: mark old naming as deprecated Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 26/27] memif: replace master/slave with server/client Stephen Hemminger
2020-07-01 19:46 ` [dpdk-dev] [PATCH v3 27/27] vhost: rename SLAVE to CLIENT Stephen Hemminger
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 00/27] Replace references to master and slave Stephen Hemminger
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 01/27] eal: rename terms used for DPDK lcores Stephen Hemminger
2020-07-17 14:07 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 02/27] kni: fix reference to master/slave process Stephen Hemminger
2020-07-13 12:23 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 03/27] bbdev: rename master to initial lcore Stephen Hemminger
2020-07-13 12:26 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 04/27] librte_power: change reference to rte_master_lcore Stephen Hemminger
2020-07-13 12:37 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 05/27] drivers: replace master/slave terminology Stephen Hemminger
2020-07-13 12:52 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 06/27] examples/distributor: rename master to initial Stephen Hemminger
2020-07-13 12:53 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 07/27] examples/bond: replace references to master lcore Stephen Hemminger
2020-07-13 12:56 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 08/27] examples/ethtool-app: replace references to slave with worker Stephen Hemminger
2020-07-13 12:59 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 09/27] examples/ip_pipeline: replace references to master_lcore Stephen Hemminger
2020-07-13 13:01 ` Burakov, Anatoly
2020-09-10 9:52 ` Dumitrescu, Cristian
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 10/27] examples/qos_{meter/sched}: replace references to master lcore Stephen Hemminger
2020-07-15 11:31 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 11/27] examples/l3fwd: " Stephen Hemminger
2020-07-15 11:46 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 12/27] examples/l2fwd: " Stephen Hemminger
2020-07-15 11:51 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 13/27] examples/multi_process: " Stephen Hemminger
2020-07-15 11:53 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 14/27] examples/performance-thread: replace reference " Stephen Hemminger
2020-07-15 12:09 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 15/27] examples/ptpclient: replace references " Stephen Hemminger
2020-07-15 12:24 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 16/27] examples/ipcsec-secgw: " Stephen Hemminger
2020-07-15 12:27 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 17/27] examples: replace reference " Stephen Hemminger
2020-07-15 12:33 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 18/27] app/test-pmd: change references to master/slave Stephen Hemminger
2020-07-15 12:39 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 19/27] test-eventdev: replace references to slave with worker lcores Stephen Hemminger
2020-07-15 12:41 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 20/27] app/test: replace refernces to master/slave Stephen Hemminger
2020-07-15 13:23 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 21/27] doc: fix incorrect reference to master process Stephen Hemminger
2020-07-15 13:24 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 22/27] doc: update references to master/slave lcore in documentation Stephen Hemminger
2020-07-17 14:01 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 23/27] app/pdump: replace references to master/slave lcore Stephen Hemminger
2020-07-15 13:25 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 24/27] app/test-XXX: replace reference to master/slave Stephen Hemminger
2020-07-17 12:56 ` Burakov, Anatoly
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 25/27] eal: mark old naming as deprecated Stephen Hemminger
2020-07-15 13:28 ` Burakov, Anatoly
2020-07-15 20:29 ` Stephen Hemminger
2020-07-16 13:41 ` Burakov, Anatoly
2020-07-16 22:04 ` Stephen Hemminger
2020-07-17 15:21 ` Burakov, Anatoly
2020-07-17 15:35 ` Dmitry Kozliuk
2020-07-17 15:43 ` Burakov, Anatoly
2020-07-17 15:44 ` Burakov, Anatoly
2020-07-18 2:22 ` Stephen Hemminger
2020-07-20 12:32 ` Burakov, Anatoly
2020-07-20 18:51 ` Stephen Hemminger
2020-07-22 9:05 ` Burakov, Anatoly
2020-07-22 10:07 ` Burakov, Anatoly
2020-07-22 13:53 ` Stephen Hemminger
2020-07-16 22:05 ` Stephen Hemminger
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 26/27] memif: replace master/slave with server/client Stephen Hemminger
2020-07-17 13:01 ` Burakov, Anatoly
2020-07-18 2:23 ` Stephen Hemminger
2020-07-01 20:23 ` [dpdk-dev] [PATCH v4 27/27] vhost: rename SLAVE to CLIENT Stephen Hemminger
2020-07-02 11:17 ` Xia, Chenbo
2020-07-03 7:36 ` Adrian Moreno
2020-07-13 11:05 ` [dpdk-dev] [PATCH v4 00/27] Replace references to master and slave Burakov, Anatoly
2020-07-13 12:33 ` Burakov, Anatoly
2020-07-27 19:20 ` [dpdk-dev] [PATCH 20.08 0/6] Inclusive language fixes and deprecation notices Stephen Hemminger
2020-07-27 19:20 ` [dpdk-dev] [PATCH 20.08 1/6] doc: announce deprecation of master lcore Stephen Hemminger
2020-07-29 9:23 ` Burakov, Anatoly
2020-07-27 19:20 ` [dpdk-dev] [PATCH 20.08 2/6] kni: fix reference to master/slave process Stephen Hemminger
2020-07-27 19:20 ` [dpdk-dev] [PATCH 20.08 3/6] doc: fix incorrect reference to master process Stephen Hemminger
2020-07-29 9:24 ` Burakov, Anatoly
2020-07-27 19:20 ` [dpdk-dev] [PATCH 20.08 4/6] doc: announce deprecation blacklist/whitelist Stephen Hemminger
2020-07-27 19:20 ` [dpdk-dev] [PATCH 20.08 5/6] rte_ethdev: change comment to rte_dev_eth_mac_addr_add Stephen Hemminger
2020-07-27 19:20 ` [dpdk-dev] [PATCH 20.08 6/6] check_maintainers: change variable names Stephen Hemminger
2020-07-28 5:16 ` [dpdk-dev] [PATCH 20.08 0/6] Inclusive language fixes and deprecation notices Stephen Hemminger
2020-07-30 0:57 ` [dpdk-dev] [PATCH v2 20.08 0/6] inclusive " Stephen Hemminger
2020-07-30 0:57 ` [dpdk-dev] [PATCH v2 20.08 1/6] doc: announce deprecation of master lcore Stephen Hemminger
2020-07-30 8:42 ` Bruce Richardson
2020-08-06 16:49 ` Thomas Monjalon
2020-08-06 17:00 ` Stephen Hemminger
2020-08-06 17:14 ` Thomas Monjalon
2020-07-30 0:58 ` [dpdk-dev] [PATCH v2 20.08 2/6] kni: fix reference to master/slave process Stephen Hemminger
2020-07-30 8:42 ` Bruce Richardson
2020-07-30 0:58 ` [dpdk-dev] [PATCH v2 20.08 3/6] doc: fix incorrect reference to master process Stephen Hemminger
2020-07-30 0:58 ` [dpdk-dev] [PATCH v2 20.08 4/6] doc: announce deprecation blacklist/whitelist Stephen Hemminger
2020-07-30 8:45 ` Bruce Richardson
2020-07-30 15:10 ` Stephen Hemminger
2020-07-30 0:58 ` [dpdk-dev] [PATCH v2 20.08 5/6] rte_ethdev: change comment to rte_dev_eth_mac_addr_add Stephen Hemminger
2020-08-06 16:53 ` Thomas Monjalon
2020-07-30 0:58 ` [dpdk-dev] [PATCH v2 20.08 6/6] check_maintainers: change variable names Stephen Hemminger
2020-08-06 16:55 ` Thomas Monjalon
2020-08-06 16:56 ` [dpdk-dev] [PATCH v2 20.08 0/6] inclusive language fixes and deprecation notices Thomas Monjalon
2020-08-07 10:45 ` Mcnamara, John
2020-08-06 17:19 ` [dpdk-dev] [PATCH v3 " Stephen Hemminger
2020-08-06 17:19 ` [dpdk-dev] [PATCH v3 20.08 1/6] doc: announce deprecation of master lcore Stephen Hemminger
2020-08-07 0:10 ` Thomas Monjalon
2020-08-06 17:19 ` [dpdk-dev] [PATCH v3 20.08 2/6] kni: fix reference to master/slave process Stephen Hemminger
2020-08-06 17:19 ` [dpdk-dev] [PATCH v3 20.08 3/6] doc: fix incorrect reference to master process Stephen Hemminger
2020-08-06 17:19 ` [dpdk-dev] [PATCH v3 20.08 4/6] doc: announce deprecation blacklist/whitelist Stephen Hemminger
2020-08-07 0:15 ` Thomas Monjalon
2020-08-07 8:43 ` Gaëtan Rivet
2020-08-06 17:19 ` [dpdk-dev] [PATCH v3 20.08 5/6] rte_ethdev: change comment to rte_dev_eth_mac_addr_add Stephen Hemminger
2020-08-06 17:19 ` [dpdk-dev] [PATCH v3 20.08 6/6] check_maintainers: change variable names Stephen Hemminger
2020-08-07 10:45 ` [dpdk-dev] [PATCH v3 20.08 0/6] inclusive language fixes and deprecation notices Mcnamara, John
2020-08-07 10:56 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200701194650.10705-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).