[dpdk-dev] [PATCH] cfgfile: fix NULL pointer dereference

2017-10-25 Thread Jacek Piasecki
Function memchr() could return NULL and assign it to split[1] pointer. Additional check and error handing is made after memchr() call. Coverity issue: 195004 Fixes: a6a47ac9c2c9 ("cfgfile: rework load function") Cc: jacekx.piase...@intel.com Cc: sta...@dpdk.org Signed-off-by: Jace

[dpdk-dev] [PATCH] cfgfile: fix resource leak

2017-10-25 Thread Jacek Piasecki
ation") Cc: jacekx.piase...@intel.com Cc: sta...@dpdk.org Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/rte_cfgfile.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib/librte_cfgfile/rte_cfgfile.c index 124aef

[dpdk-dev] [PATCH v4] examples/vhost_scsi: fix buffer not terminated

2017-10-25 Thread Jacek Piasecki
ned-off-by: Jacek Piasecki Acked-by: Maxime Coquelin --- v4: RTE_DIM instead ARRAY_SIZE v3: checkpatch fix v2: snprintf instead strncpy --- examples/vhost_scsi/scsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c ind

[dpdk-dev] [PATCH] examples/performance-thread: fix return check

2017-10-12 Thread Jacek Piasecki
There was a call for thread create function without result check. Added result check and message printout after failure. Coverity issue: 143441 Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app") Cc: ian.be...@intel.com Cc: sta...@dpdk.org Signed-off-by: Jace

[dpdk-dev] [PATCH v3] examples/vhost_scsi: fix buffer not terminated

2017-10-12 Thread Jacek Piasecki
ned-off-by: Jacek Piasecki --- examples/vhost_scsi/scsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c index 54d3104..2de3110 100644 --- a/examples/vhost_scsi/scsi.c +++ b/examples/vhost_scsi/scsi.c @@ -30

[dpdk-dev] [PATCH v2] examples/vhost_scsi: fix buffer not terminated

2017-10-11 Thread Jacek Piasecki
ned-off-by: Jacek Piasecki --- v2: * use snprintf instead strncpy examples/vhost_scsi/scsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c index 54d3104..c0f3187 100644 --- a/examples/vhost_scsi/scsi.c +++ b/examples/

[dpdk-dev] [PATCH] net/bonding: fix bonding in 8023ad mode

2017-08-08 Thread Jacek Piasecki
This patch blocks possibility to set master bonding by rte_eth_bond_mode_set() in 802.3ad mode, as the API doesn't prevent this. Fixes: 6d72657ce379 ("net/bonding: add other aggregator modes") Cc: danielx.t.mrzyg...@intel.com Signed-off-by: Jacek Piasecki --- driv

[dpdk-dev] [PATCH v4 5/5] test/cfgfile: add new unit test

2017-07-10 Thread Jacek Piasecki
Load huge realloc_sections.ini file to check malloc/realloc ability of cfgfile library. Signed-off-by: Jacek Piasecki --- test/test/test_cfgfile.c | 40 +++ test/test/test_cfgfiles/etc/realloc_sections.ini | 128 +++ 2 files changed, 168

[dpdk-dev] [PATCH v4 4/5] cfgfile: rework of load function

2017-07-10 Thread Jacek Piasecki
New functions added to cfgfile library make it possible to significantly simplify the code of rte_cfgfile_load_with_params() This patch shows the new body of this function. Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/rte_cfgfile.c | 156 --- 1 file

[dpdk-dev] [PATCH v4 3/5] cfgfile: add new functions to API

2017-07-10 Thread Jacek Piasecki
-existing one. Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/rte_cfgfile.c | 186 + lib/librte_cfgfile/rte_cfgfile.h | 76 lib/librte_cfgfile/rte_cfgfile_version.map | 11 ++ 3 files changed, 273 insertions(+) diff --git a/lib

[dpdk-dev] [PATCH v4 2/5] cfgfile: change existing API functions

