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 71368A04B7; Wed, 14 Oct 2020 17:36:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 563F81DEBC; Wed, 14 Oct 2020 17:35:25 +0200 (CEST) Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by dpdk.org (Postfix) with ESMTP id C13391DEBC for ; Wed, 14 Oct 2020 17:35:23 +0200 (CEST) Received: by mail-oi1-f194.google.com with SMTP id x62so3616424oix.11 for ; Wed, 14 Oct 2020 08:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mVO+hFHLWemU7C5fPMbncxfmiLyvzU+BaFDsz1Xsi1Y=; b=JuOs143oE1EXHJMKvzr/HEOiFfqbK2Tj1tWa114ldS1FuGfoWyYy99QhbeS6d9sY1c +JcrehNLoNaAMUk5CyNKT4DR/V0V7lD/poj2pHNIc/4V/UkxN8yhQJ/8qPgqgTiACqvO DWXXxggb9/eWUnfxXxUadUW1/SlD2boXKugis= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mVO+hFHLWemU7C5fPMbncxfmiLyvzU+BaFDsz1Xsi1Y=; b=ESRlOpIlCaqIFWIiq2pKK72lxjfhWAdKtOkaAbby7NPgCG8LLwbRa6BuRFwdJvfgu5 Mw/8plO5lhonEzkif39K6N6iuq7+FEX3ohLoRKSL10PmehjRRvEvgEGw8e79ofgJDqQq mJAlZY9IHgE3bM52473F/x1Efe3TVvqjdxlMlJXbeJdSnYHPQgTNF4752QqpkTKm79iZ ulCI5277iF6ZWG5k6oDUN5XOZQO826MTyDmwCEwzERRCtNCEdAGHkrigfofGpoKxbPf3 u8t15U70fpcdkmrW2MMYHrjNcmLcUXl+u8ESDssxlTbemNON2kG2LSkY6+Abxg311rc0 Ld0A== X-Gm-Message-State: AOAM530wzq3SPgAzEja1Rn1K8aAs1zKklPs7xxOKZaOGU1ImtYFFbaji NG7SG9vxXmYgitdC4VkvOiiOIKjFVMBCQyL0PkYrZw== X-Google-Smtp-Source: ABdhPJzSnzFUdZXrUL0vyTEWNjxnJzbZk8odjlXw14SI3fZl14Fjfa8exv9K92ogKN8OzATC9fb+z2sl/mRpdLItrKg= X-Received: by 2002:aca:3607:: with SMTP id d7mr17280oia.168.1602689721635; Wed, 14 Oct 2020 08:35:21 -0700 (PDT) MIME-Version: 1.0 References: <20200911190701.29171-1-stephen@networkplumber.org> <20201014152756.6518-1-stephen@networkplumber.org> <20201014152756.6518-6-stephen@networkplumber.org> In-Reply-To: <20201014152756.6518-6-stephen@networkplumber.org> From: Ajit Khaparde Date: Wed, 14 Oct 2020 08:35:05 -0700 Message-ID: To: Stephen Hemminger Cc: dpdk-dev , Anatoly Burakov Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v6 05/18] drivers: replace master lcore with main 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" On Wed, Oct 14, 2020 at 8:30 AM Stephen Hemminger wrote: > > Replace use of deprecated rte_master_lcore with rte_main_lcore. > > Signed-off-by: Stephen Hemminger > Acked-by: Anatoly Burakov For bnxt PMD Acked-by: Ajit Khaparde > --- > drivers/bus/dpaa/dpaa_bus.c | 2 +- > drivers/bus/pci/pci_common_uio.c | 3 ++- > drivers/bus/vmbus/vmbus_common_uio.c | 2 +- > drivers/event/dpaa2/dpaa2_eventdev_selftest.c | 10 +++++----- > drivers/event/octeontx/ssovf_evdev_selftest.c | 10 +++++----- > drivers/event/sw/sw_evdev_selftest.c | 2 +- > drivers/net/bnxt/bnxt_ring.c | 4 ++-- > drivers/net/mvpp2/mrvl_ethdev.c | 6 +++--- > drivers/net/qede/base/bcm_osal.c | 4 ++-- > drivers/net/softnic/rte_eth_softnic_internals.h | 2 +- > drivers/net/softnic/rte_eth_softnic_thread.c | 16 ++++++++-------- > 11 files changed, 31 insertions(+), 30 deletions(-) > > diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c > index 32e872da5209..c94c72106f2c 100644 > --- a/drivers/bus/dpaa/dpaa_bus.c > +++ b/drivers/bus/dpaa/dpaa_bus.c > @@ -257,7 +257,7 @@ int rte_dpaa_portal_init(void *arg) > BUS_INIT_FUNC_TRACE(); > > if ((size_t)arg == 1 || lcore == LCORE_ID_ANY) > - lcore = rte_get_master_lcore(); > + lcore = rte_get_main_lcore(); > else > if (lcore >= RTE_MAX_LCORE) > return -1; > diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c > index 793dfd0a7c9b..318f9a1d550b 100644 > --- a/drivers/bus/pci/pci_common_uio.c > +++ b/drivers/bus/pci/pci_common_uio.c > @@ -51,7 +51,8 @@ pci_uio_map_secondary(struct rte_pci_device *dev) > void *mapaddr = pci_map_resource(uio_res->maps[i].addr, > fd, (off_t)uio_res->maps[i].offset, > (size_t)uio_res->maps[i].size, 0); > - /* fd is not needed in slave process, close it */ > + > + /* fd is not needed in secondary process, close it */ > close(fd); > if (mapaddr != uio_res->maps[i].addr) { > RTE_LOG(ERR, EAL, > diff --git a/drivers/bus/vmbus/vmbus_common_uio.c b/drivers/bus/vmbus/vmbus_common_uio.c > index 8e476f2eaf8b..a689bf11b3f6 100644 > --- a/drivers/bus/vmbus/vmbus_common_uio.c > +++ b/drivers/bus/vmbus/vmbus_common_uio.c > @@ -85,7 +85,7 @@ vmbus_uio_map_secondary(struct rte_vmbus_device *dev) > return -1; > } > > - /* fd is not needed in slave process, close it */ > + /* fd is not needed in secondary process, close it */ > close(fd); > > dev->primary = uio_res->primary; > diff --git a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c > index ba4f4bd23447..b1f38914841d 100644 > --- a/drivers/event/dpaa2/dpaa2_eventdev_selftest.c > +++ b/drivers/event/dpaa2/dpaa2_eventdev_selftest.c > @@ -501,8 +501,8 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count) > > > static int > -launch_workers_and_wait(int (*master_worker)(void *), > - int (*slave_workers)(void *), uint32_t total_events, > +launch_workers_and_wait(int (*main_worker)(void *), > + int (*workers)(void *), uint32_t total_events, > uint8_t nb_workers, uint8_t sched_type) > { > uint8_t port = 0; > @@ -537,9 +537,9 @@ launch_workers_and_wait(int (*master_worker)(void *), > > w_lcore = rte_get_next_lcore( > /* start core */ -1, > - /* skip master */ 1, > + /* skip main */ 1, > /* wrap */ 0); > - rte_eal_remote_launch(master_worker, ¶m[0], w_lcore); > + rte_eal_remote_launch(main_worker, ¶m[0], w_lcore); > > for (port = 1; port < nb_workers; port++) { > param[port].total_events = &atomic_total_events; > @@ -548,7 +548,7 @@ launch_workers_and_wait(int (*master_worker)(void *), > param[port].dequeue_tmo_ticks = dequeue_tmo_ticks; > rte_smp_wmb(); > w_lcore = rte_get_next_lcore(w_lcore, 1, 0); > - rte_eal_remote_launch(slave_workers, ¶m[port], w_lcore); > + rte_eal_remote_launch(workers, ¶m[port], w_lcore); > } > > ret = wait_workers_to_join(w_lcore, &atomic_total_events); > diff --git a/drivers/event/octeontx/ssovf_evdev_selftest.c b/drivers/event/octeontx/ssovf_evdev_selftest.c > index 239362fcf549..7a2b7ded259c 100644 > --- a/drivers/event/octeontx/ssovf_evdev_selftest.c > +++ b/drivers/event/octeontx/ssovf_evdev_selftest.c > @@ -601,8 +601,8 @@ wait_workers_to_join(int lcore, const rte_atomic32_t *count) > > > static inline int > -launch_workers_and_wait(int (*master_worker)(void *), > - int (*slave_workers)(void *), uint32_t total_events, > +launch_workers_and_wait(int (*main_worker)(void *), > + int (*worker)(void *), uint32_t total_events, > uint8_t nb_workers, uint8_t sched_type) > { > uint8_t port = 0; > @@ -637,9 +637,9 @@ launch_workers_and_wait(int (*master_worker)(void *), > > w_lcore = rte_get_next_lcore( > /* start core */ -1, > - /* skip master */ 1, > + /* skip main */ 1, > /* wrap */ 0); > - rte_eal_remote_launch(master_worker, ¶m[0], w_lcore); > + rte_eal_remote_launch(main_worker, ¶m[0], w_lcore); > > for (port = 1; port < nb_workers; port++) { > param[port].total_events = &atomic_total_events; > @@ -648,7 +648,7 @@ launch_workers_and_wait(int (*master_worker)(void *), > param[port].dequeue_tmo_ticks = dequeue_tmo_ticks; > rte_smp_wmb(); > w_lcore = rte_get_next_lcore(w_lcore, 1, 0); > - rte_eal_remote_launch(slave_workers, ¶m[port], w_lcore); > + rte_eal_remote_launch(worker, ¶m[port], w_lcore); > } > > ret = wait_workers_to_join(w_lcore, &atomic_total_events); > diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c > index 38c21fa0fa3d..6dfbdd308310 100644 > --- a/drivers/event/sw/sw_evdev_selftest.c > +++ b/drivers/event/sw/sw_evdev_selftest.c > @@ -3108,7 +3108,7 @@ worker_loopback(struct test *t, uint8_t disable_implicit_release) > > p_lcore = rte_get_next_lcore( > /* start core */ -1, > - /* skip master */ 1, > + /* skip main */ 1, > /* wrap */ 0); > w_lcore = rte_get_next_lcore(p_lcore, 1, 0); > > diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c > index f7f6ee804960..aeb6cb6150d8 100644 > --- a/drivers/net/bnxt/bnxt_ring.c > +++ b/drivers/net/bnxt/bnxt_ring.c > @@ -429,7 +429,7 @@ int bnxt_alloc_rxtx_nq_ring(struct bnxt *bp) > if (!BNXT_HAS_NQ(bp) || bp->rxtx_nq_ring) > return 0; > > - socket_id = rte_lcore_to_socket_id(rte_get_master_lcore()); > + socket_id = rte_lcore_to_socket_id(rte_get_main_lcore()); > > nqr = rte_zmalloc_socket("nqr", > sizeof(struct bnxt_cp_ring_info), > @@ -820,7 +820,7 @@ int bnxt_alloc_async_ring_struct(struct bnxt *bp) > if (BNXT_NUM_ASYNC_CPR(bp) == 0) > return 0; > > - socket_id = rte_lcore_to_socket_id(rte_get_master_lcore()); > + socket_id = rte_lcore_to_socket_id(rte_get_main_lcore()); > > cpr = rte_zmalloc_socket("cpr", > sizeof(struct bnxt_cp_ring_info), > diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c > index a230a9684028..8af545d6a2ea 100644 > --- a/drivers/net/mvpp2/mrvl_ethdev.c > +++ b/drivers/net/mvpp2/mrvl_ethdev.c > @@ -814,7 +814,7 @@ mrvl_flush_bpool(struct rte_eth_dev *dev) > unsigned int core_id = rte_lcore_id(); > > if (core_id == LCORE_ID_ANY) > - core_id = rte_get_master_lcore(); > + core_id = rte_get_main_lcore(); > > hif = mrvl_get_hif(priv, core_id); > > @@ -1623,7 +1623,7 @@ mrvl_fill_bpool(struct mrvl_rxq *rxq, int num) > > core_id = rte_lcore_id(); > if (core_id == LCORE_ID_ANY) > - core_id = rte_get_master_lcore(); > + core_id = rte_get_main_lcore(); > > hif = mrvl_get_hif(rxq->priv, core_id); > if (!hif) > @@ -1773,7 +1773,7 @@ mrvl_rx_queue_release(void *rxq) > unsigned int core_id = rte_lcore_id(); > > if (core_id == LCORE_ID_ANY) > - core_id = rte_get_master_lcore(); > + core_id = rte_get_main_lcore(); > > if (!q) > return; > diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c > index 44a8692f5cdc..2c59397e0412 100644 > --- a/drivers/net/qede/base/bcm_osal.c > +++ b/drivers/net/qede/base/bcm_osal.c > @@ -143,7 +143,7 @@ void *osal_dma_alloc_coherent(struct ecore_dev *p_dev, > snprintf(mz_name, sizeof(mz_name), "%lx", > (unsigned long)rte_get_timer_cycles()); > if (core_id == (unsigned int)LCORE_ID_ANY) > - core_id = rte_get_master_lcore(); > + core_id = rte_get_main_lcore(); > socket_id = rte_lcore_to_socket_id(core_id); > mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, > RTE_MEMZONE_IOVA_CONTIG, RTE_CACHE_LINE_SIZE); > @@ -182,7 +182,7 @@ void *osal_dma_alloc_coherent_aligned(struct ecore_dev *p_dev, > snprintf(mz_name, sizeof(mz_name), "%lx", > (unsigned long)rte_get_timer_cycles()); > if (core_id == (unsigned int)LCORE_ID_ANY) > - core_id = rte_get_master_lcore(); > + core_id = rte_get_main_lcore(); > socket_id = rte_lcore_to_socket_id(core_id); > mz = rte_memzone_reserve_aligned(mz_name, size, socket_id, > RTE_MEMZONE_IOVA_CONTIG, align); > diff --git a/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h > index 6eec43b22b13..fe31be68dca3 100644 > --- a/drivers/net/softnic/rte_eth_softnic_internals.h > +++ b/drivers/net/softnic/rte_eth_softnic_internals.h > @@ -547,7 +547,7 @@ TAILQ_HEAD(pipeline_list, pipeline); > #endif > > /** > - * Master thead: data plane thread context > + * Main thread: data plane thread context > */ > struct softnic_thread { > struct rte_ring *msgq_req; > diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c > index dcfb5eb82c18..a8c26a5b2377 100644 > --- a/drivers/net/softnic/rte_eth_softnic_thread.c > +++ b/drivers/net/softnic/rte_eth_softnic_thread.c > @@ -18,14 +18,14 @@ > #include "rte_eth_softnic_internals.h" > > /** > - * Master thread: data plane thread init > + * Main thread: data plane thread init > */ > void > softnic_thread_free(struct pmd_internals *softnic) > { > uint32_t i; > > - RTE_LCORE_FOREACH_SLAVE(i) { > + RTE_LCORE_FOREACH_WORKER(i) { > struct softnic_thread *t = &softnic->thread[i]; > > /* MSGQs */ > @@ -78,7 +78,7 @@ softnic_thread_init(struct pmd_internals *softnic) > return -1; > } > > - /* Master thread records */ > + /* Main thread records */ > t->msgq_req = msgq_req; > t->msgq_rsp = msgq_rsp; > t->service_id = UINT32_MAX; > @@ -99,7 +99,7 @@ softnic_thread_init(struct pmd_internals *softnic) > static inline int > thread_is_valid(struct pmd_internals *softnic, uint32_t thread_id) > { > - if (thread_id == rte_get_master_lcore()) > + if (thread_id == rte_get_main_lcore()) > return 0; /* FALSE */ > > if (softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_SERVICE)) > @@ -209,7 +209,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, > @@ -243,7 +243,7 @@ struct thread_msg_rsp { > }; > > /** > - * Master thread > + * Main thread > */ > static struct thread_msg_req * > thread_msg_alloc(void) > @@ -587,7 +587,7 @@ thread_msg_handle(struct softnic_thread_data *t) > } > > /** > - * Master thread & data plane threads: message passing > + * Main thread & data plane threads: message passing > */ > enum pipeline_req_type { > /* Port IN */ > @@ -753,7 +753,7 @@ struct pipeline_msg_rsp { > }; > > /** > - * Master thread > + * Main thread > */ > static struct pipeline_msg_req * > pipeline_msg_alloc(void) > -- > 2.27.0 >