DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] raw/cnxk_bphy: extend pffunc address access
@ 2022-10-14 19:45 jpalider
  2022-10-17  8:40 ` Tomasz Duszynski
  0 siblings, 1 reply; 3+ messages in thread
From: jpalider @ 2022-10-14 19:45 UTC (permalink / raw)
  To: Jakub Palider, Tomasz Duszynski; +Cc: dev

From: Jakub Palider <jpalider@marvell.com>

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

Signed-off-by: Jakub Palider <jpalider@marvell.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] raw/cnxk_bphy: extend pffunc address access
  2022-10-14 19:45 [PATCH] raw/cnxk_bphy: extend pffunc address access jpalider
@ 2022-10-17  8:40 ` Tomasz Duszynski
  2022-10-26 21:21   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Duszynski @ 2022-10-17  8:40 UTC (permalink / raw)
  To: Jakub Palider, Jakub Palider; +Cc: dev, Jerin Jacob Kollanukkaran

[-- Attachment #1: Type: text/plain, Size: 2492 bytes --]

> -----Original Message-----
> From: jpalider@marvell.com <jpalider@marvell.com>
> Sent: Friday, October 14, 2022 9:46 PM
> To: Jakub Palider <jpalider@marvell.com>; Tomasz Duszynski <tduszynski@marvell.com>
> Cc: dev@dpdk.org
> Subject: [PATCH] raw/cnxk_bphy: extend pffunc address access
> 
> From: Jakub Palider <jpalider@marvell.com>
> 
> Allows retrieval of SSO and NPA pffunc addresses without device ownership and initialization.
> 
> Signed-off-by: Jakub Palider <jpalider@marvell.com>
> ---
>  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

Looks good. 
Acked-by: Tomasz Duszynski <tduszynski@marvell.com>


[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 14760 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] raw/cnxk_bphy: extend pffunc address access
  2022-10-17  8:40 ` Tomasz Duszynski
@ 2022-10-26 21:21   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2022-10-26 21:21 UTC (permalink / raw)
  To: Jakub Palider; +Cc: dev, Jerin Jacob Kollanukkaran, Tomasz Duszynski

> > Allows retrieval of SSO and NPA pffunc addresses without device ownership and initialization.
> > 
> > Signed-off-by: Jakub Palider <jpalider@marvell.com>
> 
> Looks good. 
> Acked-by: Tomasz Duszynski <tduszynski@marvell.com>

Applied, thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-26 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 19:45 [PATCH] raw/cnxk_bphy: extend pffunc address access jpalider
2022-10-17  8:40 ` Tomasz Duszynski
2022-10-26 21:21   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).