Hi,
I will add errno print in patch v3.

> -----Original Message-----
> From: Stephen Hemminger <step...@networkplumber.org>
> Sent: Monday, May 15, 2023 11:53 PM
> To: Li, Miao <miao...@intel.com>
> Cc: dev@dpdk.org; sk...@marvell.com; tho...@monjalon.net;
> david.march...@redhat.com; ferruh.yi...@amd.com; Xia, Chenbo
> <chenbo....@intel.com>; Cao, Yahui <yahui....@intel.com>; Burakov, Anatoly
> <anatoly.bura...@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...@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.

Reply via email to