[PATCH v1 4/4] bus/pci: add VFIO sparse mmap support

Xia, Chenbo chenbo.xia at intel.com
Mon May 22 05:42:34 CEST 2023


Hi Stephen,

> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Monday, May 15, 2023 11:53 PM
> To: Li, Miao <miao.li at intel.com>
> Cc: dev at dpdk.org; skori at marvell.com; thomas at monjalon.net;
> david.marchand at redhat.com; ferruh.yigit at amd.com; Xia, Chenbo
> <chenbo.xia at intel.com>; Cao, Yahui <yahui.cao at intel.com>; Burakov, Anatoly
> <anatoly.burakov at intel.com>
> Subject: Re: [PATCH v1 4/4] bus/pci: add VFIO sparse mmap support
> 
> On Mon, 15 May 2023 06:47:00 +0000
> Miao Li <miao.li at intel.com> wrote:
> 
> > +				map_addr = pci_map_resource(addr, vfio_dev_fd,
> > +					bar->offset + sparse->offset, sparse->size,
> > +					RTE_MAP_FORCE_ADDRESS);
> > +				if (map_addr == NULL) {
> > +					munmap(bar_addr, bar->size);
> > +					RTE_LOG(ERR, EAL, "Failed to map pci
> BAR%d\n",
> > +						bar_index);
> 
> If mmap() fails then printing errno would help diagnose why.

Thanks for your review! It seems errno will be printed in function
pci_map_resource() when mmap() fails. So I guess we don't need it here?

Thanks,
Chenbo



More information about the dev mailing list