From patchwork Thu Oct 26 10:06:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABtan_Rivet?= X-Patchwork-Id: 30955 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 776801BB01; Thu, 26 Oct 2017 12:07:02 +0200 (CEST) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 5D0EC1BA93 for ; Thu, 26 Oct 2017 12:06:47 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id b9so7149399wmh.0 for ; Thu, 26 Oct 2017 03:06:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=RItbG/TyIcsGyFBWB0+BzwiNuZvE5BACvd77PC5iijo=; b=sOb2HSebW5bEgUu1ithDxE5KgRutijWtSil+7jbpRlpQmvEMtA6SMr5t1HrkiYAcrP meqdqzU90ohnLRvINxangCuVBw+2Di54oeoaKyomTd0OfuCLJ/qbI64mbQATN98/DXgi GChIvfXWfV6n9UDGwzGUMCmsnBXvz62R29yHRybjaUGv22YIaw8P4VZMoetH99fUW1E0 bm7mRWP5opRD+Fd20So2YkkcY2ARRdUcfAqtPQUM96yByOGoAJhFYn9t2ZI6S4NbToyx +aXk9dIppGtGXQ94QUUbnwZyDNU/QMC1aBvbdEvrC4UzmL8VUhBBhNtgtLDnkU0fwn9U YgoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=RItbG/TyIcsGyFBWB0+BzwiNuZvE5BACvd77PC5iijo=; b=ZKwY2tBS9vChZ66KoD2d/pHlJDeEcHs3Eq0Xg9c0TZHQ5/PT6nLnFe/pY6aeqU4ir7 NYfd3Q9Lo+XfdeTIWmU6/u5JSlBRBDlXrpuVGGLZmtGJpVItyWCt7UFcpuz2KYeUmnlp W5ypo5/ZNobLCojrpTBB0OYXFVLZ5oOoIpfapmmLxzV4WH269PR82WAnAmN+TFZKNFmU yVA8ubpoF6Q65+ZuFlT0nwPLpBBZfgCgwd19QWbw6NKy9EoklVyIXzOhxcqzNFfKj2bL gxjHd1J6Fzg2Yfcz0LdlPs2mt5TuIhaWmkM5EldDub203O2sQh+eyF9NB5yY663+hmMN nn7A== X-Gm-Message-State: AMCzsaUU6KkBh1r7EFut7/mRkCI4U9ZkppaeFlekUIG6h+MAk7H3Nqux fRXTbv3/73oAutYdOKQMjlXgA0OB X-Google-Smtp-Source: ABhQp+RKQcUqvM+Xg1oscS9MDGAOE680Kbmp4o4JL5RcfN1RPAPCdoluAu3+rnxxCXM0zM71GZBmcQ== X-Received: by 10.80.134.47 with SMTP id o44mr16531006edo.306.1509012406686; Thu, 26 Oct 2017 03:06:46 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u12sm3339619edk.45.2017.10.26.03.06.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Oct 2017 03:06:45 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 26 Oct 2017 12:06:01 +0200 Message-Id: <0936f6d7f3db7ea71d58b094db6c77156fb5a9c8.1509012196.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v8 16/25] pci: use new PCI addr comparison function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Gaetan Rivet --- lib/librte_eal/bsdapp/eal/eal_pci.c | 2 +- lib/librte_eal/common/eal_common_pci.c | 8 ++++---- lib/librte_eal/common/eal_common_pci_uio.c | 4 ++-- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 1595988..7d82195 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 70729d2..e4e42f5 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 367a681..9df3833 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 dc65852..3a853a6 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 19994c8..3331b13 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; }