From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH 00/10] Infrastructure to detect iova mapping on the bus Date: Wed, 5 Jul 2017 11:30:37 +0200 Message-ID: <59355fcd-0da3-9625-8a0c-dc8c4d44c127@redhat.com> References: <20170608110513.22548-1-santosh.shukla@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, gaetan.rivet@6wind.com To: Santosh Shukla , thomas@monjalon.net, bruce.richardson@intel.com, dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 308CC2A58 for ; Wed, 5 Jul 2017 11:30:44 +0200 (CEST) In-Reply-To: <20170608110513.22548-1-santosh.shukla@caviumnetworks.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 06/08/2017 01:05 PM, Santosh Shukla wrote: > Q) Why do we need such infrastructure? > > A) 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 patchset proposes the method to autodetect the preferred > IOVA mode for a device. Summary of IOVA scheme: > - If all the devices are iommu capable and support IOMMU > capable driver then selects IOVA_VA. > - If any of the devices are non-iommu then use default IOVA > scheme ie. IOVA_PA. > - If no device found then IOVA scheme would be > IOVA_DC (Don't care). Isn't it possible to have a per-device granularity? For example, with virt case, having a physical NIC using VFIO with iommu, and virtio devices with noiommu. If the physical NIC prefers working with VAs, why forcing it to use PAs? Maybe I missed a limitation though. Cheers, Maxime