From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by dpdk.org (Postfix) with ESMTP id 67BE67EEF for ; Wed, 2 Sep 2015 21:00:29 +0200 (CEST) Received: by pacwi10 with SMTP id wi10so20045774pac.3 for ; Wed, 02 Sep 2015 12:00:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=zE/8VLiRYIxu0HlVCjpPT6dvKUAZZQYTMh7iyqu4v78=; b=H/hA02ZOWyAKOGxxwyo7TO6tYnilQoH7E9yw2cDMZlV1lnmp4GDiqJqB9Xs/kubcGD YFmxbAjGjNN6UEelXqSaJj7uYAT+bQT3KZoTpJRRQy7l5LwV/w4uCVlnmo/SOaCZ8hex aeOEvq8eCvD1F/24QyEfpVRf45zdMeobjptMibBonTLFRTBjK1SVRxUBkTJfr8WkNmcE r5pOStyer6W0D8TFgAVDd8ILrMixFSBwW70CEOsG3Jcbr/EE9xT7bmGHdVKs7NhfhdSL pW8Gh+1s1UCH+WoRc8wQUhOE4eZ2/dGlkIMibixdMx6hbch32YmNSc+dduql4EmKlzdF 33TQ== X-Gm-Message-State: ALoCoQkvB3Bg5jqhnxfs9Otimsq4m9PyqWi4Z28pOmLdpDHJJgFcQssZpsbPOdjFVGw0f/xB3H2y X-Received: by 10.68.108.101 with SMTP id hj5mr57742268pbb.156.1441220428459; Wed, 02 Sep 2015 12:00:28 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id db3sm10478187pdb.83.2015.09.02.12.00.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Sep 2015 12:00:27 -0700 (PDT) Date: Wed, 2 Sep 2015 12:00:39 -0700 From: Stephen Hemminger To: Don Provan Message-ID: <20150902120039.69e3809c@urahara> In-Reply-To: References: <44e664970fef4bff942eaee5c7eaca67@bilemail1.empirix.com> <20150902125650.GA10364@bricha3-MOBL3> <3003120.8bdQ5bCz5C@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 19:00:29 -0000 On Wed, 2 Sep 2015 18:17:40 +0000 Don Provan wrote: > Thomas Monjalon: > >Yes but please, do not create an alternative init function. > >We just need to replace panic/exit with error codes and be sure that apps and examples handle them correctly. > > I understand your concerns, but the panics are really just the tip of the iceberg of the EAL library not realizing it's a library. It really makes no sense to think the library should define the application's command line, or that the PCI bus should be probed without considering whether this application is going to use PCI, and or to insist that EAL work be done on internal EAL threads. > > So I'd say it's way past time to consider revamping initialization to start the process of ending the DPDK library's tail wagging the application's dog. Naturally this would have to be done while retaining the existing init routine on top of a real library initialization, but that's just an unfortunate artifact of the library's history, not a rational design decision for moving forward. > > -don provan > You are welcome to submit patches with what you are proposing for review. Theoretical requirements discussions will probably only result in more mail, not new code. You know what you want, propose a solution. As far as the command line. That is easily managed by realizing the application doesn't have to pass the original command line into EAL. If you just view the command line as a way to pass unstructured options; the application or infrastructure can build up new values and pass it in. I agree that initialization itself should try and not fail except in the most extreme cases. "ie I can't find /sys what is wrong" and should try and adapt more "you asked for 128 cpu's but I see only 2, log it and continue"