From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 0EF5EFA5A for ; Thu, 19 Jan 2017 20:08:43 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2017 11:08:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,255,1477983600"; d="scan'208";a="924483556" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga003.jf.intel.com with ESMTP; 19 Jan 2017 11:08:41 -0800 To: Hemant Agrawal , dev@dpdk.org References: <1484679174-4174-1-git-send-email-hemant.agrawal@nxp.com> <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> <1484832240-2048-7-git-send-email-hemant.agrawal@nxp.com> Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, shreyansh.jain@nxp.com, john.mcnamara@intel.com, jerin.jacob@caviumnetworks.com From: Ferruh Yigit Message-ID: <55ece068-d1b9-acb1-d279-a6da5e594614@intel.com> Date: Thu, 19 Jan 2017 19:08:40 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1484832240-2048-7-git-send-email-hemant.agrawal@nxp.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCHv5 04/33] bus/fslmc: introducing fsl-mc bus driver 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: Thu, 19 Jan 2017 19:08:44 -0000 On 1/19/2017 1:23 PM, Hemant Agrawal wrote: > The fslmc bus driver is a rte_bus driver which scans the fsl-mc bus > for NXP DPAA2 SoCs. > > Signed-off-by: Hemant Agrawal > --- <...> > +# > +# library name > +# > +LIB = librte_pmd_fslmcbus.a Since now there is a bus folder/driver, what do you think nameming library with librte_bus_ prefix, like: librte_bus_fslmc.a <...> > + > +static int > +rte_fslmc_probe(void) > +{ > + int ret = -1; If any bus->probe() fails, rte_bus_probe() breaks and returns error, which cause app to exit. Here if there is no device or driver in the bus, function is returning error, I guess it should be returning zero for this case. > + struct rte_dpaa2_device *dev; > + struct rte_dpaa2_driver *drv; > + > + TAILQ_FOREACH(dev, &rte_fslmc_bus.device_list, next) { > + TAILQ_FOREACH(drv, &rte_fslmc_bus.driver_list, next) { > + ret = rte_fslmc_match(drv, dev); > + if (ret) > + continue; > + > + if (!drv->probe) > + continue; > + > + ret = drv->probe(drv, dev); > + if (ret) > + FSLMC_BUS_LOG(ERR, "Unable to probe.\n"); > + break; > + } > + } > + return ret; > +} <...>