[12/15] examples/performance-thread: replace reference to master lcore

Message ID 20200911190701.29171-13-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Headers
Series Replace terms master/slave lcore with main/worker lcore |

Checks

Context Check Description
ci/checkpatch warning coding style issues

Commit Message

Stephen Hemminger Sept. 11, 2020, 7:06 p.m. UTC
  Replace term master with main here.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/performance-thread/l3fwd-thread/main.c | 14 +++++++-------
 examples/performance-thread/pthread_shim/main.c |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)
  

Comments

Burakov, Anatoly Sept. 14, 2020, 3:17 p.m. UTC | #1
On 11-Sep-20 8:06 PM, Stephen Hemminger wrote:
> Replace term master with main here.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---

Missed instances:

examples/performance-thread/l3fwd-thread/main.c
   3772,21: 		RTE_LCORE_FOREACH_SLAVE(lcore_id) {

examples/performance-thread/pthread_shim/main.c
   258,20: 	RTE_LCORE_FOREACH_SLAVE(lcore_id) {

With above fixes,

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

Patch

diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index e32802aa9b8b..9b4993e0fd63 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 main lcore
  */
 
 static void *
@@ -2261,11 +2261,11 @@  lthread_spawner(__rte_unused void *arg)
 }
 
 /*
- * Start master scheduler with initial lthread spawning rx and tx lthreads
- * (main_lthread_master).
+ * Start main scheduler with initial lthread spawning rx and tx lthreads
+ * (main_lthread_main).
  */
 static int
-lthread_master_spawner(__rte_unused void *arg) {
+lthread_main_spawner(__rte_unused void *arg) {
 	struct lthread *lt;
 	int lcore_id = rte_lcore_id();
 
@@ -3762,13 +3762,13 @@  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_MAIN);
+		lthread_main_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_eal_mp_remote_launch(pthread_run, NULL, CALL_MAIN);
 		RTE_LCORE_FOREACH_SLAVE(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..d5477ef2324d 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -252,7 +252,7 @@  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_MAIN);
 
 	/* wait for threads to stop */
 	RTE_LCORE_FOREACH_SLAVE(lcore_id) {