From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id C656969FC for ; Sun, 8 Jan 2017 13:21:09 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 08 Jan 2017 04:21:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,335,1477983600"; d="scan'208";a="210932078" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 08 Jan 2017 04:21:07 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 8 Jan 2017 04:21:07 -0800 Received: from lcsmsx152.ger.corp.intel.com (10.186.165.231) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 8 Jan 2017 04:21:07 -0800 Received: from HASMSX110.ger.corp.intel.com ([169.254.11.57]) by LCSMSX152.ger.corp.intel.com ([169.254.4.138]) with mapi id 14.03.0248.002; Sun, 8 Jan 2017 14:21:04 +0200 From: "Rosen, Rami" To: Shreyansh Jain , "david.marchand@6wind.com" CC: "dev@dpdk.org" , "thomas.monjalon@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v5 04/12] eal: integrate bus scan and probe with EAL Thread-Index: AQHSX3sbIMecmQ8KhEO+lg7ox6QpxqEuk4nA Date: Sun, 8 Jan 2017 12:21:04 +0000 Message-ID: <9B0331B6EBBD0E4684FBFAEDA55776F93D482B72@HASMSX110.ger.corp.intel.com> References: <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com> <1482758645-23057-1-git-send-email-shreyansh.jain@nxp.com> <1482758645-23057-5-git-send-email-shreyansh.jain@nxp.com> In-Reply-To: <1482758645-23057-5-git-send-email-shreyansh.jain@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjIwNWZhMjAtMjJhMC00YjBiLWIyNjAtNjI3NWIyYTNjM2MzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjIuMTEuMCIsIlRydXN0ZWRMYWJlbEhhc2giOiJ2RFZlbHZhYzhldkk2SkpkazllR01PWGVkOE1uaWFXSWFqbGR3SWNCZWQ0PSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.184.70.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v5 04/12] eal: integrate bus scan and probe with EAL 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: Sun, 08 Jan 2017 12:21:10 -0000 Hi, ... ... diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/ea= l.c index 2206277..2c223de 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c ... +/* Scan all the buses for registering devices */ int +rte_eal_bus_scan(void) +{ + int ret; + struct rte_bus *bus =3D NULL; + + TAILQ_FOREACH(bus, &rte_bus_list, next) { + ret =3D bus->scan(bus); + if (ret) { + RTE_LOG(ERR, EAL, "Scan for (%s) bus failed.\n", + bus->name); + /* TODO: Should error on a particular bus block scan + * for all others? + */ + return ret; + } + } + + return 0; +} + Nitpick - the return type of rte_eal_bus_scan() is int and not void: * Scan all the buses attached to the framework. + * + * @param void + * @return void + */ +int rte_eal_bus_scan(void); Rami Rosen