On Tue, May 11, 2021 at 4:18 AM Thomas Monjalon wrote: > > 08/05/2021 16:27, Lance Richardson: > > For 32-bit targets, size_t is normally a 32-bit type and > > does not have sufficient range to represent 64-bit offsets > > that can are needed when mapping PCI addresses. Use uint64_t > > instead. > > > > Found when attempting to run 32-bit Linux dpdk-testpmd > > using VFIO driver: > > > > EAL: pci_map_resource(): cannot map resource(63, 0xc0010000, \ > > 0x200000, 0x20000000000): Invalid argument ((nil)) > > > > Fixes: c4b89ecb64ea ("eal: introduce memory management wrappers") > > Cc: stable@dpdk.org > > Signed-off-by: Lance Richardson > > --- > > v3: Use PRIx64 instead of llx to format offset in log message. > > v2: Use uint64_t instead of off_t (off_t is unknown to Windows). > > off_t is referenced in drivers/bus/pci/windows/pci.c > (for unused parameter) so it should be fine? > If not, we could add it? v1 of the patch had the following build error in CI: *Build Failed #1: OS: WIN10-64 Target: x86_64-windows-clang FAILED: lib/librte_eal.a.p/eal_common_eal_common_fbarray.c.obj .... In file included from ../lib/eal/common/eal_common_fbarray.c:14: ..\lib\eal\include\rte_eal_paging.h:64:10: error: unknown type name 'off_t' int fd, off_t offset);