[dpdk-dev] [PATCH v3 2/2] eal: populate uio_maps from pci mem_resources array

David Marchand david.marchand at 6wind.com
Tue Feb 24 13:38:17 CET 2015


On Tue, Feb 24, 2015 at 1:20 PM, Bruce Richardson <
bruce.richardson at 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 <bruce.richardson at intel.com>
> ---
>  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


More information about the dev mailing list