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

Thomas Monjalon thomas at monjalon.net
Tue May 11 09:55:47 CEST 2021


10/05/2021 18:04, Lance Richardson:
> On Mon, May 10, 2021 at 11:55 AM Thomas Monjalon <thomas at monjalon.net>
> wrote:
> 
> > 10/05/2021 17:31, Burakov, Anatoly:
> > > On 10-May-21 1:42 PM, Thomas Monjalon wrote:
> > > > +Cc Anatoly
> > > >
> > > > 08/05/2021 16:27, 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 map resource(63, 0xc0010000, \
> > > >>      0x200000, 0x20000000000): Invalid argument ((nil))
> > > >>
> > > >> Fixes: c4b89ecb64ea ("eal: introduce memory management wrappers")
> > > >> Cc: stable at dpdk.org
> > > >> Signed-off-by: Lance Richardson <lance.richardson at broadcom.com>
> > > >> ---
> > >
> > > LGTM, although the Fixes: tag is probably wrong because IIRC previous
> > > versions did have the same issue.
> >
> > What should be the right Fixes tag Anatoly?
> >
> 
> I think this would be more appropriate (prior to this commit,
> pci_map_resource()
> called mmap() directly with off_t offset, with this commit offset was
> narrowed
> to size_t before calling mmap()):
> 
> Fixes: 2fd3567e5425 ("pci: use OS generic memory mapping functions")

That's only one usage of rte_mem_map.
I prefer the original Fixes: line.




More information about the stable mailing list