DPDK patches and discussions
 help / color / mirror / Atom feed
From: Srikanth Yalavarthi <syalavarthi@marvell.com>
To: Ray Kinsella <mdr@ashroe.eu>
Cc: <dev@dpdk.org>, <jerinj@marvell.com>, <sshankarnara@marvell.com>,
	"Srikanth Yalavarthi" <syalavarthi@marvell.com>
Subject: [PATCH v3 1/1] eal: add internal function to get base address
Date: Mon, 17 Jan 2022 05:38:57 -0800	[thread overview]
Message-ID: <20220117133857.19698-1-syalavarthi@marvell.com> (raw)
In-Reply-To: <20220117112228.32572-1-syalavarthi@marvell.com>

Added an internal helper to get OS-specific EAL mapping base 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>
Change-Id: I19eec79e46066e3b08896d84ce3f3cb15a59c124
---
 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


  reply	other threads:[~2022-01-17 13:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 11:22 [PATCH " Srikanth Yalavarthi
2022-01-17 13:38 ` Srikanth Yalavarthi [this message]
2022-01-17 13:42 ` [PATCH v4 " Srikanth Yalavarthi
2022-01-17 14:43   ` Dmitry Kozlyuk
2022-01-18  5:29     ` [EXT] " Srikanth Yalavarthi
2022-01-18  9:40       ` Dmitry Kozlyuk
2022-01-18 13:33 ` [PATCH v5 " Srikanth Yalavarthi
2022-02-02 14:19   ` Thomas Monjalon
2022-02-04 19:28   ` Dmitry Kozlyuk
2022-02-08 17:15   ` Burakov, Anatoly
2022-02-08 22:58     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220117133857.19698-1-syalavarthi@marvell.com \
    --to=syalavarthi@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=mdr@ashroe.eu \
    --cc=sshankarnara@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).