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 06F46A04DB; Fri, 16 Oct 2020 01:02:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 511AA1E85E; Fri, 16 Oct 2020 00:58:16 +0200 (CEST) Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id A99341E53B for ; Fri, 16 Oct 2020 00:58:05 +0200 (CEST) Received: by mail-pl1-f193.google.com with SMTP id d23so189658pll.7 for ; Thu, 15 Oct 2020 15:58:05 -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=G8MU+q7dq2ERw4Gm5e0GFWj6Hok+xD/gS+BPiWyMZyQ=; b=SSmofM3dXOwsEuhhQma5KX+sI8pV9IQr7MaHecXwP5n3V91ZHJW0wYf1X7V1p0jXSL ca8CLUomwgq4AR65Ayxi30lHfXROVvgZPv5V2twnfiBwuW6Yo4MNxtY3E6e9VYZrYmp9 SI0uLkE6UTAkdQW+5RYPQMuIrLtdjizHdaA7G6lLcQgiiSv8xxIZNNRmiaWDWPGA9GTO Tz3yKVQ2FFZox7qQmZHQciVreJ4GfI//D6wGDa2EGpLacKwAZLiIlKw9/OutlH6FzhFL IZqeUCn4I+9jzEQNrHi1kgW6sM14ZQOCWnrphaio53Z8IUbQV80QOjTThjmqw+NN5CSc sgSQ== 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=G8MU+q7dq2ERw4Gm5e0GFWj6Hok+xD/gS+BPiWyMZyQ=; b=VBHHJXs9uXK2y8FMs5DU78SeyrMt45v9bVGhk9UakNlEofXu9/fSXyaSZqR5EESnE5 B1PPR35pnRrcwE1yYiRNP8APdSGgI3XPHxTDDfHw3/osTj65gDrjkdLaMcePWbYS7ihq pF3PHMqZ8DOS6XNFa2Brt8U4SAOtBFsG+diphAEL4CqSkxznYTNh6TdQtSoTG9sDVnPI NFcfSsQ+qru73o5jNjTVpTxBdAyYfaN+0sgJI0hOLYCqRZLaSOjZ4ZCMmeKk013jGt8U 2klO++93rGfN8JF8Y2EoWKDvcEqdkewudb3f/UW6ZkCINbT4uCpr9jyDUusauueh7P7K ax2g== X-Gm-Message-State: AOAM530V32qKktc1b86BTprMkiRifFz5oGqXi3rhYfofIKv4z+CQAquP FDwgSNoyu7mEnqr6H2qreG8pXurGqvm16g== X-Google-Smtp-Source: ABdhPJy4LGajU5GaIzKDy2exsOuam75+kWv4TNvJ3ZUqm9SxwGk+oxXMdpwXtfX2l6V1LUdUc5hRwA== X-Received: by 2002:a17:90a:e697:: with SMTP id s23mr941631pjy.16.1602802683270; Thu, 15 Oct 2020 15:58:03 -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 x4sm324055pfm.86.2020.10.15.15.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2020 15:58:02 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Anatoly Burakov Date: Thu, 15 Oct 2020 15:57:28 -0700 Message-Id: <20201015225736.12167-13-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201015225736.12167-1-stephen@networkplumber.org> References: <20200911190701.29171-1-stephen@networkplumber.org> <20201015225736.12167-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v7 12/20] examples: replace use of master with main 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" Change references to master/slave lcore to main/worker. For l2fwd, l3fwd and link_status examples. Acked-by: Anatoly Burakov Signed-off-by: Stephen Hemminger --- app/pdump/main.c | 2 +- examples/ip_pipeline/thread.c | 14 +++++++------- examples/l2fwd-cat/l2fwd-cat.c | 2 +- examples/l2fwd-crypto/main.c | 6 +++--- 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 | 2 +- examples/l2fwd-keepalive/main.c | 2 +- examples/l2fwd/main.c | 6 +++--- examples/l3fwd-acl/main.c | 2 +- examples/l3fwd-graph/main.c | 14 +++++++------- examples/l3fwd-power/main.c | 16 ++++++++-------- examples/l3fwd/main.c | 2 +- examples/link_status_interrupt/main.c | 6 +++--- 16 files changed, 41 insertions(+), 41 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index c38c53719e7d..b34bf335317b 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -947,7 +947,7 @@ dump_packets(void) rte_exit(EXIT_FAILURE, "failed to wait\n"); } - /* master core */ + /* main core */ while (!quit_signal) ; } diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c index adb83167cd84..46006f9d0265 100644 --- a/examples/ip_pipeline/thread.c +++ b/examples/ip_pipeline/thread.c @@ -32,7 +32,7 @@ #endif /** - * Master thead: data plane thread context + * Main thead: data plane thread context */ struct thread { struct rte_ring *msgq_req; @@ -78,7 +78,7 @@ struct thread_data { static struct thread_data thread_data[RTE_MAX_LCORE]; /** - * Master thread: data plane thread init + * Main thread: data plane thread init */ static void thread_free(void) @@ -137,7 +137,7 @@ thread_init(void) return -1; } - /* Master thread records */ + /* Main thread records */ t->msgq_req = msgq_req; t->msgq_rsp = msgq_rsp; t->enabled = 1; @@ -179,7 +179,7 @@ pipeline_is_running(struct pipeline *p) } /** - * Master thread & data plane threads: message passing + * Main thread & data plane threads: message passing */ enum thread_req_type { THREAD_REQ_PIPELINE_ENABLE = 0, @@ -213,7 +213,7 @@ struct thread_msg_rsp { }; /** - * Master thread + * Main thread */ static struct thread_msg_req * thread_msg_alloc(void) @@ -556,7 +556,7 @@ thread_msg_handle(struct thread_data *t) } /** - * Master thread & data plane threads: message passing + * Main thread & data plane threads: message passing */ enum pipeline_req_type { /* Port IN */ @@ -730,7 +730,7 @@ struct pipeline_msg_rsp { }; /** - * Master thread + * Main thread */ static struct pipeline_msg_req * pipeline_msg_alloc(void) diff --git a/examples/l2fwd-cat/l2fwd-cat.c b/examples/l2fwd-cat/l2fwd-cat.c index 45a497c082da..2e632c5cb6a5 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 main core only. */ lcore_main(); return 0; diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c index 7d3586e773a2..bed8d81ccfd4 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 main core */ + if (lcore_id == rte_get_main_lcore() && options->refresh_period) { print_stats(); timer_tsc = 0; @@ -2799,7 +2799,7 @@ 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); + CALL_MAIN); RTE_LCORE_FOREACH_SLAVE(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..fda52680d8a0 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 Main 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..84ed1c41158f 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 Main 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..f7d8945a129b 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_main_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 9f831b126696..1a2788a730ec 100644 --- a/examples/l2fwd-event/main.c +++ b/examples/l2fwd-event/main.c @@ -667,7 +667,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_MAIN); 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 1dbe06622dad..bb55b0c19353 100644 --- a/examples/l2fwd-jobstats/main.c +++ b/examples/l2fwd-jobstats/main.c @@ -1016,7 +1016,7 @@ 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_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_MAIN); RTE_LCORE_FOREACH_SLAVE(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 d0e8bf3cceb1..5df7a085cb52 100644 --- a/examples/l2fwd-keepalive/main.c +++ b/examples/l2fwd-keepalive/main.c @@ -786,7 +786,7 @@ main(int argc, char **argv) ) != 0 ) rte_exit(EXIT_FAILURE, "Stats setup failure.\n"); } - /* launch per-lcore init on every slave lcore */ + /* launch per-lcore init on every worker lcore */ RTE_LCORE_FOREACH_SLAVE(lcore_id) { struct lcore_queue_conf *qconf = &lcore_queue_conf[lcore_id]; diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 7e3078788e84..307b6315e0d7 100644 --- a/examples/l2fwd/main.c +++ b/examples/l2fwd/main.c @@ -260,8 +260,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 main core */ + if (lcore_id == rte_get_main_lcore()) { print_stats(); /* reset the timer */ timer_tsc = 0; @@ -884,7 +884,7 @@ 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_eal_mp_remote_launch(l2fwd_launch_one_lcore, NULL, CALL_MAIN); RTE_LCORE_FOREACH_SLAVE(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) { ret = -1; diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index 4386584667bb..cae050458c94 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -2104,7 +2104,7 @@ 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_eal_mp_remote_launch(main_loop, NULL, CALL_MAIN); RTE_LCORE_FOREACH_SLAVE(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 2306ba9b07cb..ba7496560c26 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_main_lcore()) { + printf("Error: lcore %u is main lcore\n", lcore); return -1; } socketid = rte_lcore_to_socket_id(lcore); @@ -1091,16 +1091,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_MAIN); - /* Accumulate and print stats on master until exit */ + /* Accumulate and print stats on main 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 d0e6c9bd77b9..61363e8a6357 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1514,7 +1514,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 main core %d in config for telemetry mode\n", rte_lcore_id()); return -1; } @@ -2375,10 +2375,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_main_lcore() != lcore_id) { + rte_panic("timer on lcore:%d which is not main core:%d\n", lcore_id, - rte_get_master_lcore()); + rte_get_main_lcore()); } RTE_LOG(INFO, POWER, "Bring up the Timer\n"); @@ -2759,11 +2759,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_legacy_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(main_legacy_loop, NULL, CALL_MAIN); } 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_MAIN); } else if (app_mode == APP_MODE_TELEMETRY) { unsigned int i; @@ -2787,9 +2787,9 @@ 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_MAIN); } else if (app_mode == APP_MODE_INTERRUPT) { - rte_eal_mp_remote_launch(main_intr_loop, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(main_intr_loop, NULL, CALL_MAIN); } if (app_mode == APP_MODE_EMPTY_POLL || app_mode == APP_MODE_TELEMETRY) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index 80f3434ec2da..51378a5dab8c 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1272,7 +1272,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_MAIN); if (evt_rsrc->enabled) { for (i = 0; i < evt_rsrc->rx_adptr.nb_rx_adptr; i++) rte_event_eth_rx_adapter_stop( diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index e20a7e2a31f8..69b0ad376667 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -255,8 +255,8 @@ lsi_main_loop(void) /* if timer has reached its timeout */ 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 main core */ + if (lcore_id == rte_get_main_lcore()) { print_stats(); /* reset the timer */ timer_tsc = 0; @@ -725,7 +725,7 @@ main(int argc, char **argv) check_all_ports_link_status(nb_ports, lsi_enabled_port_mask); /* launch per-lcore init on every lcore */ - rte_eal_mp_remote_launch(lsi_launch_one_lcore, NULL, CALL_MASTER); + rte_eal_mp_remote_launch(lsi_launch_one_lcore, NULL, CALL_MAIN); RTE_LCORE_FOREACH_SLAVE(lcore_id) { if (rte_eal_wait_lcore(lcore_id) < 0) return -1; -- 2.27.0