From patchwork Tue Dec 9 03:42:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuya Mukawa X-Patchwork-Id: 1845 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 84210803D; Tue, 9 Dec 2014 04:44:01 +0100 (CET) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id 105468031 for ; Tue, 9 Dec 2014 04:43:59 +0100 (CET) Received: by mail-pd0-f177.google.com with SMTP id ft15so6356271pdb.8 for ; Mon, 08 Dec 2014 19:43:58 -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=lCsNxdTHkB/PFXyIfjJQBcAjWHq/STZU60gqXVfKxgEfcyNsAwOxWrzi3f1fYToRkI 65MjptMtaMNDQFPVF3aFl8OV2l6XJz6RiDQJjyJ8I8Kn0xxMEZLGibDxLNb9m7DiaS2k X9sxWK963aGLbJg6bzHUnjoI6W6W05mBskgtCRut5bUOKcRV1Zy5pjitD8lvLXsE/D9S GUEHwyygyT/RSKA/iwaifNzW8HBntOCEQdjoGfguN+b2vXv+Gvw6KGAwNjKHqh59jmLD ks+EnLW3mK/PpT0TezKTN3p41AWq0abG/fig7Va8ub+gpNaHk1tyOnYcIUVBTPtar+Pr e1mw== X-Gm-Message-State: ALoCoQk4nt/6Rb12Wbo+lOOplubLdPeqEIyJT8wbTI4yjHIJ3QI4L59zgMuQpEyVm7/sS+xV7hBe X-Received: by 10.70.23.99 with SMTP id l3mr26610067pdf.86.1418096638418; Mon, 08 Dec 2014 19:43:58 -0800 (PST) Received: from eris.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id xx2sm2185pab.17.2014.12.08.19.43.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 19:43:57 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Tue, 9 Dec 2014 12:42:42 +0900 Message-Id: <1418096571-27531-20-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418096571-27531-1-git-send-email-mukawa@igel.co.jp> References: <1416474399-16851-1-git-send-email-mukawa@igel.co.jp> <1418096571-27531-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 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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; }