From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 80088454A7; Mon, 24 Jun 2024 08:32:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28FF14042F; Mon, 24 Jun 2024 08:31:37 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 406CD4027B for ; Mon, 24 Jun 2024 08:24:17 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45NMe8IU025560 for ; Sun, 23 Jun 2024 23:24:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=F 9Qc9z2CHV/xfwfzvr+jja5tzDz5xLn+Og8k8z9Zrfo=; b=Atxa0HF5mjnaudMCk YHonpfZms5+GkTV8YUBkSJ6aE4ZN14mDcK5euuQoi9VFar2gC2GyEHo6tx2QnMkP U42YNdqV2WkfsPBu4srNMXvNsoumB71Jx4Psn4g4rFxY9RZFCU6C9DLTS/b59aa2 L6KRUMu03UcSx/QEEn0B3Nr+JmEk8evenTLSqUx5wN4+CnNye3ET4zFHsgQBCTUc ZJGqN+2/mBtRVXCBHv6zk4b1H6DKSaR5jqI42Ap3M0ad2/owMHRoJTpueVqLbzDw oM3WEu+9mKimISVQWEpzvBdOmTQUQZEoX0WLMkvZ2Z1xE/0o5hCatJTemeb8ZZGs m4Xyg== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ywx4gbp74-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 23 Jun 2024 23:24:16 -0700 (PDT) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sun, 23 Jun 2024 23:24:15 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Sun, 23 Jun 2024 23:24:15 -0700 Received: from localhost.localdomain (unknown [10.28.36.177]) by maili.marvell.com (Postfix) with ESMTP id 0B01B3F7040; Sun, 23 Jun 2024 23:24:11 -0700 (PDT) From: Aakash Sasidharan To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra CC: , , , , , Subject: [PATCH v2 03/12] common/cnxk: make inline dev PF func get as idev API Date: Mon, 24 Jun 2024 11:53:52 +0530 Message-ID: <20240624062401.4143606-4-asasidharan@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240624062401.4143606-1-asasidharan@marvell.com> References: <20240620145848.3461844-1-asasidharan@marvell.com> <20240624062401.4143606-1-asasidharan@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: x9xwWd5IzIghug9nX9F4xqeiU6bdjcM0 X-Proofpoint-ORIG-GUID: x9xwWd5IzIghug9nX9F4xqeiU6bdjcM0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-24_05,2024-06-21_01,2024-05-17_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Anoob Joseph Inline PF FUNC would be required to set SSO_PF_FUNC in the instruction for cryptodev Rx inject. Move the API to idev to allow usage of the same. Signed-off-by: Anoob Joseph --- drivers/common/cnxk/roc_idev.c | 6 ++++++ drivers/common/cnxk/roc_idev.h | 2 ++ drivers/common/cnxk/roc_nix_inl.h | 1 - drivers/common/cnxk/roc_nix_inl_dev.c | 6 ------ drivers/common/cnxk/version.map | 2 +- drivers/net/cnxk/cn10k_ethdev_sec.c | 2 +- drivers/net/cnxk/cnxk_ethdev_telemetry.c | 3 +-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/common/cnxk/roc_idev.c b/drivers/common/cnxk/roc_idev.c index d0307c666c..0778d51d1e 100644 --- a/drivers/common/cnxk/roc_idev.c +++ b/drivers/common/cnxk/roc_idev.c @@ -374,3 +374,9 @@ roc_idev_nix_rx_chan_set(uint16_t port, uint16_t chan) if (idev != NULL && port < PLT_MAX_ETHPORTS) __atomic_store_n(&idev->inl_rx_inj_cfg.chan[port], chan, __ATOMIC_RELEASE); } + +uint16_t +roc_idev_nix_inl_dev_pffunc_get(void) +{ + return nix_inl_dev_pffunc_get(); +} diff --git a/drivers/common/cnxk/roc_idev.h b/drivers/common/cnxk/roc_idev.h index 00664eaed6..fc0f7db54e 100644 --- a/drivers/common/cnxk/roc_idev.h +++ b/drivers/common/cnxk/roc_idev.h @@ -27,4 +27,6 @@ uint8_t __roc_api roc_idev_nix_rx_inject_get(uint16_t port); void __roc_api roc_idev_nix_rx_inject_set(uint16_t port, uint8_t enable); uint16_t *__roc_api roc_idev_nix_rx_chan_base_get(void); void __roc_api roc_idev_nix_rx_chan_set(uint16_t port, uint16_t chan); + +uint16_t __roc_api roc_idev_nix_inl_dev_pffunc_get(void); #endif /* _ROC_IDEV_H_ */ diff --git a/drivers/common/cnxk/roc_nix_inl.h b/drivers/common/cnxk/roc_nix_inl.h index ab0965e512..1a4bf8808c 100644 --- a/drivers/common/cnxk/roc_nix_inl.h +++ b/drivers/common/cnxk/roc_nix_inl.h @@ -112,7 +112,6 @@ void __roc_api roc_nix_inl_dev_lock(void); void __roc_api roc_nix_inl_dev_unlock(void); int __roc_api roc_nix_inl_dev_xaq_realloc(uint64_t aura_handle); int __roc_api roc_nix_inl_dev_stats_get(struct roc_nix_stats *stats); -uint16_t __roc_api roc_nix_inl_dev_pffunc_get(void); int __roc_api roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso); int __roc_api roc_nix_inl_dev_cpt_release(void); bool __roc_api roc_nix_inl_dev_is_multi_channel(void); diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c index 60e6a43033..e2bbe3a67b 100644 --- a/drivers/common/cnxk/roc_nix_inl_dev.c +++ b/drivers/common/cnxk/roc_nix_inl_dev.c @@ -34,12 +34,6 @@ nix_inl_dev_pffunc_get(void) return 0; } -uint16_t -roc_nix_inl_dev_pffunc_get(void) -{ - return nix_inl_dev_pffunc_get(); -} - static void nix_inl_selftest_work_cb(uint64_t *gw, void *args, uint32_t soft_exp_event) { diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index eac2ea9ff8..f98738d07e 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -112,6 +112,7 @@ INTERNAL { roc_idev_npa_nix_get; roc_idev_num_lmtlines_get; roc_idev_nix_inl_meta_aura_get; + roc_idev_nix_inl_dev_pffunc_get; roc_idev_nix_list_get; roc_idev_nix_rx_chan_base_get; roc_idev_nix_rx_chan_set; @@ -244,7 +245,6 @@ INTERNAL { roc_nix_inl_dev_is_probed; roc_nix_inl_dev_stats_get; roc_nix_inl_dev_lock; - roc_nix_inl_dev_pffunc_get; roc_nix_inl_dev_rq; roc_nix_inl_dev_rq_get; roc_nix_inl_dev_rq_put; diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c index b8b0da5ea9..5e509e97d4 100644 --- a/drivers/net/cnxk/cn10k_ethdev_sec.c +++ b/drivers/net/cnxk/cn10k_ethdev_sec.c @@ -1360,7 +1360,7 @@ cn10k_eth_sec_rx_inject_config(void *device, uint16_t port_id, bool enable) inj_cfg->io_addr = inl_lf->io_addr; inj_cfg->lmt_base = nix->lmt_base; channel = roc_nix_get_base_chan(nix); - pf_func = roc_nix_inl_dev_pffunc_get(); + pf_func = roc_idev_nix_inl_dev_pffunc_get(); inj_cfg->cmd_w0 = pf_func << 48 | inj_match_id << 32 | channel << 4; return 0; diff --git a/drivers/net/cnxk/cnxk_ethdev_telemetry.c b/drivers/net/cnxk/cnxk_ethdev_telemetry.c index 3027ca4735..a1958185f2 100644 --- a/drivers/net/cnxk/cnxk_ethdev_telemetry.c +++ b/drivers/net/cnxk/cnxk_ethdev_telemetry.c @@ -65,8 +65,7 @@ ethdev_tel_handle_info(const char *cmd __rte_unused, info = ð_info.info; dev = cnxk_eth_pmd_priv(eth_dev); if (dev) { - info->inl_dev_pf_func = - roc_nix_inl_dev_pffunc_get(); + info->inl_dev_pf_func = roc_idev_nix_inl_dev_pffunc_get(); info->pf_func = roc_nix_get_pf_func(&dev->nix); info->max_mac_entries = dev->max_mac_entries; info->dmac_filter_ena = dev->dmac_filter_enable; -- 2.25.1