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 163F92BE1 for ; Fri, 30 Jun 2017 11:55:23 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2017 02:55:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,285,1496127600"; d="scan'208";a="1146436294" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.28]) by orsmga001.jf.intel.com with SMTP; 30 Jun 2017 02:55:20 -0700 Received: by (sSMTP sendmail emulation); Fri, 30 Jun 2017 10:55:19 +0100 Date: Fri, 30 Jun 2017 10:55:19 +0100 From: Bruce Richardson To: Jacek Piasecki Cc: dev@dpdk.org, deepak.k.jain@intel.com Message-ID: <20170630095519.GB14776@bricha3-MOBL3.ger.corp.intel.com> References: <1498474759-102089-2-git-send-email-jacekx.piasecki@intel.com> <1498559210-104084-1-git-send-email-jacekx.piasecki@intel.com> <1498559210-104084-3-git-send-email-jacekx.piasecki@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1498559210-104084-3-git-send-email-jacekx.piasecki@intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.1 (2017-04-11) Subject: Re: [dpdk-dev] [PATCH v3 2/4] cfgfile: add new functions to API 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: Fri, 30 Jun 2017 09:55:24 -0000 On Tue, Jun 27, 2017 at 12:26:48PM +0200, Jacek Piasecki wrote: > Extend existing cfgfile library with providing new API functions: > > rte_cfgfile_create() - create new cfgfile object > rte_cfgfile_add_section() - add new section to existing cfgfile > object > rte_cfgfile_add_entry() - add new entry to existing cfgfile > object in specified section > rte_cfgfile_set_entry() - update existing entry in cfgfile object > rte_cfgfile_save() - save existing cfgfile object to INI file > > This modification allows to create a cfgfile on > runtime and opens up the possibility to have applications > dynamically build up a proper DPDK configuration, rather than having > to have a pre-existing one. > > Signed-off-by: Jacek Piasecki > --- > lib/librte_cfgfile/rte_cfgfile.c | 249 +++++++++++++++++++++++++++-- > lib/librte_cfgfile/rte_cfgfile.h | 76 +++++++++ > lib/librte_cfgfile/rte_cfgfile_version.map | 11 ++ > 3 files changed, 323 insertions(+), 13 deletions(-) > > +/** > + * Add entry to specified section in cfgfile instance. > + * > + * @param cfg > + * Pointer to the cfgfile structure. > + * @param sectionname > + * Given section name to add an entry. > + * @param entryname > + * Entry name to add. > + * @entryvalue missing "param" here. Building the docs throws an error on this. +/home/bruce/dpdk.org/lib/librte_cfgfile/rte_cfgfile.h:161: warning: Found unknown command `\entryvalue' +/home/bruce/dpdk.org/lib/librte_cfgfile/rte_cfgfile.h:166: warning: The following parameters of rte_cfgfile_add_entry(struct rte_cfgfile *cfg, const char *sectionname, const char *entryname, const char *entryvalue) are not documented: + parameter 'entryvalue' > + * Entry value to add. > + * @return > + * 0 on success, -EEXIST if entry already exist, -EINVAL if bad argument > + */ > +int rte_cfgfile_add_entry(struct rte_cfgfile *cfg, > + const char *sectionname, const char *entryname, > + const char *entryvalue); > +