From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 781A0A0350; Wed, 1 Jul 2020 21:48:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E548D1D41A; Wed, 1 Jul 2020 21:47:17 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 8783D1D176 for ; Wed, 1 Jul 2020 21:47:15 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id x72so2006856pfc.6 for ; Wed, 01 Jul 2020 12:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U61yi4Jo6845yX1Z0+JgAL9qSjnWA/M9rZ4S1AWeZ3g=; b=EtJ2De32Gu04orpleVMBSvJbvV08PfsyNEFlLCHGff8PtIylKJHcRdRztxzItgf7yz xYKysmlIyFCyJffHunHAZPKSC8Y5UVOlfhqo/K1ktk9pCML1qJZeVrr8ZAAKqT0aMoOS anJlzhAF+g/7RKd3vppFb5qcTqWqjoOV7u6MpeWAr0MiNaU9CipW9RxpX3Kn7F/8gk0r HeHU+BvMV0PHrjGruVXV9Rc2rSE/02pfHX3ml5KyIj7z9fMkOW0uBFgpBcoVfJT2ZMDj ES6UNb4Nwn5JMvRDnNABif6KWvoKv5quPLzghg7eO1j1uk9tOpxrZB0h8jm8W0qIBdxI EZRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U61yi4Jo6845yX1Z0+JgAL9qSjnWA/M9rZ4S1AWeZ3g=; b=P+bkIR1zBZpN/g3pBZbnT4p+A+4QDGT0SGQXG3ZXDDiQKeD6pxVsd/wyO6AzPj9Uc8 81CCy/tL7tnSH4BerKJv3HwCuaFKJrKE7DGrZyoY2d0w9WaZneZCrrYwr83jD+M7edJ+ ZsozYrrOj+wA413SblRYjdDYh8CDANySnzB0PMjL69/DWfo+Tu0cO/17Dr+6BS+6W5+7 cpPborAOiCu3dyvTzzHqIvRadxI0uHq1/k4JuGaRDYKW0IBIQ6lNmdXysECt7qbjvAcs 6mQaz67wU9ofRnK5tEo0mIRpERtdCSARCS6hW0WfBxbSagWoKGChqk7qdeXr4Pxzq0mc 3aYw== X-Gm-Message-State: AOAM532JwLXCYn0ngUek9HmbiW3Xi99vKEpFGPc6EhDu3ASGuNRerhI+ qa6bVeL7s7LT5khXXpIjpipOOQgmo0w= X-Google-Smtp-Source: ABdhPJyaAgoYsdx9QVsZrSZWgsOfdheCgHi5dOv/ROPNtr2j/dMSoELnX+lvhyfy/cR3RUVAmR5S6Q== X-Received: by 2002:a63:1b4b:: with SMTP id b11mr20695323pgm.243.1593632834261; Wed, 01 Jul 2020 12:47:14 -0700 (PDT) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id n14sm6501870pgd.78.2020.07.01.12.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 12:47:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 1 Jul 2020 12:46:34 -0700 Message-Id: <20200701194650.10705-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701194650.10705-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200701194650.10705-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 11/27] examples/l3fwd: replace references to master lcore X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use initial lcore instead. Signed-off-by: Stephen Hemminger --- examples/l3fwd-acl/main.c | 4 ++-- examples/l3fwd-graph/main.c | 14 +++++++------- examples/l3fwd-power/main.c | 20 ++++++++++---------- examples/l3fwd/main.c | 2 +- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index f22fca732892..c351f87bc159 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -2110,8 +2110,8 @@ 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_LCORE_FOREACH_SLAVE(lcore_id) { + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); + RTE_LCORE_FOREACH_WORKER(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; } diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index c70270c4d131..8b9f61fd8e4a 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -167,8 +167,8 @@ check_lcore_params(void) return -1; } - if (lcore == rte_get_master_lcore()) { - printf("Error: lcore %u is master lcore\n", lcore); + if (lcore == rte_get_initial_lcore()) { + printf("Error: lcore %u is initial lcore\n", lcore); return -1; } socketid = rte_lcore_to_socket_id(lcore); @@ -1099,16 +1099,16 @@ main(int argc, char **argv) route_str, i); } - /* Launch per-lcore init on every slave lcore */ - rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_MASTER); + /* Launch per-lcore init on every worker lcore */ + rte_eal_mp_remote_launch(graph_main_loop, NULL, SKIP_INITIAL); - /* Accumulate and print stats on master until exit */ + /* Accumulate and print stats on initial until exit */ if (rte_graph_has_stats_feature()) print_stats(); - /* Wait for slave cores to exit */ + /* Wait for worker cores to exit */ ret = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { ret = rte_eal_wait_lcore(lcore_id); /* Destroy graph */ if (ret < 0 || rte_graph_destroy( diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 9db94ce044c2..71a60bb93a37 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1351,7 +1351,7 @@ check_lcore_params(void) "off\n", lcore, socketid); } if (app_mode == APP_MODE_TELEMETRY && lcore == rte_lcore_id()) { - printf("cannot enable master core %d in config for telemetry mode\n", + printf("cannot enable initial core %d in config for telemetry mode\n", rte_lcore_id()); return -1; } @@ -2089,7 +2089,7 @@ get_current_stat_values(uint64_t *values) uint64_t app_eps = 0, app_fps = 0, app_br = 0; uint64_t count = 0; - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { qconf = &lcore_conf[lcore_id]; if (qconf->n_rx_queue == 0) continue; @@ -2181,10 +2181,10 @@ launch_timer(unsigned int lcore_id) RTE_SET_USED(lcore_id); - if (rte_get_master_lcore() != lcore_id) { - rte_panic("timer on lcore:%d which is not master core:%d\n", + if (rte_get_initial_lcore() != lcore_id) { + rte_panic("timer on lcore:%d which is not initial core:%d\n", lcore_id, - rte_get_master_lcore()); + rte_get_initial_lcore()); } RTE_LOG(INFO, POWER, "Bring up the Timer\n"); @@ -2515,11 +2515,11 @@ main(int argc, char **argv) /* launch per-lcore init on every lcore */ if (app_mode == APP_MODE_LEGACY) { - rte_eal_mp_remote_launch(main_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(main_loop, NULL, CALL_INITIAL); } else if (app_mode == APP_MODE_EMPTY_POLL) { empty_poll_stop = false; rte_eal_mp_remote_launch(main_empty_poll_loop, NULL, - SKIP_MASTER); + SKIP_INITIAL); } else { unsigned int i; @@ -2535,7 +2535,7 @@ main(int argc, char **argv) else rte_exit(EXIT_FAILURE, "failed to register metrics names"); - RTE_LCORE_FOREACH_SLAVE(lcore_id) { + RTE_LCORE_FOREACH_WORKER(lcore_id) { rte_spinlock_init(&stats[lcore_id].telemetry_lock); } rte_timer_init(&telemetry_timer); @@ -2543,13 +2543,13 @@ main(int argc, char **argv) handle_app_stats, "Returns global power stats. Parameters: None"); rte_eal_mp_remote_launch(main_telemetry_loop, NULL, - SKIP_MASTER); + SKIP_INITIAL); } if (app_mode == APP_MODE_EMPTY_POLL || app_mode == APP_MODE_TELEMETRY) launch_timer(rte_lcore_id()); - 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/l3fwd/main.c b/examples/l3fwd/main.c index 24ede42903db..5ad2256e68c8 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1278,7 +1278,7 @@ main(int argc, char **argv) ret = 0; /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(l3fwd_lkp.main_loop, NULL, CALL_INITIAL); if (evt_rsrc->enabled) { for (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++) rte_event_eth_rx_adapter_stop( -- 2.26.2