On 13-Apr-18 12:39 AM, Thomas Monjalon wrote:
12/04/2018 16:13, Burakov, Anatoly:
On 12-Apr-18 2:34 PM, Shahaf Shuler wrote:
a compilation error occurred when compiling with CONFIG_RTE_EAL_VFIO=n
== Build lib/librte_eal/linuxapp/eal
/download/dpdk/lib/librte_eal/linuxapp/eal/eal_vfio.c:1535:1: error: no
previous prototype for 'rte_vfio_dma_map' [-Werror=missing-prototypes]
rte_vfio_dma_map(uint64_t __rte_unused vaddr, __rte_unused uint64_t
/download/dpdk/lib/librte_eal/linuxapp/eal/eal_vfio.c:1542:1: error: no
previous prototype for 'rte_vfio_dma_unmap' [-Werror=missing-prototypes]
rte_vfio_dma_unmap(uint64_t __rte_unused vaddr, uint64_t __rte_unused
As there is no use for those dummy functions without VFIO removing them
These functions are part of public API, like rest of functions in this
header. They're in the map file. Should we perhaps go the BSD way and
provide EAL with dummy prototypes as well? See bsdapp/eal/eal.c:763 onwards.
Why using dummy prototypes?
Because the prototypes in rte_vfio.h are under #ifdef VFIO_PRESENT ?
Is it possible to always define the prototypes in rte_vfio.h ?
Well, technically, yes, we could. There is one function that uses a
VFIO-specific struct definition:
int rte_vfio_setup_device(const char *sysfs_base, const char *dev_addr,
int *vfio_dev_fd, struct vfio_device_info *device_info);
I'm sure we can work around that.