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 D2C95A00C2; Fri, 14 Oct 2022 21:45:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76132400D4; Fri, 14 Oct 2022 21:45:45 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 32FFC4003C for ; Fri, 14 Oct 2022 21:45:43 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29EHchwk028398 for ; Fri, 14 Oct 2022 12:45:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=VaaCtFVTGJCkSwFFuzf5p+KuONkOyFv77rfTa6NDx2c=; b=M3b8WxGHv5+msgE7ivGKPflpqmwgFx94MUAoebxrIaHQhaL7pmWpTvnmFWkt0E6XSXQx M9pZmAR4kaeRRnV1f3YpXMGD8Ij1LvBiWRR/o8T47WMRPIn+oB/1yKLlvMkGH2rVAKN4 95PCKgark/sUwM7KztEnOfvXUe0t2ZPVoxobJJinMiDcjO/7T3l7A7jC5AjdoYiWwDn0 D4Lf8zQrnBqvmfTHbWeUgOBgYnvRiSoGBw1hsd3YQyZGai1tzJoKr/2+sAZUb91C0Ujw prx24M8lD9xb8DGA61XWaaBlxR1KtFpQWAkM2+LeJbbmETsZt9KUouhabjntMYckUvI2 5w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3k6fwvf576-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 14 Oct 2022 12:45:40 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 14 Oct 2022 12:45:38 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 14 Oct 2022 12:45:38 -0700 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id A08C33F7062; Fri, 14 Oct 2022 12:45:37 -0700 (PDT) From: To: Jakub Palider , Tomasz Duszynski CC: Subject: [PATCH] raw/cnxk_bphy: extend pffunc address access Date: Fri, 14 Oct 2022 21:45:34 +0200 Message-ID: <20221014194534.907000-1-jpalider@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: jks2vbmS4LfSA2hNKASGDeKofBfilTKo X-Proofpoint-ORIG-GUID: jks2vbmS4LfSA2hNKASGDeKofBfilTKo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-14_10,2022-10-14_01,2022-06-22_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: Jakub Palider Allows retrieval of SSO and NPA pffunc addresses without device ownership and initialization. Signed-off-by: Jakub Palider --- drivers/raw/cnxk_bphy/cnxk_bphy.c | 16 ++++++++++++++++ drivers/raw/cnxk_bphy/rte_pmd_bphy.h | 23 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c index 349d551839..62d138110a 100644 --- a/drivers/raw/cnxk_bphy/cnxk_bphy.c +++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c @@ -41,6 +41,22 @@ bphy_test_handler_fn(int irq_num, void *isr_data) test[irq_num].handled_data = *((int *)isr_data); } +int +rte_pmd_bphy_npa_pf_func_get_rmt(uint16_t *pf_func) +{ + *pf_func = roc_bphy_npa_pf_func_get(); + + return 0; +} + +int +rte_pmd_bphy_sso_pf_func_get_rmt(uint16_t *pf_func) +{ + *pf_func = roc_bphy_sso_pf_func_get(); + + return 0; +} + static int bphy_rawdev_selftest(uint16_t dev_id) { diff --git a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h index 643fd9945f..b5c01811ea 100644 --- a/drivers/raw/cnxk_bphy/rte_pmd_bphy.h +++ b/drivers/raw/cnxk_bphy/rte_pmd_bphy.h @@ -864,6 +864,29 @@ rte_pmd_bphy_cgx_cpri_mode_misc(uint16_t dev_id, uint16_t lmac, return __rte_pmd_bphy_enq_deq(dev_id, lmac, &msg, NULL, 0); } +/** + * Obtain NPA PF func + * + * @param pf_func + * Address of an NPA PF and function for NPA free pointer + * requests to obtain + * + * @return + * Returns 0 on success, negative error code otherwise + */ +int rte_pmd_bphy_npa_pf_func_get_rmt(uint16_t *pf_func); + +/** + * Obtain SSO PF func + * + * @param pf_func + * Address SSO PF and function for SSO add-work requests to obtain + * + * @return + * Returns 0 on success, negative error code otherwise + */ +int rte_pmd_bphy_sso_pf_func_get_rmt(uint16_t *pf_func); + #ifdef __cplusplus } #endif -- 2.25.1