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 00AE9A04C7; Mon, 14 Sep 2020 16:40:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 903EE1C0CD; Mon, 14 Sep 2020 16:40:21 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id B69E81BE98 for ; Mon, 14 Sep 2020 16:40:19 +0200 (CEST) IronPort-SDR: V6lUD8TDBg0+HCKRdIa+J2iSUI6oS9bRJ7DsunMGtn5nQg6EJt9MX60SDqOGnQJ6ONSXmOeAKH i94JgFyZ8ebA== X-IronPort-AV: E=McAfee;i="6000,8403,9744"; a="146825363" X-IronPort-AV: E=Sophos;i="5.76,426,1592895600"; d="scan'208";a="146825363" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 07:40:16 -0700 IronPort-SDR: 0VWsajK8JVsAYMuioMLEKrxxdg8BTZtxGTR4lD60XgsuXNN2FQLtDJ18ZtbhtnAyKF7Eijcn6V miLTUebVE+3g== X-IronPort-AV: E=Sophos;i="5.76,426,1592895600"; d="scan'208";a="482363507" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.251.82.108]) ([10.251.82.108]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2020 07:40:15 -0700 To: Stephen Hemminger , dev@dpdk.org References: <20200911190701.29171-1-stephen@networkplumber.org> <20200911190701.29171-3-stephen@networkplumber.org> From: "Burakov, Anatoly" Message-ID: <7a2bfd5d-bd80-0d47-415e-711ffa82f76f@intel.com> Date: Mon, 14 Sep 2020 15:40:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200911190701.29171-3-stephen@networkplumber.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 02/15] eal: rename lcore word choices 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" On 11-Sep-20 8:06 PM, Stephen Hemminger wrote: > Replace master lcore with main lcore and > replace slave lcore with worker lcore. > > Keep the old functions and macros but mark them as deprecated > for this release. > > The "--master-lcore" command line option is also deprecated > and any usage will print a warning and use "--main-lcore" > as replacement. > > Signed-off-by: Stephen Hemminger > --- > doc/guides/rel_notes/deprecation.rst | 19 ------- > doc/guides/rel_notes/release_20_11.rst | 11 ++++ > lib/librte_eal/common/eal_common_dynmem.c | 8 +-- > lib/librte_eal/common/eal_common_launch.c | 36 ++++++------- > lib/librte_eal/common/eal_common_lcore.c | 8 +-- > lib/librte_eal/common/eal_common_options.c | 54 +++++++++++--------- > lib/librte_eal/common/eal_options.h | 2 + > lib/librte_eal/common/eal_private.h | 6 +-- > lib/librte_eal/common/rte_random.c | 2 +- > lib/librte_eal/common/rte_service.c | 2 +- > lib/librte_eal/freebsd/eal.c | 28 +++++----- > lib/librte_eal/freebsd/eal_thread.c | 32 ++++++------ > lib/librte_eal/include/rte_eal.h | 4 +- > lib/librte_eal/include/rte_eal_trace.h | 4 +- > lib/librte_eal/include/rte_launch.h | 59 ++++++++++++---------- > lib/librte_eal/include/rte_lcore.h | 36 +++++++++---- > lib/librte_eal/linux/eal.c | 28 +++++----- > lib/librte_eal/linux/eal_memory.c | 8 +-- > lib/librte_eal/linux/eal_thread.c | 32 ++++++------ > lib/librte_eal/rte_eal_version.map | 2 +- > lib/librte_eal/windows/eal.c | 16 +++--- > lib/librte_eal/windows/eal_thread.c | 30 +++++------ > 22 files changed, 223 insertions(+), 204 deletions(-) > Overall, Reviewed-by: Anatoly Burakov However, couple of nits below. > ABI Changes > ----------- > diff --git a/lib/librte_eal/common/eal_common_dynmem.c b/lib/librte_eal/common/eal_common_dynmem.c > index 614648d8a4de..48eca5854ebe 100644 > --- a/lib/librte_eal/common/eal_common_dynmem.c > +++ b/lib/librte_eal/common/eal_common_dynmem.c Missed comment right above this hunk. > @@ -434,12 +434,12 @@ eal_dynmem_calc_num_pages_per_socket( > for (socket = 0; socket < RTE_MAX_NUMA_NODES && total_size != 0; > socket++) { > struct rte_config *cfg = rte_eal_get_configuration(); > - unsigned int master_lcore_socket; > + unsigned int main_lcore_socket; > > - master_lcore_socket = > - rte_lcore_to_socket_id(cfg->master_lcore); > + main_lcore_socket = > + rte_lcore_to_socket_id(cfg->main_lcore); > > - if (master_lcore_socket != socket) > + if (main_lcore_socket != socket) > continue; > > /* Update sizes */ > } > > /* > - * Launch a dummy function on all slave lcores, so that master lcore > + * Launch a dummy function on all worker lcores, so that main lcore > * knows they are all ready when this function returns. > */ > - rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER); > + rte_eal_mp_remote_launch(sync_func, NULL, SKIP_MAIN); > rte_eal_mp_wait_lcore(); > > /* initialize services so vdevs register service during bus_probe. */ > diff --git a/lib/librte_eal/linux/eal_memory.c b/lib/librte_eal/linux/eal_memory.c > index 89725291b0ce..d7349544a13a 100644 > --- a/lib/librte_eal/linux/eal_memory.c > +++ b/lib/librte_eal/linux/eal_memory.c Missed comment right above this hunk. > @@ -1751,7 +1751,7 @@ memseg_primary_init_32(void) > for (i = 0; i < rte_socket_count(); i++) { > int hp_sizes = (int) internal_conf->num_hugepage_sizes; > uint64_t max_socket_mem, cur_socket_mem; > - unsigned int master_lcore_socket; > + unsigned int main_lcore_socket; > struct rte_config *cfg = rte_eal_get_configuration(); > bool skip; > > @@ -1767,10 +1767,10 @@ memseg_primary_init_32(void) > skip = active_sockets != 0 && > internal_conf->socket_mem[socket_id] == 0; > /* ...or if we didn't specifically request memory on *any* > - * socket, and this is not master lcore > + * socket, and this is not main lcore > */ > - master_lcore_socket = rte_lcore_to_socket_id(cfg->master_lcore); > - skip |= active_sockets == 0 && socket_id != master_lcore_socket; > + main_lcore_socket = rte_lcore_to_socket_id(cfg->main_lcore); > + skip |= active_sockets == 0 && socket_id != main_lcore_socket; > > if (skip) { -- Thanks, Anatoly