From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by dpdk.org (Postfix) with ESMTP id D699280B7 for ; Tue, 9 Dec 2014 07:31:33 +0100 (CET) Received: by mail-pd0-f181.google.com with SMTP id v10so6718191pde.40 for ; Mon, 08 Dec 2014 22:31:33 -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=iJFbMNFXXhT6B6gNLJp6TVM04s+Umamj+tACSedjNRY=; b=m43/nGQvK4Z+nvTPnwxSkJxjq3uNKSMeM0fzozIQvwQ7Ixni4nWjsUcu191k8Aiz/q vV9otdOuwjWT6mLDEroC8zlQiemnQJAakgKV0JyERx+nNpaJIOK+bkHrJ/vIKTHdf9UK 0i8EajgmUkTLe2UZfRSuHr4Xq3TXFyVagQm3Fk+zpcibdBwIuIzNLxuSRfkU0YmNSiqw QPUBLZqyiA+Lm5jmgi1Admam1zsm2vaCfqlguxqe9Kb7B7/XblEArspHsJUH2o/3hYji em5f+dub/ek/mJnFRA8Fq1sHy8qY8kF19eYySmu44lLgnZdfECDKpEMPxChE4TjW259Q 910Q== X-Gm-Message-State: ALoCoQluwfNOKZvmzNzESE7O0skgR9LcAaXwRwbrfQqms4Odlj87XN/4g4vK+6yo+RzS5kSh/xrq X-Received: by 10.70.15.195 with SMTP id z3mr27565268pdc.89.1418106693162; Mon, 08 Dec 2014 22:31:33 -0800 (PST) Received: from eris.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id f12sm403088pat.43.2014.12.08.22.31.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 22:31:32 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Tue, 9 Dec 2014 15:30:20 +0900 Message-Id: <1418106629-22227-20-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418106629-22227-1-git-send-email-mukawa@igel.co.jp> References: <1416474399-16851-1-git-send-email-mukawa@igel.co.jp> <1418106629-22227-1-git-send-email-mukawa@igel.co.jp> Cc: nakajima.yoshihiro@lab.ntt.co.jp, menrigh@brocade.com, masutani.hitoshi@lab.ntt.co.jp Subject: [dpdk-dev] [PATCH v3 19/28] eal/pci: Change scope of rte_eal_pci_scan to global 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: Tue, 09 Dec 2014 06:31:34 -0000 The function is called by port hotplug framework, so change scope of the function to global. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/common/eal_private.h | 11 +++++++++++ lib/librte_eal/linuxapp/eal/eal_pci.c | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h index 232fcec..a1127ab 100644 --- a/lib/librte_eal/common/eal_private.h +++ b/lib/librte_eal/common/eal_private.h @@ -154,6 +154,17 @@ struct rte_pci_driver; struct rte_pci_device; /** + * Scan the content of the PCI bus, and the devices in the devices + * list + * + * This function is private to EAL. + * + * @return + * 0 on success, negative on error + */ +int rte_eal_pci_scan(void); + +/** * Mmap memory for single PCI device * * This function is private to EAL. diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 355c858..8d683f5 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -375,8 +375,8 @@ error: * Scan the content of the PCI bus, and the devices in the devices * list */ -static int -pci_scan(void) +int +rte_eal_pci_scan(void) { struct dirent *e; DIR *dir; @@ -629,7 +629,7 @@ rte_eal_pci_init(void) if (internal_config.no_pci) return 0; - if (pci_scan() < 0) { + if (rte_eal_pci_scan() < 0) { RTE_LOG(ERR, EAL, "%s(): Cannot scan PCI bus\n", __func__); return -1; } -- 1.9.1