From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by dpdk.org (Postfix) with ESMTP id 81125ADA4 for ; Tue, 24 Feb 2015 13:38:18 +0100 (CET) Received: by mail-oi0-f48.google.com with SMTP id a3so18980157oib.7 for ; Tue, 24 Feb 2015 04:38:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=MVCyisYBaacdA1Ml6Pm+XT7jdxNBUjzf0w+S8kLwKWo=; b=lXvqo1q18BHTngedjnGid19DMBxOovIk6SyGt6jOI5dYLpE0MXXGWFa4mt8bhTOevM DRl1v/gUFpZT+vG9YM/VrxCh9ThJstRiVuexxDEEE2eK0ltkKa026vrjyLjhNK0y2TMJ rUjNRLy35pSrh5kwvuzCaomKPiofu6AV5Qh/Z2+rbrO94Xgx8y0OBJDbhVmpcBeMFwos OhBxuIs4LpV4xbdBF6y5HdovkMu0pxJjk441pkm28yPe+iiHrAlACwn2uki3TNqgfXap OdYt8px+wEmt/zPBDKZwF4rHphAtzrV7x5oLJypJytpAY6dSXC+orW0dvuBVIQE0QL0F H77w== X-Gm-Message-State: ALoCoQncvB7CPP02/qjE3bHHeqwRaVi4HQZcxlusfULYW6maVkL6MewG8GNyK7t0meVh7BQc7PPv MIME-Version: 1.0 X-Received: by 10.182.116.130 with SMTP id jw2mr11119001obb.48.1424781497945; Tue, 24 Feb 2015 04:38:17 -0800 (PST) Received: by 10.76.133.162 with HTTP; Tue, 24 Feb 2015 04:38:17 -0800 (PST) In-Reply-To: <1424780404-30824-3-git-send-email-bruce.richardson@intel.com> 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> Date: Tue, 24 Feb 2015 13:38:17 +0100 Message-ID: From: David Marchand To: Bruce Richardson Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v3 2/2] eal: populate uio_maps from pci mem_resources array 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: Tue, 24 Feb 2015 12:38:18 -0000 On Tue, Feb 24, 2015 at 1:20 PM, Bruce Richardson < bruce.richardson@intel.com> 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