[v4,14/27] examples/performance-thread: replace reference to master lcore

Message ID 20200701202359.17006-15-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 initial lcore instead.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 examples/performance-thread/l3fwd-thread/main.c | 12 ++++++------
 examples/performance-thread/pthread_shim/main.c |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)
  

Comments

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

<snip>

>   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) {

You've missed the comments right above this.

Once that's fixed,

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 84c1d7b3a232..a23bb021ce6b 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 initial 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;