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 828B241CEC; Mon, 20 Feb 2023 16:40:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 771AD4308A; Mon, 20 Feb 2023 16:40:48 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 7F4F043088 for ; Mon, 20 Feb 2023 16:40:46 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 1A4D13200D08; Mon, 20 Feb 2023 10:40:44 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 20 Feb 2023 10:40:44 -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=fm1; t=1676907643; x= 1676994043; bh=SPP0wRTE35jPhwV1Yy2kAfgf9qONzjqekVdzfn+DJIM=; b=I kFahK/PGOr9+fuYehbNuyuZkCWQ+xu6NyNcMfjiElH3wHvMvvnIVY4AHoXmyAXR0 SjnsMJu2qtMepEH3Bo2RCpiGgRg0CyRpqTyzY2Ks/q0DzG4USpuAJP1k1HR5v823 ngqFpQaetLQRNzVHUUwy8QVYcq0VaaRG59BKyehIhxGGOU1vu8mxu+Hgf4nacx61 wZENKyUobQvdN2dTGp9HaFtkcJQco4kMSb+DW0fjn4z741FQvdKVacMU6/g6zsIn HgzkaJXbDG3Mb4iQl04+A3OxbM2EO7PlWnkutwXVSiKaZKH3HzYSjjjCFrWrATtS XLfimamosJplO6504sZ1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id: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=fm1; t=1676907643; x= 1676994043; bh=SPP0wRTE35jPhwV1Yy2kAfgf9qONzjqekVdzfn+DJIM=; b=m IQqpUd15z7sCT/+2bLsJ6pnN4doMpGxkU07WRLG6YUay2+SV13CeKwKmONqPmIi7 QJT5CFGrngcv8GtjLCO82gTBg9IzO2SBXtMB/kCHpoLbioAFARq5wf1DhhZicK1Y fOx8QpbzDRHHcJyfFJ69is5Vjgvti4+3w6Cqm52aimRVSJBZO6F/IPyFT6PP3N5m xOdQE9waB3CKDa2ZfJeZM4+XvbakVmUWqCgzrFdyp8Sl3CBXajuIzxAmfpnbNUnp nP3/GLtZ9qF7n41Zr7Te9VupswoKvhR1YQv0TRFvZpmaXarRZKl1YZi3j0+QG/dY WKWucfYEskzybogvKnxug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejhedgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeefhfejleeuvdevtddutdeutdevhfeijeethfffueejhfetuddu vedtkedtieekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 20 Feb 2023 10:40:42 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: Morten =?ISO-8859-1?Q?Br=F8rup?= , Chengwen Feng , Ruifeng Wang , dev@dpdk.org, nd , ferruh.yigit@amd.com, Dongdong Liu , Yisen Zhuang Subject: Re: [PATCH] net/hns3: support disable IOVA as PA mode Date: Mon, 20 Feb 2023 16:40:41 +0100 Message-ID: <2007794.0S5aU1g85B@thomas> In-Reply-To: References: <20230214071141.50155-1-fengchengwen@huawei.com> <24304924.kmuVQn2iE0@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 20/02/2023 16:35, Bruce Richardson: > On Mon, Feb 20, 2023 at 04:30:20PM +0100, Thomas Monjalon wrote: > > 20/02/2023 16:07, Morten Br=F8rup: > > > With the new viewing angle, the current define RTE_IOVA_AS_PA makes m= ore sense to me now than before. So we should probably stick with it, rathe= r than introduce something that might confuse developers who already have t= he same viewing angle. > > >=20 > > > But it still seems counterintuitive to me that disabling some feature= ("enable_iova_as_pa") is not supported throughout DPDK; the logic seems in= verted. Apparently, it also makes it difficult to assign good titles to pat= ches that support disabling such a feature. :-) > > >=20 > > > > > > On the positive side, since everything supports this "enable_iova_as_= pa" feature, we don't need to add it to the PMD feature list. If the logic = wasn't inverted like this, the PMD feature list should probably reflect whi= ch PMDs supported the "iova_as_va_only" compile time option. ;-) > > > > >=20 > > That's a change I would like to do: > > The Meson variable in the drivers should be "support_iova_as_va" > > and would mean we can compile the driver when "enable_iova_as_pa" is fa= lse. > >=20 > All drivers (that I am aware of) support iova_as_va. What is missing is > drivers supporting "iova_as_va_only". Any reference to va without the word > "only" on it will be misleading. >=20 > A third way of looking at it, is to work with the fact that the reason > drivers require changes to support this "va_only" mode, ro no-pa mode, is > due to the fact that the mbuf no longer tracks iovas and only VAs. > Therefore, we can have a variable called "require_iova_in_mbuf", which > would hopefully cut through this whole va vs pa addition/subtraction mess. > What do you think? Yes "require_iova_in_mbuf" describes better the reality, so it is simpler to understand.