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

Lance Richardson lance.richardson at broadcom.com
Fri May 7 23:35:20 CEST 2021


On Fri, May 7, 2021 at 4:51 PM Dmitry Kozlyuk <dmitry.kozliuk at gmail.com> wrote:
>
> 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?

Good point. %llx made sense for off_t.

Thanks,
    Lance


More information about the stable mailing list