On 20-Apr-20 12:09 PM, Li Feng wrote:
Using pread to replace lseek + read.
And add new APIs to reduce open/close/lseek system call frequency when the
user needs to convert a large range of virtual address space.
     - rte_mem_virt2iova_with_fd
     - rte_mem_virt2phy_with_fd

Currently it will be used by spdk in spdk_mem_register.

Signed-off-by: Li Feng <fen...@smartx.com>
---

These API's are IMO already on the verge of what's acceptable because of the differences between PA, DPDK IOVA and external memory IOVA. I'm not sure building on top of them is a good idea. It's also quite platform specific - rte_mem_virt2phy could potentially work with Windows (and in fact there was an RFC for it), but would this API work with Windows, given that Windows doesn't have fd's? Should we perhaps replace fd's with an opaque structure pointer, so that each platform-specific implementation could dereference it the way it needs to, without exposing internal details of the platform?

--
Thanks,
Anatoly

Reply via email to