From patchwork Fri Jun 5 22:57:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 70899 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B312BA0350; Sat, 6 Jun 2020 01:00:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A7C091D607; Sat, 6 Jun 2020 00:59:15 +0200 (CEST) Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by dpdk.org (Postfix) with ESMTP id A21371D603 for ; Sat, 6 Jun 2020 00:59:12 +0200 (CEST) Received: by mail-pg1-f171.google.com with SMTP id u5so5852568pgn.5 for ; Fri, 05 Jun 2020 15:59:12 -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=lK9P8puqyREljoc5+f9rViWo/3+6viGqEM0hMv/mduI=; b=TUG7PARZiKmBSTT1mX0186f5v29LGKemfklCF2ofSNDFe8jWRDrUGolod63vyuj17c JBqnkjQTRK2C2dEnihRk5pSaoPAiJPUkOACk0d6ILcEac7DvJSd7CBuxDWOtnJxLL9V4 MCykb0KfCMy2HFD/Trgn45gwRxzIjJMFFbUkkq8P9tuCxGACNs1pDZZrWRqPRdWURgcN ORigSlNCNotKva35FPsNH3hezvvH7hqcgvfhXd33OmqfVeQrxgXftJ01fgDn7Gwtz1hd nMLnESxn0vxj4Rku2D5cOwDUfm2CSoMg2JNxh9oYZuK2GHVE8Ste1rDpKxEWW4EqOr5q LuLg== 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=lK9P8puqyREljoc5+f9rViWo/3+6viGqEM0hMv/mduI=; b=eqVD4xA+j/Ite15fUW6Flh31T3MmOwJWYgRSmk1kV95syfPe+XBmmHZdOU+1BReqfC SF95tdAIDIL0gvXw/i874PpSnkXH1WImrNrxAIrxLi1qxlf1AjY54n4J9X2VPVyV95sN f2311b3DyH6540P8jUol9CFLDNhyk4+nfrqNng6hnmV8upo6U7qKZSrielhzTT5eCoEl /EGVLgQ8m+HxnDfUyLbQh/NHwRjCAMmDo7+hEvEcGmFlDiAM+hNL3URFu9BcdEE4fwRJ ynPr2yRbUVqmDZyxTaUMK5uI/U3Q4Y3vjUfWIi4ry+1Tm/EZfAweLWyW8MjBAPvLFE9h OPPg== X-Gm-Message-State: AOAM5319UKdTTHX2noPkhUStoI+emApvDt/kPHmdgGtdvDLmUxueWV1u zohaaw33Lt7qnQHM4ZtCyUiZXFu70l4= X-Google-Smtp-Source: ABdhPJyyZ3tIVJb7YnQkr58d1YRoUCOlBw21brGGdSA83LjUistDhN7YWdo/ntMTHxBrsHMsdpnSzw== X-Received: by 2002:a63:1a13:: with SMTP id a19mr11432833pga.350.1591397951291; Fri, 05 Jun 2020 15:59:11 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id j186sm543121pfb.220.2020.06.05.15.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:59:10 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 5 Jun 2020 15:57:56 -0700 Message-Id: <20200605225811.26342-12-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605225811.26342-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200605225811.26342-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [RFC v2 11/26] 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(