From: Gaetan Rivet Date: Thu, 26 Oct 2017 10:06:01 +0000 (+0200) Subject: pci: use new address comparison function X-Git-Tag: spdx-start~1062 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=102afb4067c2daf6b1a8dad6e5adf0a2c9d04fa5;p=dpdk.git pci: use new address comparison function Signed-off-by: Gaetan Rivet --- diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 1595988bdd..7d82195807 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -323,7 +323,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) int ret; TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) { - ret = rte_eal_compare_pci_addr(&dev->addr, &dev2->addr); + ret = rte_pci_addr_cmp(&dev->addr, &dev2->addr); if (ret > 0) continue; else if (ret < 0) { diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 70729d20ff..e4e42f50ee 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -81,7 +81,7 @@ static struct rte_devargs *pci_devargs_lookup(struct rte_pci_device *dev) if (devargs->bus != pbus) continue; devargs->bus->parse(devargs->name, &addr); - if (!rte_eal_compare_pci_addr(&dev->addr, &addr)) + if (!rte_pci_addr_cmp(&dev->addr, &addr)) return devargs; } return NULL; @@ -194,7 +194,7 @@ rte_pci_addr_cmp(const struct rte_pci_addr *addr, int rte_eal_compare_pci_addr(const struct rte_pci_addr *addr, - const struct rte_pci_addr *addr2) + const struct rte_pci_addr *addr2) { return rte_pci_addr_cmp(addr, addr2); } @@ -467,7 +467,7 @@ rte_pci_probe_one(const struct rte_pci_addr *addr) goto err_return; FOREACH_DEVICE_ON_PCIBUS(dev) { - if (rte_eal_compare_pci_addr(&dev->addr, addr)) + if (rte_pci_addr_cmp(&dev->addr, addr)) continue; ret = pci_probe_all_drivers(dev); @@ -497,7 +497,7 @@ rte_pci_detach(const struct rte_pci_addr *addr) return -1; FOREACH_DEVICE_ON_PCIBUS(dev) { - if (rte_eal_compare_pci_addr(&dev->addr, addr)) + if (rte_pci_addr_cmp(&dev->addr, addr)) continue; ret = rte_pci_detach_dev(dev); diff --git a/lib/librte_eal/common/eal_common_pci_uio.c b/lib/librte_eal/common/eal_common_pci_uio.c index 367a6816dc..9df383332b 100644 --- a/lib/librte_eal/common/eal_common_pci_uio.c +++ b/lib/librte_eal/common/eal_common_pci_uio.c @@ -61,7 +61,7 @@ pci_uio_map_secondary(struct rte_pci_device *dev) TAILQ_FOREACH(uio_res, uio_res_list, next) { /* skip this element if it doesn't match our PCI address */ - if (rte_eal_compare_pci_addr(&uio_res->pci_addr, &dev->addr)) + if (rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr)) continue; for (i = 0; i != uio_res->nb_maps; i++) { @@ -187,7 +187,7 @@ pci_uio_find_resource(struct rte_pci_device *dev) TAILQ_FOREACH(uio_res, uio_res_list, next) { /* skip this element if it doesn't match our PCI address */ - if (!rte_eal_compare_pci_addr(&uio_res->pci_addr, &dev->addr)) + if (!rte_pci_addr_cmp(&uio_res->pci_addr, &dev->addr)) return uio_res; } return NULL; diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index dc658527c9..3a853a6495 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -363,7 +363,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr) int ret; TAILQ_FOREACH(dev2, &rte_pci_bus.device_list, next) { - ret = rte_eal_compare_pci_addr(&dev->addr, &dev2->addr); + ret = rte_pci_addr_cmp(&dev->addr, &dev2->addr); if (ret > 0) continue; diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c index 19994c81c6..3331b13ac3 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c @@ -576,8 +576,8 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev) /* if we're in a secondary process, just find our tailq entry */ TAILQ_FOREACH(vfio_res, vfio_res_list, next) { - if (rte_eal_compare_pci_addr(&vfio_res->pci_addr, - &dev->addr)) + if (rte_pci_addr_cmp(&vfio_res->pci_addr, + &dev->addr)) continue; break; }