DPDK patches and discussions
 help / color / mirror / Atom feed
From: Kuba Kozak <kubax.kozak@intel.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, deepak.k.jain@intel.com,
	michalx.k.jastrzebski@intel.com, jacekx.piasecki@intel.com,
	Kuba Kozak <kubax.kozak@intel.com>
Subject: [dpdk-dev] [PATCH v6 0/5] Rework cfgfile API to enable apps config file support
Date: Fri, 22 Sep 2017 11:44:45 +0200	[thread overview]
Message-ID: <1506073490-45399-1-git-send-email-kubax.kozak@intel.com> (raw)

New API for cfgfile library allows to create a cfgfile at runtime, add new
section, add entry in a section, update existing entry and save cfgfile
structure to INI file - opens up the possibility to have applications
dynamically build up a proper DPDK configuration, rather than
having to have a pre-existing one. Due the new API functions, simplification
of load() function was made. One new unit test to TEST app was added. It
contains an example of a large INI file whose parsing requires multiple
reallocation of memory.

---
v6:
  Drop changes from v5 for return value in
 	- rte_cfgfile_section_num_entries(),
	- rte_cfgfile_section_entries(),
	- rte_cfgfile_section_entries_by_index()
v5:
	Some commit message reword
	test_cfgfile.c - remove *.ini file created during realloc test
	Add #ifdef RTE_NEXT_ABI for	return value change in
	- rte_cfgfile_section_num_entries(),
	- rte_cfgfile_section_entries(),
	- rte_cfgfile_section_entries_by_index()
v4:	
	Change members of structure cfgfile:
	- struct *sections[] to *sections
	- struct *entries[] to *entries
	- remove free_sections and free_entries
	Rework of existing cfgfile API functions to work with modified
	rte_cfgfile struct.
	Rework of malloc/realloc implementation due rte_cfgfile struct change,
	reducing mulitiple mallocs.
	Change return error codes for all library functions (errno.h)
	Checkpatch fixes
v3: 
	split one patchset into two distinct patchsets:
	1. cfgfile library and TEST app changes
	2. EAL changes and examples (this patchset depends on cfgfile)
v2:
  lib eal:
  	Rework of rte_eal_configure(struct rte_cfgfile *cfg, char *prgname).
	Now this function load data from cfg structure and did initial
	initialization of EAL arguments. Vdev argument are stored in different
	subsections eg. DPDK.vdev0, DPDK.vdev1 etc. After execution of this
	function it is necessary to call rte_eal_init to complete EAL
	initialization. There is no more merging arguments from different
	sources (cfg file and command line).
  	Added non_eal_configure to testpmd application.
	Function maintain the same functionality as rte_eal_configure but
	for non-eal arguments. 
  	Added config JSON feature to testpmd last patch from patchset contain
	example showing use of .json configuration files.

  lib cfgfile:
  	Rework of add_section(), add_entry() new implementation
  	New members allocated_entries/sections, free_entries/sections
	in rte_cfgfile structure, change in array of pointers
	**sections, **entries instead of *sections[], *entries[]
  	Add  set_entry() to update/overwrite already existing entry in cfgfile
	struct
  	Add save() function to save on disc cfgfile structure in INI format
  	Rework of existing load() function  simplifying the code
  	Add unit test realloc_sections() in TEST app for testing realloc/malloc
	of new API functions, add test for save() function

Jacek Piasecki (5):
  cfgfile: remove EAL dependency
  cfgfile: change existing API functions
  cfgfile: add APIs for cfgfile modification
  cfgfile: rework of load function
  test/cfgfile: add new unit test

 lib/Makefile                                     |   3 +-
 lib/librte_cfgfile/Makefile                      |   1 +
 lib/librte_cfgfile/rte_cfgfile.c                 | 419 ++++++++++++++---------
 lib/librte_cfgfile/rte_cfgfile.h                 |  76 ++++
 lib/librte_cfgfile/rte_cfgfile_version.map       |  11 +
 test/test/test_cfgfile.c                         |  41 +++
 test/test/test_cfgfiles/etc/realloc_sections.ini | 128 +++++++
 7 files changed, 512 insertions(+), 167 deletions(-)
 create mode 100644 test/test/test_cfgfiles/etc/realloc_sections.ini

-- 
2.7.4

             reply	other threads:[~2017-09-22  9:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22  9:44 Kuba Kozak [this message]
2017-09-22  9:44 ` [dpdk-dev] [PATCH v6 1/5] cfgfile: remove EAL dependency Kuba Kozak
2017-09-22  9:44 ` [dpdk-dev] [PATCH v6 2/5] cfgfile: change existing API functions Kuba Kozak
2017-09-22  9:44 ` [dpdk-dev] [PATCH v6 3/5] cfgfile: add APIs for cfgfile modification Kuba Kozak
2017-09-22  9:44 ` [dpdk-dev] [PATCH v6 4/5] cfgfile: rework of load function Kuba Kozak
2017-09-22  9:44 ` [dpdk-dev] [PATCH v6 5/5] test/cfgfile: add new unit test Kuba Kozak
2017-10-08 22:55 ` [dpdk-dev] [PATCH v6 0/5] Rework cfgfile API to enable apps config file support Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506073490-45399-1-git-send-email-kubax.kozak@intel.com \
    --to=kubax.kozak@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=deepak.k.jain@intel.com \
    --cc=dev@dpdk.org \
    --cc=jacekx.piasecki@intel.com \
    --cc=michalx.k.jastrzebski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).