From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 4348B7CCC for ; Fri, 2 Jun 2017 11:27:39 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jun 2017 02:27:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,284,1493708400"; d="scan'208";a="975946651" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.42]) by orsmga003.jf.intel.com with SMTP; 02 Jun 2017 02:27:36 -0700 Received: by (sSMTP sendmail emulation); Fri, 02 Jun 2017 10:27:35 +0100 Date: Fri, 2 Jun 2017 10:27:35 +0100 From: Bruce Richardson To: santosh Cc: thomas@monjalon.net, dev@dpdk.org, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com Message-ID: <20170602092735.GA51388@bricha3-MOBL3.ger.corp.intel.com> References: <20170524161101.22863-1-santosh.shukla@caviumnetworks.com> <79f1e8ae-d2cc-e49e-a17d-73c7185b26f8@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <79f1e8ae-d2cc-e49e-a17d-73c7185b26f8@caviumnetworks.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.1 (2017-04-11) Subject: Re: [dpdk-dev] [RFC] eal/memory: introducing an option to set iova as va 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: , X-List-Received-Date: Fri, 02 Jun 2017 09:27:40 -0000 On Fri, Jun 02, 2017 at 09:54:46AM +0530, santosh wrote: > Ping? > > On Wednesday 24 May 2017 09:41 PM, Santosh Shukla wrote: > > > Some NPU hardware like OCTEONTX follows push model to get > > the packet from the pktio device. Where packet allocation > > and freeing done by the HW. Since HW can operate only on > > IOVA with help of SMMU/IOMMU, When packet receives from the > > Ethernet device, It is the IOVA address(which is PA in existing scheme). > > > > Mapping IOVA as PA is expensive on those HW, where every > > packet needs to be converted to VA from PA/IOVA. > > > > This patch proposes the scheme where the user can set IOVA > > as VA by using an eal command line argument. That helps to > > avoid costly lookup for VA in SW by leveraging the SMMU > > translation feature. > > > > Signed-off-by: Santosh Shukla > > --- Hi, I agree this is a problem that needs to be solved, but this doesn't look like a particularly future-proofed solution. Given that we should use the IOMMU on as many platforms as possible for protection, we probably need to find an automatic way for DPDK to use IO addresses correctly. Is this therefore better done as part of the VFIO and UIO-specific code in EAL - as that is the part that knows how the memory mapping is done, and in the VFIO case, what address ranges were programmed in. The mempool driver was something else I considered but it is probably too high a level to implement this. So, in short, I don't particularly like this solution, but I could live with it as a short-term option. Longer term though, I think we need a better way to support using IO addresses rather than physical addresses - I just don't know what that would look like or where it would sit/live. /Bruce