From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 63FB71BA60 for ; Thu, 26 Oct 2017 00:39:29 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id u40so1429116wrf.10 for ; Wed, 25 Oct 2017 15:39:29 -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=QQkcxGSUiwdzV+7qvN9TnGpnK+jSu8QVuanYEBdXvdg=; b=ZdKXm5lpbTkF/D/mp4vfoAI6HY6g++9q6Tpp2aw/RG0LX844HFXUoTXst9Fw1ZF1/j OyTi5ZAS7jDgXp4SAChhLMol9DpObtzBcJnFAe3gonjK0XkJO2dvdccQgKS4FXHVotq6 fzhD7FtPoONrlg/zna+x0bU/y0Fry4VdSp4RsNHWuX9utbwUdjYRNw/p45GxlyBizsXO PRBVDi3UI+4wfBBvr1cj2yow63fiOu4PhDGz98owu7amTTDwRl6sg2j/voHYCjroO7H+ vRB/AA+I3C9mwAcz6G5KYSFoavQyXmGZVlIZ58QeP/LQRfNDB82pDHBY/RmjNqguLchh pI9w== 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=QQkcxGSUiwdzV+7qvN9TnGpnK+jSu8QVuanYEBdXvdg=; b=pN77BEPTED6HDbo2YXH9U+jGZyB8EsojjCWdtHK/Mz42XhEGGSTGiRuGoVTSMYMoGQ 1RSl1s+qI4uRDffU8sLBoRckp8dvCyZLvscGFiOPKLaTJw8HHTyi7hUgdIML9aGSjNJa 4/xWzz367d+Ogf65lckyHr8iVw/fV/8cWtzCtEcSWAII9/wew7RfZoXTdgOMxW+v8K1l TUQZAeOlZ/PgE+nFzZF5xF+8Ht5xlUUIlTEOSQfSw6r+un+QcsaGpKxqVSAsfPJHWwL8 XZ5+GPsXlYAzhF2AA3GWahJX8OANxo0XAAY+13m2Uix0PKYgYALVPcI8w+5AHi4ut6uc zUdw== X-Gm-Message-State: AMCzsaWyWVVmhoSXINCetP/iGb2JxprB7IXSzoKZvmxYvxYS8rQ5LLIA 1m1MxBj4G6jG9hg3TYjRSDP0WhOy X-Google-Smtp-Source: ABhQp+SEWFRj8BUDoR9jBj51LLW1Zt73QovpeRecAKqnNusX/usWUDCHnkj043s1BnGs9zTY1O4cvw== X-Received: by 10.223.160.41 with SMTP id k38mr3718881wrk.252.1508971168686; Wed, 25 Oct 2017 15:39:28 -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 r63sm4466124wmg.13.2017.10.25.15.39.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Oct 2017 15:39:27 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Thu, 26 Oct 2017 00:38:38 +0200 Message-Id: <092a6df7281e3e29feb8209c087e021d89ad959b.1508970254.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 v7 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: , X-List-Received-Date: Wed, 25 Oct 2017 22:39:29 -0000 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 531dc12..bf8a96c 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); } @@ -463,7 +463,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); @@ -493,7 +493,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 d498df6..85e481d 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; } -- 2.1.4