raw/cnxk_bphy: extend PF function address access

Allows retrieval of SSO and NPA pffunc addresses without
device ownership and initialization.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Acked-by: Tomasz Duszynski <tduszynski@marvell.com>
This commit is contained in:
Jakub Palider 2022-10-14 21:45:34 +02:00 committed by Thomas Monjalon
parent 16de054160
commit c22752e678
2 changed files with 39 additions and 0 deletions

View File

@ -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)
{

View File

@ -862,6 +862,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