From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 794FBA046B for ; Tue, 23 Jul 2019 09:21:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4D44A1BFA7; Tue, 23 Jul 2019 09:21:40 +0200 (CEST) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 927B11BFA3 for ; Tue, 23 Jul 2019 09:21:38 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 59482431; Tue, 23 Jul 2019 03:21:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 23 Jul 2019 03:21:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=o30jPEzhZXUzLpwemxdHg0so3ydsDjdLKlr/REmU+AU=; b=HVUehmwGbeLD JpQDP+PcaXwiwj4aThv2NFG5jeCkiYa3Q3LdCnJJYArcJmpb6vvUP0RRGSzXq1zp w3cCK2NzBXPaM4NB8b/Kal5U7ZfWckmIt71oiwsbb5HPPfvr3MWeeSsXgC1AvBae 0ZQATr3qyM2ffZFgiUqIVPlI73x3fXc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=o30jPEzhZXUzLpwemxdHg0so3ydsDjdLKlr/REmU+ AU=; b=Z3xHxL3rjVourWMHhTHaBdxEszRJcY0IzP31Sc9yiZIY0/h4CYQ8iPWTE WlvxNN1T6fdwi7H2n+hOX+CSe+1zo4KEbEVfiF8CsYmOc84esnaFtOVKELeuQUQf puzsKCx6HMH70+3MLCPq4RCQqaHhLnw9pBfzRRihAKHxfcdiK6WrfjrLrxjE/9+z mguqXPXDzAj2ze+uL7jnqKg/DEeXT1/XAHYlEVzYLK5WjLrH2MNLMwFlGWwvGq1a Nxjj/N9KWuAPT0QXADsUFV6ZvQZYryWWdy1lVNHYBfgH/70Z8Wo5mUaWyH2h4FcT uokCVXJKXmNw1iPVUMq6Kle3iW8Sg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrjeejgdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 5C6B780063; Tue, 23 Jul 2019 03:21:35 -0400 (EDT) From: Thomas Monjalon To: "Stojaczyk, Dariusz" Cc: Jerin Jacob Kollanukkaran , David Marchand , "Burakov, Anatoly" , "dev@dpdk.org" Date: Tue, 23 Jul 2019 09:21:33 +0200 Message-ID: <7803044.SvP54Un6Iq@xps> In-Reply-To: References: <1562795329-16652-1-git-send-email-david.marchand@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4 0/4] Fixes on IOVA mode selection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 23/07/2019 07:27, Jerin Jacob Kollanukkaran: > From: Stojaczyk, Dariusz > > From: Jerin Jacob Kollanukkaran [mailto:jerinj@marvell.com] > > > From: Stojaczyk, Dariusz > > > > > > > > This introduces a regression where uio-bound devies are attached to > > > > a DPDK app at runtime. Yes it is a regression on purpose. We can also name it a behaviour change (more below). > > > [...] > There reason to choose VA incase if bus detects DC is following: > > - All drivers are expected to work in RTE_IOVA_VA mode, irrespective of > physical address availability. > - By default, the mempool, first asks for IOVA-contiguous memory using > ``RTE_MEMZONE_IOVA_CONTIG``. This is slow in RTE_IOVA_PA mode and it may > affect the application boot time. > - It is easy to enable large amount of IOVA-contiguous memory use-cases > with IOVA in VA mode. > [...] > > The PCI device could have been simply hotplugged to the system after DPDK > > app start. DPDK didn't know about it at initialization, so it picked > > RTE_IOVA_VA and then would fail to attach any UIO-bound device ever > > after: > > > > EAL: Expecting 'PA' IOVA mode but current mode is 'VA', not initializing > > We have RTE_PCI_DRV_NEED_IOVA_AS_VA devices in DPDK, Which can work > Only on VA. If we default 'PA' incase of DC, then what do with hotplugging on those devices? [...] > > > > When there are no devices attached at initialization, the only safe > > > > default should be RTE_IOVA_PA. With RTE_IOVA_VA we just won't be > > > > able to do any DMA to uio-bound PCI devices. As Jerin explained, there is no safe default. There are two cases which cannot work together: 1/ no IOMMU 2/ driver supporting only IOMMU address (named IOVA_AS_VA) In the past we were defaulting to physical addressing, it was in favor of case 1. Now we decided to switch to IOMMU address by default, which is in favor of case 2. As explained above by Jerin, this is considered as an improvement. We should explain this change in the known issues of the release notes. The only real fix would be to allow both addresses at the same time, with separate memory allocators.