From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.228.170]) by dpdk.org (Postfix) with ESMTP id 78BFD5A93 for ; Thu, 2 Jun 2016 22:53:56 +0200 (CEST) Received: by mail.mhcomputing.net (Postfix, from userid 1000) id 059C2F5; Thu, 2 Jun 2016 13:53:55 -0700 (PDT) Date: Thu, 2 Jun 2016 13:53:55 -0700 From: Matthew Hall To: Neil Horman Cc: "Wiles, Keith" , Thomas Monjalon , Yuanhan Liu , "dev@dpdk.org" , "Richardson, Bruce" , "Tan, Jianfeng" , Stephen Hemminger , Christian Ehrhardt , Panu Matilainen , Olivier Matz Message-ID: <20160602205355.GB24543@mhcomputing.net> References: <20160602104106.GA12923@hmsreliant.think-freely.org> <2363376.b1CWhBpcZG@xps13> <75917C44-9CF7-4A0B-B8D3-CD7DC7425D49@intel.com> <20160602171120.GB12923@hmsreliant.think-freely.org> <7091836E-B9D5-4F99-ADDB-A47B4C7B5F7E@intel.com> <20160602200837.GC12923@hmsreliant.think-freely.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160602200837.GC12923@hmsreliant.think-freely.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [dpdk-dev] [RFC] Yet another option for DPDK options 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: Thu, 02 Jun 2016 20:53:56 -0000 On Thu, Jun 02, 2016 at 04:08:37PM -0400, Neil Horman wrote: > struct key_vals { > char *key; > union { > ulong longval; > void *ptrval; > } value; > }; > > struct config { > size_t count; > struct key_vals kvp[0]; > }; This sort of code is very 1970s / ioctl / messy binary. And doesn't buy any performance advantage because it's just for config. Something that looks more like sysctl MIBs with hierarchical names or like JSON w/ a hierarchy of hash tables and arrays is much less user-hostile. https://www.freebsd.org/cgi/man.cgi?sysctl(3) http://json-c.github.io/json-c/json-c-0.12/doc/html/json__object_8h.html Matthew.