On Thu, Mar 12, 2015 at 07:17:46PM +0900, Tetsuya Mukawa wrote: > The function is implemented in both linuxapp and bsdapp, but interface > is different. The patch fixes the function of bsdapp to do same as > linuxapp. After applying it, file descriptor should be opened and > closed out of pci_map_resource(). > > Signed-off-by: Tetsuya Mukawa <mukawa at igel.co.jp> > --- > lib/librte_eal/bsdapp/eal/eal_pci.c | 117 > +++++++++++++++++++----------- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 5 +- > 2 files changed, 78 insertions(+), 44 deletions(-) > > diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c > b/lib/librte_eal/bsdapp/eal/eal_pci.c > index bd0f8cd..c92c624 100644 > --- a/lib/librte_eal/bsdapp/eal/eal_pci.c > +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c
...<snip>... > - "%s(): cannot mmap(%s(%d), %p, 0x%lx, 0x%lx):" > - " %s (%p)\n", __func__, devname, fd, requested_addr, > + "%s(): cannot mmap(%d, %p, 0x%lx, 0x%lx): %s (%p)\n", > + __func__, fd, requested_addr, > (unsigned long)size, (unsigned long)offset, > strerror(errno), mapaddr); > - goto fail; > + } else { > + RTE_LOG(DEBUG, EAL, " PCI memory mapped at %p\n", mapaddr); > } Coding style for DPDK is not to put braces around single-line blocks. /Bruce