From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bruce Richardson Subject: Re: [PATCH v2 07/15] eal: Fix interface of pci_map_resource() of bsdapp Date: Thu, 12 Mar 2015 11:04:52 +0000 Message-ID: <20150312110452.GB10100@bricha3-MOBL3> References: <1425438703-18895-1-git-send-email-mukawa@igel.co.jp> <1426155474-1596-1-git-send-email-mukawa@igel.co.jp> <1426155474-1596-8-git-send-email-mukawa@igel.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev-VfR2kkLFssw@public.gmane.org To: Tetsuya Mukawa Return-path: Content-Disposition: inline In-Reply-To: <1426155474-1596-8-git-send-email-mukawa-AlSX/UN32fvPDbFq/vQRIQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 > --- > 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 ...... > - "%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