[dpdk-dev] vfio-pci: Fixing type used to unsigned long
Commit Message
From: "Alejandro.Lucero" <alejandro.lucero@netronome.com>
VFIO kernel driver and mmap system call expect offset and size being 64 bits.
Due to this bug BAR index info given to the VFIO driver is always 0 when checking validity of resources mapping.
---
lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -728,7 +728,7 @@ pci_vfio_map_resource(struct rte_pci_device *dev)
struct vfio_region_info reg = { .argsz = sizeof(reg) };
void *bar_addr;
struct memreg {
- uint32_t offset, size;
+ unsigned long offset, size;
} memreg[2] = {};
reg.index = i;