From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 653A77FCC for ; Wed, 29 Oct 2014 09:41:49 +0100 (CET) Received: by mail-pa0-f52.google.com with SMTP id fa1so2737904pad.11 for ; Wed, 29 Oct 2014 01:50:39 -0700 (PDT) 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=hTpm8WA5RwMqoqcfYaeftyysCGEphCBHNJeEITPMJNAoxrsm7opDLbcvQb+OK/UoL9 AeXy9NqTyKbzqWmyvOtABzEPnb/3fk6AYC9tozZYpHb+Dtn+FNFtUKNtSu5vDQcnyr2w tNuRUQLOJYMXYDpOMaZFgOuuLDuBmAx2koqWeWEe4V0a5li8VAso+KzqdzIptInnJ/Wc 3NcxTd6FTwLO18kSDEhB2NlmM8SKs1qD0QkD1fGgFbKqY5tpcNRX46ATJY9fTjsOQwcx fJMuFMLW3722RNOPNwzzmdTrfLYOp4yOHRgvqebTgjvNBmwEEPsI5UZSutIDUZQV0tTd zzmw== X-Gm-Message-State: ALoCoQlv+ZqESOItmeBbPpBfYmvfjsbKNsWwg3qsnOsmSLvHQPA8fB5AvW588zP5Rs7Kn7DFF0zm X-Received: by 10.68.69.107 with SMTP id d11mr8985538pbu.57.1414572639623; Wed, 29 Oct 2014 01:50:39 -0700 (PDT) Received: from eris.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id ky4sm3686872pbc.55.2014.10.29.01.50.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Oct 2014 01:50:39 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Wed, 29 Oct 2014 17:49:30 +0900 Message-Id: <1414572576-21371-20-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414572576-21371-1-git-send-email-mukawa@igel.co.jp> References: <1414572576-21371-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 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: Wed, 29 Oct 2014 08:41:50 -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