From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 340678011 for ; Thu, 20 Nov 2014 09:57:36 +0100 (CET) Received: by mail-pd0-f180.google.com with SMTP id p10so2703566pdj.39 for ; Thu, 20 Nov 2014 01:08:05 -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=3pNCy/G2deQfFk3BpGlqO6MUbxu2cADTOkaLNAPDktc=; b=LpsNyzLj686H6aJwe6Ta9+Aw0qruh2cw8PZEMIa2vvc0UWpGy2h1FzvbDtwo4mU6AS MZ9bYBd4A66Dkoa6/r7MNqDUcDVuhS+UrV1llXox4K/d+Ce6ZoW4FxYv85U6TkLQo3nz C3/i8c8z/rvUL07BISoQ6PDn8nTN7LFYXy5xMkvUqjDXnpPO/Kj0+XLiMvTqYyenaSc3 4OkqIt1nPCBY1TkW8MA/6c96TqE942UhmnKZkMPoy+yiVyOYMVxbnL4SnXAbiSu5bZNV ouJAENl1jxTXYW8lS7gbq4drZCbvX6/7wQCd/EKYmk6gPsMNKt/64seXNhwv1CZ4ElGp GJWw== X-Gm-Message-State: ALoCoQmrgMau8U5MytbnxLdHdWiYcmShcWZfXFC+32v7Qa6eccxUkb2tbI1KCSyV4SEPZw2rCqlP X-Received: by 10.66.161.3 with SMTP id xo3mr27674339pab.131.1416474485003; Thu, 20 Nov 2014 01:08:05 -0800 (PST) Received: from localhost.localdomain (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id a6sm1432407pbu.64.2014.11.20.01.08.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Nov 2014 01:08:04 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Thu, 20 Nov 2014 18:06:33 +0900 Message-Id: <1416474399-16851-20-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416474399-16851-1-git-send-email-mukawa@igel.co.jp> References: <1414572576-21371-1-git-send-email-mukawa@igel.co.jp> <1416474399-16851-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 19/25] 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: Thu, 20 Nov 2014 08:57:36 -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 85cdd27..0317366 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