2017-07-10 Thread Jacek Piasecki
Change to flat arrays in cfgfile struct force slightly diffrent data access for most of cfgfile functions. This patch provides necessary changes in existing API. Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/rte_cfgfile.c | 120 +++ lib/librte_cfgfile

[dpdk-dev] [PATCH v4 1/5] cfgfile: remove EAL dependency

2017-07-10 Thread Jacek Piasecki
This patch removes the dependency to EAL in cfgfile library. Signed-off-by: Jacek Piasecki --- lib/Makefile | 3 +-- lib/librte_cfgfile/Makefile | 1 + lib/librte_cfgfile/rte_cfgfile.c | 29 + 3 files changed, 19 insertions(+), 14 deletions

[dpdk-dev] [PATCH v4 0/5] Rework cfgfile API to enable apps config file support

2017-07-10 Thread Jacek Piasecki
() 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

[dpdk-dev] [PATCH v3 3/3] app/testpmd: add parse arguments from JSON config file

2017-06-27 Thread Jacek Piasecki
From: Kuba Kozak This patch shows usage of Jansson library to parse application arguments from JSON config file. https://github.com/akheron/jansson If a --cfgfile-path option is passed into commandline non EAL section, then the disired JSON file is loaded and used by app. In case when JSON doe

[dpdk-dev] [PATCH v3 2/3] app/testpmd: changed example to parse options from cfg file

2017-06-27 Thread Jacek Piasecki
From: Kuba Kozak This patch shows how to pass arguments to application using config.ini file. If a --cfgfile-path option is passed into commandline non EAL section, then the file is loaded and used by app. If a config.ini file is present in current working directory, and no --cfgfile-path opti

[dpdk-dev] [PATCH v3 1/3] eal: add functions parsing EAL arguments

2017-06-27 Thread Jacek Piasecki
From: Kuba Kozak added function rte_eal_configure which configure Environment Abstraction Layer (EAL) using configuration structure. Signed-off-by: Kuba Kozak Suggested-by: Bruce Richardson --- This patch depends on cfgfile patchset with: "cfgfile: remove EAL dependency" "cfgfile: add new func

[dpdk-dev] [PATCH v3 0/3] EAL change for using a config file for DPDK

2017-06-27 Thread Jacek Piasecki
This patchset introduce a mechanism for running dpdk application with parameters provided by configuration file. A new API for EAL takes a config file data type - either loaded from file, or built up programmatically in the application - and extracts DPDK parameters from it to be used when eal ini

[dpdk-dev] [PATCH v3 4/4] test/cfgfile: add new unit test

2017-06-27 Thread Jacek Piasecki
Load huge realloc_sections.ini file to check malloc/realloc ability of cfgfile library. Signed-off-by: Jacek Piasecki --- test/test/test_cfgfile.c | 40 +++ test/test/test_cfgfiles/etc/realloc_sections.ini | 128 +++ 2 files changed, 168

[dpdk-dev] [PATCH v3 3/4] cfgfile: rework of load function

2017-06-27 Thread Jacek Piasecki
From: Kuba Kozak New functions added to cfgfile library make it possible to significantly simplify the code of rte_cfgfile_load_with_params() This patch shows the new body of this function. Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/rte_cfgfile.c | 143

[dpdk-dev] [PATCH v3 2/4] cfgfile: add new functions to API

2017-06-27 Thread Jacek Piasecki
-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(-) diff

[dpdk-dev] [PATCH v3 1/4] cfgfile: remove EAL dependency

2017-06-27 Thread Jacek Piasecki
This patch removes the dependency to EAL in cfgfile library. Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/Makefile | 1 + lib/librte_cfgfile/rte_cfgfile.c | 29 + 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/librte_cfgfile

[dpdk-dev] [PATCH v3 0/4] Rework cfgfile API to enable apps config file support

2017-06-27 Thread Jacek Piasecki
realloc/malloc of new API functions, add test for save() function Jacek Piasecki (3): cfgfile: remove EAL dependency cfgfile: add new functions to API test/cfgfile: add new unit test Kuba Kozak (1): cfgfile: rework of load function lib/librte_cfgfile/Makefile | 1

