From mboxrd@z Thu Jan 1 00:00:00 1970 From: Santosh Shukla Subject: [PATCH v2 01/12] eal/pci: introduce PCI driver iova as va flag Date: Mon, 10 Jul 2017 11:42:24 +0000 Message-ID: <20170710114235.18970-2-santosh.shukla@caviumnetworks.com> References: <20170608110513.22548-1-santosh.shukla@caviumnetworks.com> <20170710114235.18970-1-santosh.shukla@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain Cc: bruce.richardson@intel.com, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com, gaetan.rivet@6wind.com, sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com, stephen@networkplumber.org, maxime.coquelin@redhat.com, olivier.matz@6wind.com, Santosh Shukla To: thomas@monjalon.net, dev@dpdk.org Return-path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0042.outbound.protection.outlook.com [104.47.36.42]) by dpdk.org (Postfix) with ESMTP id 03C277CAF for ; Mon, 10 Jul 2017 13:43:45 +0200 (CEST) In-Reply-To: <20170710114235.18970-1-santosh.shukla@caviumnetworks.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Introducing RTE_PCI_DRV_NEED_IOVA_VA flag. Flag used when driver needs to operate in iova=va mode. Why driver need iova=va mapping? On NPU style co-processors like Octeontx, the buffer recycling has been done in HW, unlike SW model. Here is the data flow: 1) On control path, Fill the HW mempool with buffers(iova as pa address) 2) on rx_burst, HW gives you IOVA address(iova as pa address) 3) As application expects VA to operate on it, rx_burst() needs to convert to _va from _pa. Which is very expensive. Instead of that if iova as va mapping, we can avoid the cost of converting with help of IOMMU/SMMU. Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob --- lib/librte_eal/common/include/rte_pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 8b123391c..ac79040dd 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -202,6 +202,8 @@ struct rte_pci_bus { #define RTE_PCI_DRV_INTR_RMV 0x0010 /** Device driver needs to keep mapped resources if unsupported dev detected */ #define RTE_PCI_DRV_KEEP_MAPPED_RES 0x0020 +/** Device driver needs iova as va */ +#define RTE_PCI_DRV_NEED_IOVA_VA 0X0040 /** * A structure describing a PCI mapping. -- 2.13.0