From patchwork Wed Jul 1 20:23:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 72670 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 21445A0350; Wed, 1 Jul 2020 22:25:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A25C11D585; Wed, 1 Jul 2020 22:24:18 +0200 (CEST) Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) by dpdk.org (Postfix) with ESMTP id A8FEA1D560 for ; Wed, 1 Jul 2020 22:24:15 +0200 (CEST) Received: by mail-pf1-f193.google.com with SMTP id u5so11482464pfn.7 for ; Wed, 01 Jul 2020 13:24: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=HfnmXZXh3bGBw/B/5Wx3sUTDIvXrpYdLmyIxCPqtVko=; b=md9r381eITHwsMidlfugcY2pXlJYSz53J8epwiLxxrNuO9vB+kvxynP2+HQ/XOU9Fg Vv9o+O47SEfDw/wYgyaRIGeT4p+ZkTVdox6pSAPIa8hZtpHRUf61DNNBqvl5GUMUtrdQ YvIb9ligkOtgLz3i+0rqY2XFGA3WJHN/JQx1K/nTdjf1G4N7epFJaxVyg/yxJ3mpPK1y qDbcm8kW8tSlSxj8+87xmquJzdhZJdrh5QTCcFJe8lpQeKORI3VTG1l4+WgG98EhUNNF bXr19utdp3KYy0Zbn7gO0EIYlahev5bNyAU1T82nnWwN3MW1EqXNP3SWDSpwSZklItoC XCqw== 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=HfnmXZXh3bGBw/B/5Wx3sUTDIvXrpYdLmyIxCPqtVko=; b=hgGkPHZWlny6H9o3TBLL2bQ6VHSWi6kzmaJFig3IWL5q+nhgI0IAGTE1h9bKi6xDYJ szT7D2nzz6//iBbDhObFWtcOr/RNNlXh0umfSBUNK8CVbzzq7cc4CH7H322cIpLdWppV 63rFYBaJvBdhPMnhDvQqc73yCGeRgmdRZPFmtt3Up00JIfQg5EcT4oCCxXhdXr44GOoG 2aI2Tppw7njcvBMG77kZfMcg+3u8FjPQFMbHm1S4jCfwI09L1IdMEZyMi84AlRHF0pwc CA+kNj8pBpJbG1PBuvl2KWzvz6WE2nLehY+WRyMZ4FDBHDqH+gKSVA8dPiCiVYfIWGvC 3E9w== X-Gm-Message-State: AOAM531rVuvR1VvSCBijmVGnWGCKdBuP+DgscQ/vjsWUM60NZqOCXBxe LU71MowXEVMV/WUmAvLiN652BoV4pPw= X-Google-Smtp-Source: ABdhPJzSiwRhNCOuyURhxs+rqQXJO3DHUJ0giV+nvEyO9si2Wft8vPjMxOabJ/GtNZ13zrOcIxoJzA== X-Received: by 2002:a62:7714:: with SMTP id s20mr24007286pfc.270.1593635054408; Wed, 01 Jul 2020 13:24: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 g8sm6584803pgr.70.2020.07.01.13.24.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 13:24:13 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Wed, 1 Jul 2020 13:23:37 -0700 Message-Id: <20200701202359.17006-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200701202359.17006-1-stephen@networkplumber.org> References: <20200604210200.25405-1-stephen@networkplumber.org> <20200701202359.17006-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 05/27] drivers: replace master/slave terminology 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" Replace rte_get_master_lcore() with rte_get_initial_lcore(). Replace RTE_LCORE_FOREACH_SLAVE with RTE_LCORE_FOREACH_WORKER Signed-off-by: Stephen Hemminger Reviewed-by: Anatoly Burakov --- drivers/bus/dpaa/dpaa_bus.c | 2 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 6 +++--- 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_thread.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 591e28c1e709..81d62b02428f 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -260,7 +260,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_initial_lcore(); else if (lcore >= RTE_MAX_LCORE) return -1; diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index 21c535f2fbad..d498161fe427 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -195,7 +195,7 @@ dpaa2_configure_stashing(struct dpaa2_dpio_dev *dpio_dev, int lcoreid) /* Set the Stashing Destination */ if (lcoreid < 0) { - lcoreid = rte_get_master_lcore(); + lcoreid = rte_get_initial_lcore(); if (lcoreid < 0) { DPAA2_BUS_ERR("Getting CPU Index failed"); return -1; @@ -259,7 +259,7 @@ dpaa2_affine_qbman_swp(void) uint64_t tid = syscall(SYS_gettid); if (lcore_id == LCORE_ID_ANY) - lcore_id = rte_get_master_lcore(); + lcore_id = rte_get_initial_lcore(); /* if the core id is not supported */ else if (lcore_id >= RTE_MAX_LCORE) return -1; @@ -307,7 +307,7 @@ dpaa2_affine_qbman_ethrx_swp(void) uint64_t tid = syscall(SYS_gettid); if (lcore_id == LCORE_ID_ANY) - lcore_id = rte_get_master_lcore(); + lcore_id = rte_get_initial_lcore(); /* if the core id is not supported */ else if (lcore_id >= RTE_MAX_LCORE) return -1; diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c index 24a947f27823..b649e3317ea1 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_initial_lcore()); nqr = rte_zmalloc_socket("nqr", sizeof(struct bnxt_cp_ring_info), @@ -819,7 +819,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_initial_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 9037274327b1..4ffd81d903c4 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -816,7 +816,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_initial_lcore(); hif = mrvl_get_hif(priv, core_id); @@ -1620,7 +1620,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_initial_lcore(); hif = mrvl_get_hif(rxq->priv, core_id); if (!hif) @@ -1770,7 +1770,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_initial_lcore(); if (!q) return; diff --git a/drivers/net/qede/base/bcm_osal.c b/drivers/net/qede/base/bcm_osal.c index 54e5e4f98159..8ecbf82c5e7c 100644 --- a/drivers/net/qede/base/bcm_osal.c +++ b/drivers/net/qede/base/bcm_osal.c @@ -112,7 +112,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_initial_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); @@ -151,7 +151,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_initial_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_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index dcfb5eb82c18..a2b6f522427a 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -25,7 +25,7 @@ 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 */ @@ -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_initial_lcore()) return 0; /* FALSE */ if (softnic->params.sc && rte_lcore_has_role(thread_id, ROLE_SERVICE))