Enable users the option to call rte_vfio_dma_map with request to map
to the default vfio fd.
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
``rte_service_attr_get()`` has been changed
from ``uint32_t *`` to ``uint64_t *``.
``rte_service_attr_get()`` has been changed
from ``uint32_t *`` to ``uint64_t *``.
+* vfio: Functions ``rte_vfio_container_dma_map`` and
+ ``rte_vfio_container_dma_unmap`` have been extended with an option to
+ request mapping or un-mapping to the default vfio container fd.
+
#endif /* VFIO_PRESENT */
#endif /* VFIO_PRESENT */
+#define RTE_VFIO_DEFAULT_CONTAINER_FD (-1)
+
/**
* Setup vfio_cfg for the device identified by its address.
* It discovers the configured I/O MMU groups or sets a new one for the device.
/**
* Setup vfio_cfg for the device identified by its address.
* It discovers the configured I/O MMU groups or sets a new one for the device.
* Perform DMA mapping for devices in a container.
*
* @param container_fd
* Perform DMA mapping for devices in a container.
*
* @param container_fd
- * the specified container fd
+ * the specified container fd. Use RTE_VFIO_DEFAULT_CONTAINER_FD to
+ * use the default container.
*
* @param vaddr
* Starting virtual address of memory to be mapped.
*
* @param vaddr
* Starting virtual address of memory to be mapped.
* Perform DMA unmapping for devices in a container.
*
* @param container_fd
* Perform DMA unmapping for devices in a container.
*
* @param container_fd
- * the specified container fd
+ * the specified container fd. Use RTE_VFIO_DEFAULT_CONTAINER_FD to
+ * use the default container.
*
* @param vaddr
* Starting virtual address of memory to be unmapped.
*
* @param vaddr
* Starting virtual address of memory to be unmapped.