From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id D8A315952 for ; Wed, 2 Sep 2015 14:56:54 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 02 Sep 2015 05:56:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,453,1437462000"; d="scan'208";a="553818819" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.62]) by FMSMGA003.fm.intel.com with SMTP; 02 Sep 2015 05:56:51 -0700 Received: by (sSMTP sendmail emulation); Wed, 02 Sep 2015 13:56:50 +0025 Date: Wed, 2 Sep 2015 13:56:50 +0100 From: Bruce Richardson To: "Montorsi, Francesco" Message-ID: <20150902125650.GA10364@bricha3-MOBL3> References: <44e664970fef4bff942eaee5c7eaca67@bilemail1.empirix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44e664970fef4bff942eaee5c7eaca67@bilemail1.empirix.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] rte_eal_init() alternative? 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: , X-List-Received-Date: Wed, 02 Sep 2015 12:56:55 -0000 On Wed, Sep 02, 2015 at 12:49:40PM +0000, Montorsi, Francesco wrote: > Hi all, > > Currently it seems that the only way to initialize EAL is using rte_eal_init() function, correct? > > I have the problem that rte_eal_init() will call rte_panic() whenever something fails to initialize or in other cases it will call exit(). > In my application, I would rather like to attempt DPDK initialization. If it fails I don't want to exit. > Unfortunately I cannot even copy&paste the rte_eal_init() code into my application (removing rte_panic and exit calls) since it uses a lot of DPDK internal private functions. > > I think that my requirements (avoid abort/exit calls when init fails) is a basic requirement... would you accept a patch that adds an alternative rte_eal_init() function that just returns an error code upon failure, instead of immediately exiting? > > Thanks for your hard work! > > Francesco Montorsi > I, for one, would welcome such a patch. I think the code is overly quick in many places to panic or exit the app, when an error code would be more appropriate. Feel free to also look at other libraries in DPDK too, if you like :-) Regards, /Bruce