From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: Re: [RFC] Yet another option for DPDK options Date: Sat, 4 Jun 2016 20:19:46 -0400 Message-ID: <20160605001946.GA8200@neilslaptop.think-freely.org> References: <8CE01283-1E89-4302-BE7D-486975B43EF6@intel.com> <20160603174437.GC12627@hmsreliant.think-freely.org> <62A67FEB-AE18-43B1-8D15-27F23D5C8A7D@intel.com> <20160603183819.GD12627@hmsreliant.think-freely.org> <20160603191804.GE12627@hmsreliant.think-freely.org> <20160603214137.GC16022@mhcomputing.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Wiles, Keith" , Arnon Warshavsky , Panu Matilainen , "Richardson, Bruce" , Thomas Monjalon , Yuanhan Liu , "dev@dpdk.org" , "Tan, Jianfeng" , Stephen Hemminger , Christian Ehrhardt , Olivier Matz To: Matthew Hall Return-path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id AA114569F for ; Sun, 5 Jun 2016 02:20:01 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20160603214137.GC16022@mhcomputing.net> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jun 03, 2016 at 02:41:37PM -0700, Matthew Hall wrote: > On Fri, Jun 03, 2016 at 03:18:04PM -0400, Neil Horman wrote: > > I'm not opposed to default values, but it seems to me that if we are splitting > > out a configuration storage library from dpdk, part of the initzliation of that > > library can be installing default values. That is to say, instead of having the > > code specific areas assume a default value if none is present in the config, an > > init function for the configuration storage library would just populate the > > keystore. That way all the dpdk itself has to do is a key lookup. > > > > Neil > > I don't think this provides as much mental locality of reference for people > reading the code. But, an unwanted default argument can be filled with 0 / > NULL / false as needed. > Well, I'm operating under the assumption that default values are used in cases where a lack of any value (i.e. the unset case), creates a state in DPDK where it cannot continue (i.e. it would crash). If a unset state is for some reason required on a key that is otherwise populated with a default, then I would propose that an UnsetKey api call be added. Neil > Matthew. >