From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DF1905592 for ; Tue, 20 Mar 2018 14:43:18 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Mar 2018 06:43:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,335,1517904000"; d="scan'208";a="213226180" Received: from dpdkx8602.sh.intel.com ([10.67.110.200]) by fmsmga005.fm.intel.com with ESMTP; 20 Mar 2018 06:43:17 -0700 From: Rosen Xu To: dev@dpdk.org Cc: declan.doherty@intel.com, bruce.richardson@intel.com, shreyansh.jain@nxp.com, tianfei.zhang@intel.com, hao.wu@intel.com, gaetan.rivet@6wind.com Date: Tue, 20 Mar 2018 21:45:53 +0800 Message-Id: <1521553556-62982-3-git-send-email-rosen.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1521553556-62982-1-git-send-email-rosen.xu@intel.com> References: <1521553556-62982-1-git-send-email-rosen.xu@intel.com> Subject: [dpdk-dev] [PATCH V1 2/5] Add Intel FPGA BUS Probe Code 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, 20 Mar 2018 13:43:19 -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..e3bcebe 100644 --- a/lib/librte_eal/common/eal_common_bus.c +++ b/lib/librte_eal/common/eal_common_bus.c @@ -87,7 +87,7 @@ struct rte_bus_list rte_bus_list = rte_bus_probe(void) { int ret; - struct rte_bus *bus, *vbus = NULL; + struct rte_bus *bus, *vbus = NULL, *ifpga_bus = NULL; TAILQ_FOREACH(bus, &rte_bus_list, next) { if (!strcmp(bus->name, "vdev")) { @@ -95,6 +95,11 @@ struct rte_bus_list rte_bus_list = continue; } + if (!strcmp(bus->name, "ifpga")) { + ifpga_bus = bus; + continue; + } + ret = bus->probe(); if (ret) RTE_LOG(ERR, EAL, "Bus (%s) probe failed.\n", @@ -108,6 +113,13 @@ struct rte_bus_list rte_bus_list = vbus->name); } + if (ifpga_bus) { + ret = ifpga_bus->probe(); + if (ret) + RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n", + ifpga_bus->name); + } + return 0; } -- 1.8.3.1