From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id 1CAEE7FB4 for ; Tue, 4 Nov 2014 04:37:36 +0100 (CET) Received: by mail-pa0-f50.google.com with SMTP id eu11so13659474pac.9 for ; Mon, 03 Nov 2014 19:46:53 -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=rQNU6d+1wSUuXax6Wj7akGUFZlFsLeYmC2a26dNCVHQ=; b=CfQK2RCvrl01Q/lJx4FoCFZNdNJ1U8PqQK9KFO7RSfrC4dRemyQ4lqo34OPGNkaYNS iAhkpr6Kb1sFf15IiFJDwLAecYQJ3at4Dn56YRr7selPEqR9QUMRVBtLuEuNOR2eEjtT +YaNvl9SFP1E4PZ+JoiHBwgE0atfbDDBabdCSrkkfET6FEywW0LNYW1kgII/25TMqThF n3mW5o+Mp6Hoix0vzRFvm23qE5xdxXO6l/PsWmKnHZQ7B44LwJp78rSg3PmkRd/UFTiI XcbFQnnueLd5drET+dLLhMByoRp/J7rk/Dp3K2k0Vkw1GPoQOpgVEL2Trzb/Zp9a4gAa ee0A== X-Gm-Message-State: ALoCoQnCL9O73kG1hwOP2aROdKixqBitYjEr2JacFyphep3Jx+cT7LQANAFYIk4uAnsq7ZSmJQrB X-Received: by 10.66.253.164 with SMTP id ab4mr47155934pad.59.1415072813307; Mon, 03 Nov 2014 19:46:53 -0800 (PST) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id jc3sm18430580pbb.49.2014.11.03.19.46.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Nov 2014 19:46:52 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Tue, 4 Nov 2014 12:45:39 +0900 Message-Id: <1415072748-31937-20-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415072748-31937-1-git-send-email-mukawa@igel.co.jp> References: <1414572576-21371-1-git-send-email-mukawa@igel.co.jp> <1415072748-31937-1-git-send-email-mukawa@igel.co.jp> Cc: nakajima.yoshihiro@lab.ntt.co.jp, masutani.hitoshi@lab.ntt.co.jp Subject: [dpdk-dev] [RFC PATCH v2 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, 04 Nov 2014 03:37:37 -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/include/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/include/eal_private.h b/lib/librte_eal/common/include/eal_private.h index 232fcec..a1127ab 100644 --- a/lib/librte_eal/common/include/eal_private.h +++ b/lib/librte_eal/common/include/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 c70e8ea..4521c33 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -361,8 +361,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; @@ -612,7 +612,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