@@ -1042,7 +1042,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 main_lcore_id = rte_get_main_lcore();
rte_atomic16_init(&global_exit_flag);
@@ -1147,7 +1147,7 @@ main(int argc, char **argv)
RTE_LCORE_FOREACH_SLAVE(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) {
@@ -1159,11 +1159,11 @@ main(int argc, char **argv)
}
if (!stats_thread_started &&
- lcore_conf[master_lcore_id].core_type != 0)
+ lcore_conf[main_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[main_lcore_id].core_type != 0)
+ processing_loop(&lcore_conf[main_lcore_id]);
else if (!stats_thread_started)
stats_loop(&stats_lcore);
@@ -573,7 +573,7 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
__rte_unused void *data)
{
- int slave_core_id = rte_lcore_id();
+ int worker_core_id = rte_lcore_id();
rte_spinlock_trylock(&global_flag_stru_p->lock);
if (global_flag_stru_p->LcoreMainIsRunning == 0) {
@@ -590,9 +590,9 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
return;
}
- /* start lcore main on core != master_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))
+ /* start lcore main on core != main_core - ARP response thread */
+ worker_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
+ if ((worker_core_id >= RTE_MAX_LCORE) || (worker_core_id == 0))
return;
rte_spinlock_trylock(&global_flag_stru_p->lock);
@@ -601,8 +601,8 @@ static void cmd_start_parsed(__rte_unused void *parsed_result,
cmdline_printf(cl,
"Starting lcore_main on core %d:%d "
"Our IP:%d.%d.%d.%d\n",
- slave_core_id,
- rte_eal_remote_launch(lcore_main, NULL, slave_core_id),
+ worker_core_id,
+ rte_eal_remote_launch(lcore_main, NULL, worker_core_id),
BOND_IP_1,
BOND_IP_2,
BOND_IP_3,
@@ -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 MAIN lcore */
static void prompt(__rte_unused void *arg1)
{
struct cmdline *cl;
@@ -818,7 +818,7 @@ static void prompt(__rte_unused void *arg1)
int
main(int argc, char *argv[])
{
- int ret, slave_core_id;
+ int ret, worker_core_id;
uint16_t nb_ports, i;
/* init EAL */
@@ -852,23 +852,23 @@ main(int argc, char *argv[])
rte_spinlock_init(&global_flag_stru_p->lock);
/* check state of lcores */
- RTE_LCORE_FOREACH_SLAVE(slave_core_id) {
- if (rte_eal_get_lcore_state(slave_core_id) != WAIT)
+ RTE_LCORE_FOREACH_SLAVE(worker_core_id) {
+ if (rte_eal_get_lcore_state(worker_core_id) != WAIT)
return -EBUSY;
}
- /* start lcore main on core != master_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))
+ /* start lcore main on core != main_core - ARP response thread */
+ worker_core_id = rte_get_next_lcore(rte_lcore_id(), 1, 0);
+ if ((worker_core_id >= RTE_MAX_LCORE) || (worker_core_id == 0))
return -EPERM;
global_flag_stru_p->LcoreMainIsRunning = 1;
- global_flag_stru_p->LcoreMainCore = slave_core_id;
+ global_flag_stru_p->LcoreMainCore = worker_core_id;
printf("Starting lcore_main on core %d:%d Our IP:%d.%d.%d.%d\n",
- slave_core_id,
+ worker_core_id,
rte_eal_remote_launch((lcore_function_t *)lcore_main,
NULL,
- slave_core_id),
+ worker_core_id),
BOND_IP_1,
BOND_IP_2,
BOND_IP_3,
@@ -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,11 +284,11 @@ 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");
+ rte_exit(EXIT_FAILURE, "No available worker core!\n");
/* Assume there is an available slave.. */
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();
@@ -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 main core only. */
lcore_main(cls_app);
return 0;
@@ -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 */
+ /* call lcore_hello() on every worker lcore */
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
rte_eal_remote_launch(lcore_hello, NULL, lcore_id);
}
- /* call it on master lcore too */
+ /* call it on main lcore too */
lcore_hello(NULL);
rte_eal_mp_wait_lcore();
@@ -520,7 +520,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)
{
@@ -984,7 +984,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();
@@ -992,7 +992,7 @@ main(int argc, char **argv)
assign_rings();
start_forwarding_cores();
- /* master core prints stats while other cores forward */
+ /* main core prints stats while other cores forward */
print_stats(argv[0]);
/* force_quit is true when we get here */
@@ -1072,7 +1072,7 @@ 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_eal_mp_remote_launch(main_loop, NULL, CALL_MAIN);
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
@@ -250,7 +250,7 @@ main(int argc, char **argv)
rte_eal_mp_remote_launch(
thread_main,
NULL,
- SKIP_MASTER);
+ SKIP_MAIN);
/* Script */
if (app.script_name)
@@ -1198,7 +1198,7 @@ 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_eal_mp_remote_launch(main_loop, NULL, CALL_MAIN);
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
@@ -801,7 +801,7 @@ 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_eal_mp_remote_launch(main_loop, NULL, CALL_MAIN);
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
@@ -956,7 +956,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
+ * is the main, for multiple kernel thread
* environment.
*/
if (i == 0) {
@@ -1105,7 +1105,7 @@ 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_eal_mp_remote_launch(main_loop, NULL, CALL_MAIN);
RTE_LCORE_FOREACH_SLAVE(i) {
if (rte_eal_wait_lcore(i) < 0)
return -1;
@@ -668,7 +668,7 @@ assign_stream_to_lcores(void)
uint8_t lcore_num, nb_extra;
lcore_num = rte_lcore_count();
- /* Exclude master core */
+ /* Exclude main core */
lcore_num--;
nb_streams = (fwd_mode == IOFWD) ? num_queues * 2 : num_queues;
@@ -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 MAIN lcore */
static void
prompt(void)
{
@@ -345,10 +345,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, main_lcore_id, end_w_lcore_id;
last_lcore_id = get_last_lcore_id();
- master_lcore_id = rte_get_master_lcore();
+ main_lcore_id = rte_get_main_lcore();
end_w_lcore_id = get_previous_lcore_id(last_lcore_id);
printf("\nRX thread stats:\n");
@@ -360,7 +360,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 != main_lcore_id) {
printf("\nWorker thread stats on core [%u]:\n",
lcore_id);
printf(" - Pkts deqd from workers ring: %"PRIu64"\n",
@@ -658,7 +658,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, main_lcore_id;
uint16_t port_id;
uint16_t nb_ports_available;
struct worker_thread_args worker_args = {NULL, NULL};
@@ -745,29 +745,29 @@ main(int argc, char **argv)
}
last_lcore_id = get_last_lcore_id();
- master_lcore_id = rte_get_master_lcore();
+ main_lcore_id = rte_get_main_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 != main_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 main core */
rx_thread(rx_to_workers);
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
@@ -372,7 +372,7 @@ parse_sync(struct ptpv2_data_slave_ordinary *ptp_data, uint16_t rx_tstamp_idx)
}
/*
- * Parse the PTP FOLLOWUP message and send DELAY_REQ to the master clock.
+ * Parse the PTP FOLLOWUP message and send DELAY_REQ to the main clock.
*/
static void
parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
@@ -782,7 +782,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 main core only. */
lcore_main();
return 0;
@@ -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 main core only */
lcore_main();
return 0;
}
@@ -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 non-main 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 main 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 except main */
+ rte_eal_mp_remote_launch(sleep_lcore, NULL, SKIP_MAIN);
do_packet_forwarding();
return 0;
@@ -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 main core only. */
lcore_main();
return 0;
@@ -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 main 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 */
+ /* call lcore_mainloop() on every worker lcore */
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
rte_eal_remote_launch(lcore_mainloop, NULL, lcore_id);
}
- /* call it on master lcore too */
+ /* call it on main lcore too */
(void) lcore_mainloop(NULL);
return 0;
@@ -653,7 +653,7 @@ main(int argc, char *argv[])
}
/* call lcore_main() on every lcore */
- rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MASTER);
+ rte_eal_mp_remote_launch(lcore_main, NULL, CALL_MAIN);
RTE_LCORE_FOREACH_SLAVE(lcore_id) {
if (rte_eal_wait_lcore(lcore_id) < 0)
return -1;
@@ -699,12 +699,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_eal_remote_launch(lcore_main, (void*)i++, lcore_id);
}
- /* call on master too */
+ /* call on main too */
(void) lcore_main((void*)i);
return 0;