From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 6945D6AB0 for ; Fri, 28 Feb 2014 18:24:50 +0100 (CET) Received: by mail-wg0-f50.google.com with SMTP id l18so833187wgh.9 for ; Fri, 28 Feb 2014 09:26:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CgFJSJoVzvpzO5DtPvODdJSXf+fTHTzhR8PUs4QTO3E=; b=NbjYpEhuqTs4dSC/ITk2s/+U+NrWXMpaSP7wFKVSJZNBUvXo8CbAWrcVjoYoMSd0Xj zrrpVOzJP6elcbqHd5iysbF0tFW1zv+N+QE6o3Box4Q1YPHFqNaXR2fJcRnIHkrKKkxM MWjero5LFFrwa8rGaWqwcJK6SfcQDABF+8IqwQIG9iV337lLbW2yui1ysERRSCzXR9Ce hhid8NDag1y0ATYaNFH93Ssu9+0ErhcDwgscQhTKsAqHbzuRWO9g3Us8iYJCSh/0KvWi scYIT8I0LAoGzuC/z5V2Y/Yct8u2cWJXVXI25Qp8wRVdF9JwnvR+jwmN2nHI8xatU0yc YFpA== X-Gm-Message-State: ALoCoQk2FX7FM72i3XiFjIAQsS2jNHgyle7GQosonci1LlVG39wqjDnHurLwDbIfjEAqfVn68drH X-Received: by 10.180.189.43 with SMTP id gf11mr3687724wic.32.1393608377202; Fri, 28 Feb 2014 09:26:17 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by mx.google.com with ESMTPSA id hy8sm5908439wjb.2.2014.02.28.09.26.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Feb 2014 09:26:16 -0800 (PST) From: Olivier Matz To: dev@dpdk.org Date: Fri, 28 Feb 2014 18:25:44 +0100 Message-Id: <1393608350-4431-6-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1393608350-4431-1-git-send-email-olivier.matz@6wind.com> References: <1393608350-4431-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 05/11] pci: rename device_list as pci_device_list 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: Fri, 28 Feb 2014 17:24:51 -0000 To avoid confusion with virtual devices, rename device_list as pci_device_list and driver_list as pci_driver_list. Signed-off-by: Olivier Matz --- app/test/test_pci.c | 2 +- lib/librte_eal/common/eal_common_pci.c | 14 +++++++------- lib/librte_eal/common/include/rte_pci.h | 4 ++-- lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 12 ++++++------ 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 223d76a..445cf57 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -121,7 +121,7 @@ blacklist_all_devices(void) unsigned i = 0; char pci_addr_str[16]; - TAILQ_FOREACH(dev, &device_list, next) { + TAILQ_FOREACH(dev, &pci_device_list, next) { snprintf(pci_addr_str, sizeof(pci_addr_str), PCI_PRI_FMT, dev->addr.domain, dev->addr.bus, dev->addr.devid, dev->addr.function); diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 972d844..03e1378 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -82,8 +82,8 @@ #include "eal_private.h" -struct pci_driver_list driver_list; -struct pci_device_list device_list; +struct pci_driver_list pci_driver_list; +struct pci_device_list pci_device_list; static int is_blacklisted(struct rte_pci_device *dev) { @@ -114,7 +114,7 @@ pci_probe_all_drivers(struct rte_pci_device *dev) int rc; dev->blacklisted = !!is_blacklisted(dev); - TAILQ_FOREACH(dr, &driver_list, next) { + TAILQ_FOREACH(dr, &pci_driver_list, next) { rc = rte_eal_pci_probe_one_driver(dr, dev); if (rc < 0) /* negative value is an error */ @@ -163,7 +163,7 @@ rte_eal_pci_probe(void) if (rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI) == 0) probe_all = 1; - TAILQ_FOREACH(dev, &device_list, next) { + TAILQ_FOREACH(dev, &pci_device_list, next) { if (probe_all) pci_probe_all_drivers(dev); else if (pcidev_is_whitelisted(dev) && pci_probe_all_drivers(dev) < 0) @@ -201,7 +201,7 @@ rte_eal_pci_dump(void) { struct rte_pci_device *dev = NULL; - TAILQ_FOREACH(dev, &device_list, next) { + TAILQ_FOREACH(dev, &pci_device_list, next) { pci_dump_one_device(dev); } } @@ -210,12 +210,12 @@ rte_eal_pci_dump(void) void rte_eal_pci_register(struct rte_pci_driver *driver) { - TAILQ_INSERT_TAIL(&driver_list, driver, next); + TAILQ_INSERT_TAIL(&pci_driver_list, driver, next); } /* unregister a driver */ void rte_eal_pci_unregister(struct rte_pci_driver *driver) { - TAILQ_REMOVE(&driver_list, driver, next); + TAILQ_REMOVE(&pci_driver_list, driver, next); } diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 0aee5ff..6dd962a 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -85,8 +85,8 @@ extern "C" { TAILQ_HEAD(pci_device_list, rte_pci_device); /**< PCI devices in D-linked Q. */ TAILQ_HEAD(pci_driver_list, rte_pci_driver); /**< PCI drivers in D-linked Q. */ -extern struct pci_driver_list driver_list; /**< Global list of PCI drivers. */ -extern struct pci_device_list device_list; /**< Global list of PCI devices. */ +extern struct pci_driver_list pci_driver_list; /**< Global list of PCI drivers. */ +extern struct pci_device_list pci_device_list; /**< Global list of PCI devices. */ /** Pathname of PCI devices directory. */ #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices" diff --git a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c index 6191fef..87e88c3 100644 --- a/lib/librte_eal/linuxapp/eal/eal_ivshmem.c +++ b/lib/librte_eal/linuxapp/eal/eal_ivshmem.c @@ -854,7 +854,7 @@ int rte_eal_ivshmem_init(void) } else { - TAILQ_FOREACH(dev, &device_list, next) { + TAILQ_FOREACH(dev, &pci_device_list, next) { if (is_ivshmem_device(dev)) { diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 5fa466e..f4ac8f4 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -888,13 +888,13 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus, } /* device is valid, add in list (sorted) */ - if (TAILQ_EMPTY(&device_list)) { - TAILQ_INSERT_TAIL(&device_list, dev, next); + if (TAILQ_EMPTY(&pci_device_list)) { + TAILQ_INSERT_TAIL(&pci_device_list, dev, next); } else { struct rte_pci_device *dev2 = NULL; - TAILQ_FOREACH(dev2, &device_list, next) { + TAILQ_FOREACH(dev2, &pci_device_list, next) { if (pci_addr_comparison(&dev->addr, &dev2->addr)) continue; else { @@ -902,7 +902,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus, return 0; } } - TAILQ_INSERT_TAIL(&device_list, dev, next); + TAILQ_INSERT_TAIL(&pci_device_list, dev, next); } return 0; @@ -1068,8 +1068,8 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *d int rte_eal_pci_init(void) { - TAILQ_INIT(&driver_list); - TAILQ_INIT(&device_list); + TAILQ_INIT(&pci_driver_list); + TAILQ_INIT(&pci_device_list); uio_res_list = RTE_TAILQ_RESERVE_BY_IDX(RTE_TAILQ_PCI, uio_res_list); /* for debug purposes, PCI can be disabled */ -- 1.8.5.3