From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 860196A87 for ; Thu, 12 Mar 2015 12:04:56 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 12 Mar 2015 04:03:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,388,1422950400"; d="scan'208";a="664225125" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.23]) by orsmga001.jf.intel.com with SMTP; 12 Mar 2015 04:04:53 -0700 Received: by (sSMTP sendmail emulation); Thu, 12 Mar 2015 11:04:52 +0025 Date: Thu, 12 Mar 2015 11:04:52 +0000 From: Bruce Richardson To: Tetsuya Mukawa 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 Content-Disposition: inline In-Reply-To: <1426155474-1596-8-git-send-email-mukawa@igel.co.jp> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 07/15] eal: Fix interface of pci_map_resource() of bsdapp X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 11:04:57 -0000 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