Hi, 2016-07-27 16:14, Alex Williamson: > I took a quick look at the dpdk vfio code and spotted an invalid > assumption that should probably be corrected ASAP.
It can theoretically be a bug but the value may never change in the kernel, right? So when you say ASAP, I feel it can wait the next DPDK release (we plan to release today). Do you agree? > That is: > > lib/librte_eal/linuxapp/eal/eal_vfio.h: > #define VFIO_GET_REGION_ADDR(x) ((uint64_t) x << 40ULL) > #define VFIO_GET_REGION_IDX(x) (x >> 40) > > Region offset to index is an implementation detail of the kernel, the > vfio API defines that the offset of a given region (BAR) is found via > the offset field of struct vfio_region_info returned via the > VFIO_DEVICE_GET_REGION_INFO ioctl. You're free to cache the offset > into any sort of local variable you like, but the kernel may change the > implementation of region index to offset at any point in time. This is > explicitly not part of the ABI. Is there a place to file a bug, or is > this sufficient? Thanks, Thanks for the report. This email is sufficient :)