From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH v3 2/2] eal: populate uio_maps from pci mem_resources array Date: Tue, 24 Feb 2015 13:38:17 +0100 Message-ID: References: <1424703444-30761-1-git-send-email-bruce.richardson@intel.com> <1424780404-30824-1-git-send-email-bruce.richardson@intel.com> <1424780404-30824-3-git-send-email-bruce.richardson@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Bruce Richardson Return-path: In-Reply-To: <1424780404-30824-3-git-send-email-bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@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 Tue, Feb 24, 2015 at 1:20 PM, Bruce Richardson < bruce.richardson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote: > Rather than scanning the resource file in sysfs a second time, we > can pull the information on physical addresses of BARs from the > pci resource information already present in the dev structure. > > Signed-off-by: Bruce Richardson > --- > lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 163 > +++++++++++------------------- > 1 file changed, 57 insertions(+), 106 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > index 7dd9ce1..0a95376 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > > [snip] @@ -336,11 +304,9 @@ pci_uio_map_resource(struct rte_pci_device *dev) > } > > /* set bus master that is not done by uio_pci_generic */ > - if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > - if (pci_uio_set_bus_master(dev->intr_handle.uio_cfg_fd)) { > - RTE_LOG(ERR, EAL, "Cannot set up bus > mastering!\n"); > - return -1; > - } > + if (pci_uio_set_bus_master(dev->intr_handle.uio_cfg_fd)) { > + RTE_LOG(ERR, EAL, "Cannot set up bus mastering!\n"); > + return -1; > } > > /* allocate the mapping details for secondary processes*/ > Would be better in a different patch (at least the commit log does not tell anything about this removed check). Then ack. -- David Marchand