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

Dmitry Kozlyuk dmitry.kozliuk at gmail.com
Fri May 7 22:51:46 CEST 2021


2021-05-07 15:06 (UTC-0400), Lance Richardson:
[...]
> diff --git a/lib/eal/unix/eal_unix_memory.c b/lib/eal/unix/eal_unix_memory.c
> index ec7156df96..41a94a7511 100644
> --- a/lib/eal/unix/eal_unix_memory.c
> +++ b/lib/eal/unix/eal_unix_memory.c
> @@ -24,14 +24,14 @@
>  
>  static void *
>  mem_map(void *requested_addr, size_t size, int prot, int flags,
> -	int fd, size_t offset)
> +	int fd, uint64_t offset)
>  {
>  	void *virt = mmap(requested_addr, size, prot, flags, fd, offset);
>  	if (virt == MAP_FAILED) {
>  		RTE_LOG(DEBUG, EAL,
> -			"Cannot mmap(%p, 0x%zx, 0x%x, 0x%x, %d, 0x%zx): %s\n",
> -			requested_addr, size, prot, flags, fd, offset,
> -			strerror(errno));
> +			"Cannot mmap(%p, 0x%zx, 0x%x, 0x%x, %d, 0x%llx): %s\n",
> +			requested_addr, size, prot, flags, fd,
> +			(unsigned long long)offset, strerror(errno));

Why not PRIx64?


More information about the dev mailing list