[dpdk-stable] [dpdk-dev] [PATCH v4] eal: fix memory mapping for 32-bit targets
Thomas Monjalon
thomas at monjalon.net
Tue May 11 22:45:41 CEST 2021
11/05/2021 18:08, Dmitry Kozlyuk:
> 2021-05-11 11:56 (UTC-0400), Lance Richardson:
> > > 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?
>
> I'm for uint64_t: it's explicit and will hardly ever change.
OK, v3 applied.
More information about the stable
mailing list