[dpdk-dev] [PATCH v2 7/7] app/testpmd: add parse arguments from JSON config file

2017-06-26 Thread Jacek Piasecki
From: Kuba Kozak This patch shows usage of Jansson library to parse application arguments from JSON config file. https://github.com/akheron/jansson If a --cfgfile-path option is passed into commandline non EAL section, then the disired JSON file is loaded and used by app. In case when JSON doe

[dpdk-dev] [PATCH v2 6/7] app/testpmd: changed example to parse options from cfg file

2017-06-26 Thread Jacek Piasecki
From: Kuba Kozak This patch shows how to pass arguments to application using config.ini file. If a --cfgfile-path option is passed into commandline non EAL section, then the file is loaded and used by app. If a config.ini file is present in current working directory, and no --cfgfile-path opti

[dpdk-dev] [PATCH v2 5/7] eal: add functions parsing EAL arguments

2017-06-26 Thread Jacek Piasecki
From: Kuba Kozak added function rte_eal_configure which configure Environment Abstraction Layer (EAL) using configuration structure. Signed-off-by: Kuba Kozak Suggested-by: Bruce Richardson --- config/common_base | 1 + lib/Makefile

[dpdk-dev] [PATCH v2 4/7] test/cfgfile: add new unit test

2017-06-26 Thread Jacek Piasecki
Load huge realloc_sections.ini file to check malloc/realloc ability of cfgfile library. Signed-off-by: Jacek Piasecki --- test/test/test_cfgfile.c | 40 +++ test/test/test_cfgfiles/etc/realloc_sections.ini | 128 +++ 2 files changed, 168

[dpdk-dev] [PATCH v2 3/7] cfgfile: rework of load function

2017-06-26 Thread Jacek Piasecki
From: Kuba Kozak New functions added to cfgfile library make it possible to significantly simplify the code of rte_cfgfile_load_with_params() This patch shows the new body of this function. Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/rte_cfgfile.c | 143

[dpdk-dev] [PATCH v2 2/7] cfgfile: add new functions to API

2017-06-26 Thread Jacek Piasecki
-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(-) diff

[dpdk-dev] [PATCH v2 1/7] cfgfile: remove EAL dependency

2017-06-26 Thread Jacek Piasecki
This patch removes the dependency to EAL in cfgfile library. Signed-off-by: Jacek Piasecki --- lib/librte_cfgfile/Makefile | 1 + lib/librte_cfgfile/rte_cfgfile.c | 29 + 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/lib/librte_cfgfile

[dpdk-dev] [PATCH v2 0/7] Add support for using a config file for DPDK

2017-06-26 Thread Jacek Piasecki
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 (3): cfgfile: remove EAL dependency cfgfile: add new functions

[dpdk-dev] [PATCH 3/3] app/testpmd: changed example to parse options from cfg file

2017-05-30 Thread Jacek Piasecki
From: Kuba Kozak This patch shows how to pass arguments to application using config.ini file. If a --cfgfile-path option is passed into commandline non EAL section, then the file is loaded and used by app. If a file called config.ini is present in current working directory, and no --cfgfile-pa

[dpdk-dev] [PATCH 2/3] eal: add functions parsing EAL arguments

2017-05-30 Thread Jacek Piasecki
From: Kuba Kozak added function rte_eal_configure which translate options from config file into argc, **argv form. changed function rte_eal_init to meld argc, argv** options from config file with these from command line and then parse as before Signed-off-by: Kuba Kozak Suggested-by: Bruce Ric

[dpdk-dev] [PATCH 1/3] cfgfile: add new API functions

2017-05-30 Thread Jacek Piasecki
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/Makefile|1 + lib/librte_cfgfile

[dpdk-dev] [PATCH 0/3] Add support for using a config file for DPDK

