> -----Original Message-----
> From: Thomas Monjalon <tho...@monjalon.net>
> Sent: Wednesday, March 13, 2019 11:56 AM
> To: Shahaf Shuler <shah...@mellanox.com>; anatoly.bura...@intel.com
> Cc: dev@dpdk.org; Yongseok Koh <ys...@mellanox.com>;
> ferruh.yi...@intel.com; nhor...@tuxdriver.com; gaetan.ri...@6wind.com
> Subject: Re: [dpdk-dev] [PATCH v4 3/6] bus: introduce device level DMA
> memory mapping
>
> 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.
>
> > +/**
> > + * Device level DMA map function.
> > + * After a successful call, the memory segment will be mapped to the
> > + * given device.
> > + *
> > + * @note: Memory must be registered in advance using rte_extmem_*
> APIs.
>
> Could we make more explicit that this function is part of the "external
> memory API"?
How do you suggest?
This function belongs to rte_dev therefore the rte_dev prefix. better
rte_dev_extmem_dma_map ?
>
>
[1]
https://patches.dpdk.org/patch/51018/