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 0AB22A00C5; Wed, 2 Feb 2022 15:19:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C23940688; Wed, 2 Feb 2022 15:19:26 +0100 (CET) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id 6A41540141 for ; Wed, 2 Feb 2022 15:19:24 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 06F433202348; Wed, 2 Feb 2022 09:19:22 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 02 Feb 2022 09:19:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=iYfWGqrASjLkJW T2Ja3LKM5AHc6hUOk8AkEXTcNAf7w=; b=MJu5ENeBB+Z9iRxQJGyGXxdwBGwO5S 03doE8YsRjRriUt4BdgKBMCIDiLvmvmZWdMf4SnZScFbU/K2XpPqv4s1SxBpdM9d OuSKBDViJggsMbIBUPpb0VLIpLivgwRlJoSCyn/dpZcq02nkcM0cq9/AZ+9CK6g6 c3GYK+3kIhv6QCTOKgWBvr/Oo1B6b4/ijCLFiGowfbEFHehOAviorxCY5V68b9yh JaCGCSVrVMuVtXu8mXjltPxXEq9hY53JVhB8o+pSUwFwAZw4Qlbdl9HO+RUsnCZQ dVKtb+gFybGpnCinS1rTC0n1cUrpC3punqwRFWGoO7M2ACWfvse9S6Xw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=iYfWGqrASjLkJWT2Ja3LKM5AHc6hUOk8AkEXTcNAf 7w=; b=YpAFdPY3kCEtPOpFAHESzzNCMwImX1iFT1hTxu1yrF9Tcyq5ZssMzHzPB tGGUMx9h+706G3+FfcMR/T8UUjHRbmTt+EQAccolMPA0r5zm9ya/JIF3mlwl1ryR dH3aRX3WRLMPFljYkIxleOMePYy0uZ8Zmu5ST9S78LX5K6OPmPcNYH9zbUBfLsGs q4mKYMh5ySBfQb+0Hk9tMC4Njp1KMyYLq1J50+TV2TB4aNtnJJmEc5poRaFfbOu/ 4iNU55a7q432SRAncW5Az25I1Re9Hf/YKt3AJgUuYRyo1nGZ+FFj1Qft5Jkj8ITN A5xCErJfh8QQh8XeTSApU2a7nJ4Tw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrgeehgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Feb 2022 09:19:21 -0500 (EST) From: Thomas Monjalon To: dmitry.kozliuk@gmail.com, anatoly.burakov@intel.com Cc: Ray Kinsella , dev@dpdk.org, jerinj@marvell.com, sshankarnara@marvell.com, Srikanth Yalavarthi Subject: Re: [PATCH v5 1/1] eal: add internal function to get base address Date: Wed, 02 Feb 2022 15:19:19 +0100 Message-ID: <5769425.alqRGMn8q6@thomas> In-Reply-To: <20220118133340.25225-1-syalavarthi@marvell.com> References: <20220117112228.32572-1-syalavarthi@marvell.com> <20220118133340.25225-1-syalavarthi@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 Dmitry, Anatoly, any new comment on this v5? 18/01/2022 14:33, Srikanth Yalavarthi: > Added an internal helper to get OS-specific EAL mapping base address > > This helper can be used by the drivers to program offload / accelerator > devices, where the base address can be used as a reference address by > the accelerator to access the host memory > > An address can also be represented as an offset relative to the base > address using smaller data types > > Signed-off-by: Srikanth Yalavarthi > --- > lib/eal/common/eal_common_config.c | 9 +++++++++ > lib/eal/include/rte_eal.h | 9 +++++++++ > lib/eal/version.map | 1 + > 3 files changed, 19 insertions(+) > > diff --git a/lib/eal/common/eal_common_config.c b/lib/eal/common/eal_common_config.c > index 1c4c4dd585..19598cb28d 100644 > --- a/lib/eal/common/eal_common_config.c > +++ b/lib/eal/common/eal_common_config.c > @@ -87,3 +87,12 @@ rte_eal_has_pci(void) > { > return !internal_config.no_pci; > } > + > +/* Get the EAL base address */ > +uint64_t > +rte_eal_get_baseaddr(void) > +{ > + return (internal_config.base_virtaddr != 0) ? > + (uint64_t) internal_config.base_virtaddr : > + 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; >