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 DEF3D45B96; Mon, 21 Oct 2024 23:30:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A6BEC402F2; Mon, 21 Oct 2024 23:30:26 +0200 (CEST) Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) by mails.dpdk.org (Postfix) with ESMTP id B8AE0402F1 for ; Mon, 21 Oct 2024 23:30:25 +0200 (CEST) Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id 3DB45138022B; Mon, 21 Oct 2024 17:30:25 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Mon, 21 Oct 2024 17:30:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1729546225; x=1729632625; bh=kDLCcrY41g9+kHVv/66ocDGmaKNtpo1O/mtiMjLc6lM=; b= z5i3GSkpD0m8hcsFeqgJCwyQdNBgAuG1CF5yx6r/nU59hcooNEG+wHqFpox3oZyU /uwquVcfhP3bnoNXdo2kQgW6Pvpv1opZJO6ibBJ7PzgWrqbrXmpG5kpbBomQW+bQ MssnM4PbTrsf/z0m1wWDBxXHnRCNgmrjFg9+j05weqe03DuN5egqfdicVi6jfTp4 TOH0CT+VtFxbvccuBy9ZCJUinYx1u9RcvED8bpyZHwPzwuRitIjMJhpGREkKfExi c55gkCkPhtbAc74aS3fjpr59Uy/yHU8jrqzoX7RfHItttTKiPhAol+3zCZ6nWGTX /M+P+cZBE+hhrBQhYDsdMw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1729546225; x= 1729632625; bh=kDLCcrY41g9+kHVv/66ocDGmaKNtpo1O/mtiMjLc6lM=; b=M 6hMnTAp/pQnYMW+yjauppEoMK4lwef7g3EvRemF+HfMaclP4tbvp9oJp7z/INRFI bv5UFim7rvL8QgUKWpp+YX3SAYuCM78odglisUsWeW1IQN0ddvJhKNt8cXdxPftO Sb+TNP3LIKLsSVRGCpeO6qHNU0AHO6TbzCs5MjarAHE2bGk6qbYKGT0Vv61EiGV8 RiojwG2BnR0XEIp3sO5UiEMQwCga9GZsg8ZdQdVM47tSgE2DQCRAyMIG9DppnS7i jtpTvT7NrGNU0+LPlrmY2L+21x8FefEUOVcvFqExpm+utyUswq73VoqXnV6SQ1gZ csRKpiG9obJHWPkh2EBQw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehledgudeivdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttdej necuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjh grlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepjeduveehieevuddutdevfffgtdeg keeuveejffejgedtgeegkefgvdeugfefkeejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdp nhgspghrtghpthhtohepuddupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgrg hkhhhilhesmhgrrhhvvghllhdrtghomhdprhgtphhtthhopeguvghvseguphgukhdrohhr ghdprhgtphhtthhopegurghvihgurdhmrghrtghhrghnugesrhgvughhrghtrdgtohhmpd hrtghpthhtohephhgvmhgrnhhtrdgrghhrrgifrghlsehngihprdgtohhmpdhrtghpthht ohepjhgvrhhinhhjsehmrghrvhgvlhhlrdgtohhmpdhrtghpthhtohephhhkrghlrhgrse hmrghrvhgvlhhlrdgtohhmpdhrtghpthhtohepshhtvghphhgvnhesnhgvthifohhrkhhp lhhumhgsvghrrdhorhhgpdhrtghpthhtohepsghruhgtvgdrrhhitghhrghrughssehinh htvghlrdgtohhmpdhrtghpthhtohepshgrtghhihhnrdhsrgigvghnrgesohhsshdrnhig phdrtghomh X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Oct 2024 17:30:23 -0400 (EDT) From: Thomas Monjalon To: Akhil Goyal Cc: dev@dpdk.org, david.marchand@redhat.com, hemant.agrawal@nxp.com, jerinj@marvell.com, hkalra@marvell.com, Stephen Hemminger , Bruce Richardson , Hemant Agrawal , Sachin Saxena , Ferruh Yigit Subject: Re: [PATCH v3 3/9] raw/cnxk_rvu_lf: add PMD API to get BAR addresses Date: Mon, 21 Oct 2024 23:30:21 +0200 Message-ID: <86546386.BzKH3j3Lxt@thomas> In-Reply-To: <20241008184915.1356089-4-gakhil@marvell.com> References: <20241008105415.1026962-1-gakhil@marvell.com> <20241008184915.1356089-1-gakhil@marvell.com> <20241008184915.1356089-4-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 08/10/2024 20:49, Akhil Goyal: > Added rte_pmd_rvu_lf_bar_get() API to get BAR address > for application to configure hardware. In my opinion, we should not return PCI BAR addresses to an application. We should make an effort to have all theses details managed in the driver. Giving this level of access to an app is a door we should probably not open. > +/** > + * Get BAR addresses for the RVU LF device. > + * > + * @param dev_id > + * device id of RVU LF device > + * @param bar_num > + * BAR number for which address is required > + * @param[out] va > + * Virtual address of the BAR. 0 if not mapped > + * @param[out] mask > + * BAR address mask, 0 if not mapped > + * > + * @return > + * Returns 0 on success, negative error code otherwise > + */ > +__rte_experimental > +int rte_pmd_rvu_lf_bar_get(uint8_t dev_id, uint8_t bar_num, size_t *va, size_t *mask); The cover letter does not talk about this. The announced features are: " - Register mailbox callbacks for the other side to process mailboxes. - Register interrupt handler callbacks. - Process mailbox. - Set range of message IDs allowed for communication. " Having mailbox, callbacks and message IDs is perfectly fine. It should not be needed to get PCI BARs for this purpose. Maybe a level of abstraction is needed here. Also I feel mailbox messaging is something we could make generic in rte_device. As you may understand, I'm not a big fan of how the feature is implemented in this series.