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

Lance Richardson lance.richardson at broadcom.com
Tue May 11 17:56:20 CEST 2021


>  v4: Identical to v1, with <sys/types.h> now included in rte_eal_paging.h
>      to (hopefully) make off_t available for Windows builds.

With this version, using off_t is no longer a problem, however based on the
new compilation error it appears that for Windows, off_t is a 32-bit type
while size_t is a 64-bit type:

../lib/eal/windows/eal_memory.c:519:37: error: shift count >= width of
type [-Werror,-Wshift-count-overflow]
DWORD offset_high = (DWORD)(offset >> 32);
^  ~~

So the options seem to be to either use uint64_t for the offset parameter
as in patch v3, or else introduce something like:
     typedef uint64_t rte_off_t;

Thoughts/opinions?


More information about the dev mailing list