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 C816AA00C3; Tue, 18 Jan 2022 13:35:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54FF942716; Tue, 18 Jan 2022 13:35:52 +0100 (CET) Received: from mail-108-mta32.mxroute.com (mail-108-mta32.mxroute.com [136.175.108.32]) by mails.dpdk.org (Postfix) with ESMTP id 99F504068E for ; Tue, 18 Jan 2022 13:35:50 +0100 (CET) Received: from filter004.mxroute.com ([149.28.56.236] filter004.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta32.mxroute.com (ZoneMTA) with ESMTPSA id 17e6d2fac13000bdf2.001 for (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256); Tue, 18 Jan 2022 12:35:47 +0000 X-Zone-Loop: 48c51eb308a2323715333e57bed3c805bb041ba0cbe6 X-Originating-IP: [149.28.56.236] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ashroe.eu; s=x; h=Content-Type:MIME-Version:Message-ID:Date:In-reply-to:Subject:Cc:To: From:References:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tyKPpQvnxbf35E1DrndjNvYB17Wg76ebLQJ8l9sTD+8=; b=YV6Z764bHFIwuNJLljqPHgOJXY DltsReIkQifhSjJeAdyx6zuMI34n3g0u7Qpg8y+6DaDxQ21vNMLVJZBnHhm9NnKfLFXQFBR//J3tt vmoJmekHS61B+vJHeebGdflUOwmUNELgBpqEmg70KNBJbOBgR6vd8lJ/VsATXeWruOkoF3HNe50dF NSvUDMsKdtqw+udLyL84lMd3AJis1q4DhquDx5jiPymvz98gWX2x+SVuuif92XVYkSxCRzuM4mlQG OE5n+HjqJioY9RPSiQ0QX2iCZ6sL7n5rVdHzM6HsU1x57zwRS86BOz1E0OhmsFa2Gj+mIGBcAyaoj di0tXSgA==; References: <20220117133023.12768-1-syalavarthi@marvell.com> User-agent: mu4e 1.4.15; emacs 27.1 From: Ray Kinsella To: Srikanth Yalavarthi Cc: dev@dpdk.org, jerinj@marvell.com, sshankarnara@marvell.com Subject: Re: [PATCH v2 1/1] eal: add internal function to get base address In-reply-to: <20220117133023.12768-1-syalavarthi@marvell.com> Date: Tue, 18 Jan 2022 07:35:43 -0500 Message-ID: <87h7a1z0f4.fsf@mdr78.vserver.site> MIME-Version: 1.0 Content-Type: text/plain X-AuthUser: mdr@ashroe.eu X-Zone-Spam-Resolution: no action X-Zone-Spam-Status: No, score=-0.1, required=15, tests=[ARC_NA=0, FROM_HAS_DN=0, RCPT_COUNT_THREE=0, TO_DN_SOME=0, MIME_GOOD=-0.1, FROM_EQ_ENVFROM=0, MIME_TRACE=0, RCVD_COUNT_ZERO=0, NEURAL_SPAM=0] 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 Srikanth Yalavarthi 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 > --- > > 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 -- Regards, Ray K