DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v2 1/1] eal: add internal function to get base address
@ 2022-01-17 13:30 Srikanth Yalavarthi
  2022-01-18 12:35 ` Ray Kinsella
  0 siblings, 1 reply; 2+ messages in thread
From: Srikanth Yalavarthi @ 2022-01-17 13:30 UTC (permalink / raw)
  To: Ray Kinsella; +Cc: dev, jerinj, sshankarnara, Srikanth Yalavarthi

Added an internal helper to get OS-specific EAL mappping base addreess

This helper can be used by the drivers to map host address range with
offload devices and would be need for device specific operations like
firmware load

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---

v2:
* Dropped Change-Id

 lib/eal/common/eal_common_config.c | 7 +++++++
 lib/eal/include/rte_eal.h          | 9 +++++++++
 lib/eal/version.map                | 1 +
 3 files changed, 17 insertions(+)

diff --git a/lib/eal/common/eal_common_config.c b/lib/eal/common/eal_common_config.c
index 1c4c4dd585..cec4991d96 100644
--- a/lib/eal/common/eal_common_config.c
+++ b/lib/eal/common/eal_common_config.c
@@ -87,3 +87,10 @@ rte_eal_has_pci(void)
 {
 	return !internal_config.no_pci;
 }
+
+/* Get the EAL base address */
+uint64_t
+rte_eal_get_baseaddr(void)
+{
+	return eal_get_baseaddr();
+}
diff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h
index 5a34a6acd9..29298c3c83 100644
--- a/lib/eal/include/rte_eal.h
+++ b/lib/eal/include/rte_eal.h
@@ -475,6 +475,15 @@ rte_eal_mbuf_user_pool_ops(void);
 const char *
 rte_eal_get_runtime_dir(void);
 
+/**
+ * Get the OS-specific EAL base address.
+ *
+ * @return
+ *    The base address.
+ */
+__rte_internal
+uint64_t rte_eal_get_baseaddr(void);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/eal/version.map b/lib/eal/version.map
index ab28c22791..b53eeb30d7 100644
--- a/lib/eal/version.map
+++ b/lib/eal/version.map
@@ -425,6 +425,7 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
+	rte_eal_get_baseaddr;
 	rte_firmware_read;
 	rte_intr_allow_others;
 	rte_intr_cap_multiple;
-- 
2.17.1


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

* Re: [PATCH v2 1/1] eal: add internal function to get base address
  2022-01-17 13:30 [PATCH v2 1/1] eal: add internal function to get base address Srikanth Yalavarthi
@ 2022-01-18 12:35 ` Ray Kinsella
  0 siblings, 0 replies; 2+ messages in thread
From: Ray Kinsella @ 2022-01-18 12:35 UTC (permalink / raw)
  To: Srikanth Yalavarthi; +Cc: dev, jerinj, sshankarnara


Srikanth Yalavarthi <syalavarthi@marvell.com> writes:

> Added an internal helper to get OS-specific EAL mappping base addreess

mapping
address

>
> This helper can be used by the drivers to map host address range with
> offload devices and would be need for device specific operations like
> firmware load
>
> Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
> ---
>
> v2:
> * Dropped Change-Id
>
>  lib/eal/common/eal_common_config.c | 7 +++++++
>  lib/eal/include/rte_eal.h          | 9 +++++++++
>  lib/eal/version.map                | 1 +
>  3 files changed, 17 insertions(+)
>
> diff --git a/lib/eal/common/eal_common_config.c b/lib/eal/common/eal_common_config.c
> index 1c4c4dd585..cec4991d96 100644
> --- a/lib/eal/common/eal_common_config.c
> +++ b/lib/eal/common/eal_common_config.c
> @@ -87,3 +87,10 @@ rte_eal_has_pci(void)
>  {
>  	return !internal_config.no_pci;
>  }
> +
> +/* Get the EAL base address */
> +uint64_t
> +rte_eal_get_baseaddr(void)
> +{
> +	return eal_get_baseaddr();
> +}
> diff --git a/lib/eal/include/rte_eal.h b/lib/eal/include/rte_eal.h
> index 5a34a6acd9..29298c3c83 100644
> --- a/lib/eal/include/rte_eal.h
> +++ b/lib/eal/include/rte_eal.h
> @@ -475,6 +475,15 @@ rte_eal_mbuf_user_pool_ops(void);
>  const char *
>  rte_eal_get_runtime_dir(void);
>  
> +/**
> + * Get the OS-specific EAL base address.
> + *
> + * @return
> + *    The base address.
> + */
> +__rte_internal
> +uint64_t rte_eal_get_baseaddr(void);
> +
>  #ifdef __cplusplus
>  }
>  #endif
> diff --git a/lib/eal/version.map b/lib/eal/version.map
> index ab28c22791..b53eeb30d7 100644
> --- a/lib/eal/version.map
> +++ b/lib/eal/version.map
> @@ -425,6 +425,7 @@ EXPERIMENTAL {
>  INTERNAL {
>  	global:
>  
> +	rte_eal_get_baseaddr;
>  	rte_firmware_read;
>  	rte_intr_allow_others;
>  	rte_intr_cap_multiple;

Acked-by: Ray Kinsella <mdr@ashroe.eu>

-- 
Regards, Ray K

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

end of thread, other threads:[~2022-01-18 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 13:30 [PATCH v2 1/1] eal: add internal function to get base address Srikanth Yalavarthi
2022-01-18 12:35 ` Ray Kinsella

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).