2017-05-30 Thread Jacek Piasecki
: support for subsections – allowing to pass i.e. [DPDK.vdev0] and its parameters, cleanup to EAL API and testpmd. Jacek Piasecki (1): cfgfile: add new API functions Kuba Kozak (2): eal: add functions parsing EAL arguments app/testpmd: changed example to parse options from cfg file app/test

[dpdk-dev] [PATCH v4 2/3] net/e1000: new xstats API add ID support for e1000

2017-04-10 Thread Jacek Piasecki
array. Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/e1000/igb_ethdev.c | 92 +- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index cc2c244..8fed210

[dpdk-dev] [PATCH v4 3/3] net/ixgbe: new xstats API add ID support for ixgbe

2017-04-10 Thread Jacek Piasecki
ids array. Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/ixgbe/ixgbe_ethdev.c | 179 +++ 1 file changed, 179 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 1462324..76a5499 100644

[dpdk-dev] [PATCH v4 1/3] ethdev: new xstats API add retrieving by ID

2017-04-10 Thread Jacek Piasecki
the monitoring application no longer wastes PCIe bandwidth and CPU time. Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak Signed-off-by: Tomasz Kulasek --- app/proc_info/main.c| 150 ++- app/test-pmd/config.c | 19 +- doc/guides/prog_guide/po

[dpdk-dev] [PATCH v4 0/3] Extended xstats API in ethdev library to allow grouping of stats

2017-04-10 Thread Jacek Piasecki
after API modification fix xstats display for PMD without _by_ids() functions fix ABI validator errors v3 changes: checkpatch fixes removed malloc bug in ethdev add new command to proc_info and IDs parsing merged testpmd and proc_info patch with library patch Jacek Piasecki (3): ethdev: new xstats

[dpdk-dev] [PATCH v3 3/3] add new xstats API id support for ixgbe

2017-04-03 Thread Jacek Piasecki
of statistics specified by ids array. Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/ixgbe/ixgbe_ethdev.c | 179 +++ 1 file changed, 179 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c

[dpdk-dev] [PATCH v3 2/3] add new xstats API id support for e1000

2017-04-03 Thread Jacek Piasecki
statistics specified by ids array. Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/e1000/igb_ethdev.c | 92 +- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000

[dpdk-dev] [PATCH v3 1/3] add new xstats API retrieving by id

2017-04-03 Thread Jacek Piasecki
: add support for new xstats API retrieving by id to proc_info application. There is a new argument --xstats-ids in proc_info command line to retrieve statistics given by ids. E.g. --xstats-ids="1,3,5,7,8" Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak Signed-off-by: Toma

[dpdk-dev] [PATCH v3 0/3] Extended xstats API in ethdev library to allow grouping of stats

2017-04-03 Thread Jacek Piasecki
malloc bug in ethdev add new command to proc_info and IDs parsing merged testpmd and proc_info patch with library patch Jacek Piasecki (3): add new xstats API retrieving by id add new xstats API id support for e1000 add new xstats API id support for ixgbe app/proc_info/main.c

[dpdk-dev] [PATCH v2] app/test-crypto-perf: fix incorrect size of expression

2017-02-10 Thread Jacek Piasecki
Fix problem of passing a pointer to sizeof() function. Now the size of enabled_cdevs structure is passed by RTE_CRYPTO_MAX_DEVS. Coverity issue: 141068 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Jacek Piasecki --- v2: * RTE_CRYPTO_M

[dpdk-dev] [PATCH] app/test-crypto-perf: fix incorrect size of expression

2017-02-08 Thread Jacek Piasecki
Fix problem of passing a pointer to sizeof() function. Now the size of enabled_cdevs structure is passed by RTE_CRYPTO_MAX_DEVS. Coverity issue: 141068 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Jacek Piasecki --- app/test-crypto-p

[dpdk-dev] [PATCH] app/test-crypto-perf: fix big paremeter passed by value

2017-02-08 Thread Jacek Piasecki
Structure opts and structure test_vec are now passed by pointer to the cperf_check_test_vector. Coverity issue: 141072 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Jacek Piasecki --- app/test-crypto-perf/m