From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id BBA14201 for ; Tue, 6 Mar 2018 02:42:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2018 17:42:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,429,1515484800"; d="scan'208";a="31631356" Received: from dpdkx8602.sh.intel.com ([10.67.110.200]) by FMSMGA003.fm.intel.com with ESMTP; 05 Mar 2018 17:42:47 -0800 From: Rosen Xu To: dev@dpdk.org Cc: declan.doherty@intel.com, tianfei.zhang@intel.com Date: Tue, 6 Mar 2018 09:43:57 +0800 Message-Id: <1520300638-134954-4-git-send-email-rosen.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520300638-134954-1-git-send-email-rosen.xu@intel.com> References: <1520300638-134954-1-git-send-email-rosen.xu@intel.com> Subject: [dpdk-dev] [RFC 3/4] lib/librte_eal/common: Add Intel FPGA Bus Second Scan, it should be scanned after PCI Bus X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Mar 2018 01:42:49 -0000 Signed-off-by: Rosen Xu --- lib/librte_eal/common/eal_common_bus.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/common/eal_common_bus.c b/lib/librte_eal/common/eal_common_bus.c index 3e022d5..74bfa15 100644 --- a/lib/librte_eal/common/eal_common_bus.c +++ b/lib/librte_eal/common/eal_common_bus.c @@ -70,15 +70,27 @@ struct rte_bus_list rte_bus_list = rte_bus_scan(void) { int ret; - struct rte_bus *bus = NULL; + struct rte_bus *bus = NULL, *ifpga_bus = NULL; TAILQ_FOREACH(bus, &rte_bus_list, next) { + if (!strcmp(bus->name, "ifpga")) { + ifpga_bus = bus; + continue; + } + ret = bus->scan(); if (ret) RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n", bus->name); } + if (ifpga_bus) { + ret = ifpga_bus->scan(); + if (ret) + RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n", + ifpga_bus->name); + } + return 0; } -- 1.8.3.1