[v4,12/27] examples/l2fwd: replace references to master lcore

Message ID 20200701202359.17006-13-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Replace references to master and slave |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Stephen Hemminger July 1, 2020, 8:23 p.m. UTC
Use term initial lcore instead.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 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(-)
  

Comments

Burakov, Anatoly July 15, 2020, 11:51 a.m. UTC | #1
On 01-Jul-20 9:23 PM, Stephen Hemminger wrote:
> Use term initial lcore instead.
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---

I'm assuming the #ifdef'ed out section in l2fwd-crypto is skipped 
because the cryptodev API is not being addressed at this time.

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
  

Patch

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 827da9b3e38b..3d35b67e6a89 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -874,8 +874,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;
@@ -2802,8 +2802,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 4fe500333cdc..02d08569a757 100644
--- a/examples/l2fwd-event/main.c
+++ b/examples/l2fwd-event/main.c
@@ -673,7 +673,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 47a3b0976546..c06027964a64 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -1022,8 +1022,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 b2742633bc65..c0a99a3b3da5 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -792,8 +792,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)
@@ -816,7 +816,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 4a41aac63841..b07476fb7a38 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -250,8 +250,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;
@@ -756,8 +756,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;