[dpdk-dev] [PATCH] eal: fix memory mapping for 32-bit targets

2021-05-08 Thread 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 m

Re: [dpdk-dev] [PATCH] eal: fix memory mapping for 32-bit targets

2021-05-07 Thread Lance Richardson
> Windows compilation is failing in CI, apparently Windows doesn't > understand "off_t". > > Should we add an "rte_off_t" definition for non-POSIX portability? On second thought, it's probably better to simply use uint64_t.

Re: [dpdk-dev] [PATCH] eal: fix memory mapping for 32-bit targets

2021-05-07 Thread Lance Richardson
On Fri, May 7, 2021 at 2:10 PM Lance Richardson wrote: > > 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 off_t > instead, which is usually a 64-bit type when compiled with

[dpdk-dev] [PATCH] eal: fix memory mapping for 32-bit targets

2021-05-07 Thread 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 off_t instead, which is usually a 64-bit type when compiled with _D_FILE_OFFSET_BITS=64 as is the case for DPDK. Found when attemp