From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v4 3/6] bus: introduce device level DMA memory mapping Date: Sat, 30 Mar 2019 15:36:49 +0100 Message-ID: <3303376.pHsfKVRZFs@xps> References: <1698312.TEgN2QzQvo@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "anatoly.burakov@intel.com" , Yongseok Koh , "ferruh.yigit@intel.com" , "nhorman@tuxdriver.com" , "gaetan.rivet@6wind.com" To: Shahaf Shuler Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 9A437493D for ; Sat, 30 Mar 2019 15:36:54 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 13/03/2019 12:12, Shahaf Shuler: > From: Thomas Monjalon > > 10/03/2019 09:28, Shahaf Shuler: > > > For PCI bus devices, the pci driver can expose its own map and unmap > > > functions to be used for the mapping. In case the driver doesn't > > > provide any, the memory will be mapped, if possible, to IOMMU through > > VFIO APIs. > > > > > > Application usage with those APIs is quite simple: > > > * allocate memory > > > * call rte_extmem_register on the memory chunk. > > > * take a device, and query its rte_device. > > > * call the device specific mapping function for this device. > > > > Should we make it documented somewhere? > > The full flow to work w/ external memory is documented at doc/guides/prog_guide/env_abstraction_layer.rst , Subchapter "Support for Externally Allocated Memory. > The last commit in series update the right API to use. OK, then I will move this doc update in this patch.