[dpdk-dev] [PATCH] l3fwd-acl: fix unchecked return value

2017-10-03 Thread Kuba Kozak
Add return value check and error handling for fseek call. Coverity issue: 143435 Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl") Cc: konstantin.anan...@intel.com Cc: sta...@dpdk.org Signed-off-by: Kuba Kozak Acked-by: Konstantin Ananyev --- examples/l3fwd-acl/main.c | 7 +

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

2017-09-19 Thread Kuba Kozak
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

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

2017-09-19 Thread Kuba Kozak
From: Jacek Piasecki This patch removes the dependency to EAL in cfgfile library. Signed-off-by: Jacek Piasecki Acked-by: Bruce Richardson --- lib/Makefile | 3 +-- lib/librte_cfgfile/Makefile | 1 + lib/librte_cfgfile/rte_cfgfile.c | 29 +---

[dpdk-dev] [PATCH v5 3/5] cfgfile: add APIs for cfgfile modification

2017-09-19 Thread Kuba Kozak
From: Jacek Piasecki 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 r

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

2017-09-19 Thread Kuba Kozak
From: Jacek Piasecki Load huge realloc_sections.ini file to check malloc/realloc ability of cfgfile library. Signed-off-by: Jacek Piasecki Acked-by: Bruce Richardson --- test/test/test_cfgfile.c | 41 test/test/test_cfgfiles/etc/realloc_sections.ini | 128 +++

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

2017-09-19 Thread Kuba Kozak
From: 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 Acked-by: Bruce Richardson --- lib/librte_cfgfile/rte_cfgfile.c | 15

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

2017-09-19 Thread Kuba Kozak
From: 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 Acked-by: Bruce Richardson --- doc/guides/rel_notes/deprecation.rst | 5 ++ li

[dpdk-dev] [PATCH] vfio: fix close unchecked file descriptor

2017-09-20 Thread Kuba Kozak
Add file descriptor value check before calling close() function. Coverity issue: 141297 Fixes: 811b6b25060f ("vfio: fix file descriptor leak in multi-process") Cc: patr...@patrickmacarthur.net Cc: sta...@dpdk.org Signed-off-by: Kuba Kozak --- lib/librte_eal/linuxapp/eal/eal_vfio_mp_

[dpdk-dev] [PATCH] acl: fix unchecked return value

2017-09-20 Thread Kuba Kozak
Add return value check and error handling for fseek call. Coverity issue: 143435 Fixes: 361b2e9559fc ("acl: new sample l3fwd-acl") Cc: konstantin.anan...@intel.com Cc: sta...@dpdk.org Signed-off-by: Kuba Kozak --- examples/l3fwd-acl/main.c | 7 ++- 1 file changed, 6 insert

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

2017-09-22 Thread Kuba Kozak
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

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

2017-09-22 Thread Kuba Kozak
From: Jacek Piasecki This patch removes the dependency to EAL in cfgfile library. Signed-off-by: Jacek Piasecki Acked-by: Bruce Richardson --- lib/Makefile | 3 +-- lib/librte_cfgfile/Makefile | 1 + lib/librte_cfgfile/rte_cfgfile.c | 29 +---

[dpdk-dev] [PATCH v6 3/5] cfgfile: add APIs for cfgfile modification

2017-09-22 Thread Kuba Kozak
From: Jacek Piasecki 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 r

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

2017-09-22 Thread Kuba Kozak
From: 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 Acked-by: Bruce Richardson --- lib/librte_cfgfile/rte_cfgfile.c | 121 ++

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

2017-09-22 Thread Kuba Kozak
From: 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 Acked-by: Bruce Richardson --- lib/librte_cfgfile/rte_cfgfile.c | 15

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

2017-09-22 Thread Kuba Kozak
From: Jacek Piasecki Load huge realloc_sections.ini file to check malloc/realloc ability of cfgfile library. Signed-off-by: Jacek Piasecki Acked-by: Bruce Richardson --- test/test/test_cfgfile.c | 41 test/test/test_cfgfiles/etc/realloc_sections.ini | 128 +++

[dpdk-dev] [PATCH] vhost: fix unchecked return value

2017-09-22 Thread Kuba Kozak
Add return value check for poll() call. Coverity issue: 140740 Fixes: 59317cef249c ("vhost: allow many vhost-user ports") Cc: jan.wick...@ericsson.com Cc: sta...@dpdk.org Signed-off-by: Kuba Kozak --- lib/librte_vhost/fd_man.c | 5 - 1 file changed, 4 insertions(+), 1 deletio

[dpdk-dev] [PATCH] app/crypto-perf: fix total_ops value validation

2017-02-07 Thread Kuba Kozak
Added total_ops value validation in parse_total_ops() function. Coverity issue: 141070 Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application") Signed-off-by: Kuba Kozak --- app/test-crypto-perf/cperf_options_parsing.c | 8 +++- 1 file changed, 7 insert

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

2017-04-13 Thread Kuba Kozak
/ixgbe: new xstats API add ID support for ixgbe Kuba Kozak (2): ethdev: added new function for xstats ID proc-info: add support for new xstats API app/proc_info/main.c| 148 ++- app/test-pmd/config.c | 19 +- doc/guides/prog_guide/poll_mode_drv.rst

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

2017-04-13 Thread Kuba Kozak
onger 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| 6 +- app/test-pmd/config.c | 19 +- doc/guides/prog_guide/poll_mode_drv.rst | 173 --

[dpdk-dev] [PATCH v6 2/5] ethdev: added new function for xstats ID

2017-04-13 Thread Kuba Kozak
Introduced new function: rte_eth_xstats_get_id_by_name to retrieve xstats ids by its names. doc: added release note Signed-off-by: Kuba Kozak --- doc/guides/rel_notes/release_17_05.rst | 2 ++ lib/librte_ether/rte_ethdev.c | 44 ++ lib/librte_ether

[dpdk-dev] [PATCH v6 3/5] proc-info: add support for new xstats API

2017-04-13 Thread Kuba Kozak
es_all are marked as deprecated Signed-off-by: Kuba Kozak --- app/proc_info/main.c | 150 ++ lib/librte_ether/rte_ethdev.c | 4 +- lib/librte_ether/rte_ethdev.h | 2 + 3 files changed, 143 insertions(+), 13 deletions(-) diff --git a/app/proc_i

[dpdk-dev] [PATCH v6 4/5] net/e1000: new xstats API add ID support for e1000

2017-04-13 Thread Kuba Kozak
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/igb_ethdev.c

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

2017-04-13 Thread Kuba Kozak
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 index

[dpdk-dev] [PATCH 0/4] extend API to retriving xstats by group and xstats by name

2017-03-02 Thread Kuba Kozak
Added three new functions to API: rte_eth_xstats_get_by_name(), rte_eth_xstats_get_by_group(), rte_eth_xstats_get_names_by_group(). Extension of the 'rte_igb_xstats_name_off' structure with additional field 'group_mask'. For each xstats there is now specified group (e.g. TX_GROUP), one xstatistic

[dpdk-dev] [PATCH 1/4] ethdev: add retrieving xstats by group and xstats by name

2017-03-02 Thread Kuba Kozak
From: Jacek Piasecki This patch extends library for retriving xstats by specified groups and single xstat by given name. Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- lib/librte_ether/rte_ethdev.c | 310 -- lib/librte_ether/rte_ethdev.h

[dpdk-dev] [PATCH 3/4] net/ixgbe: add grouping of xstats for ixgbe driver

2017-03-02 Thread Kuba Kozak
s by group on driver level, there are two functions added: ixgbe_dev_xstats_get_by_group() and ixgbe_dev_xstats_get_names_by_group() Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/ixgbe/ixgbe_ethdev.c | 586 +++ 1 file changed, 475 insertio

[dpdk-dev] [PATCH 2/4] net/e1000: add grouping of xstats for e1000 driver

2017-03-02 Thread Kuba Kozak
roup on driver level, there are two functions added: eth_igb_xstats_get_by_group() and eth_igb_xstats_get_names_by_group() Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/e1000/igb_ethdev.c | 268 +++-- 1 file changed, 206 inserti

[dpdk-dev] [PATCH 0/4] extend API to retriving xstats by group and xstats by name

2017-03-03 Thread Kuba Kozak
Added three new functions to API: rte_eth_xstats_get_by_name(), rte_eth_xstats_get_by_group(), rte_eth_xstats_get_names_by_group(). Extension of the 'rte_igb_xstats_name_off' structure with additional field 'group_mask'. For each xstats there is now specified group (e.g. TX_GROUP), one xstatistic

[dpdk-dev] [PATCH 1/4] ethdev: add retrieving xstats by group and xstats by name

2017-03-03 Thread Kuba Kozak
From: Jacek Piasecki This patch extends library for retriving xstats by specified groups and single xstat by given name. Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- lib/librte_ether/rte_ethdev.c | 310 -- lib/librte_ether/rte_ethdev.h

[dpdk-dev] [PATCH 2/4] net/e1000: add grouping of xstats for e1000 driver

2017-03-03 Thread Kuba Kozak
roup on driver level, there are two functions added: eth_igb_xstats_get_by_group() and eth_igb_xstats_get_names_by_group() Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/e1000/igb_ethdev.c | 261 +++-- 1 file changed, 199 inserti

[dpdk-dev] [PATCH 3/4] net/ixgbe: add grouping of xstats for ixgbe driver

2017-03-03 Thread Kuba Kozak
s by group on driver level, there are two functions added: ixgbe_dev_xstats_get_by_group() and ixgbe_dev_xstats_get_names_by_group() Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- drivers/net/ixgbe/ixgbe_ethdev.c | 496 +++ 1 file changed, 403 inserti

[dpdk-dev] [PATCH 4/4] app/proc_info: add support for xstats-name and xstats-group

2017-03-03 Thread Kuba Kozak
GROUPNAME: to display group of xstats by GROUPNAME Signed-off-by: Jacek Piasecki Signed-off-by: Kuba Kozak --- app/proc_info/main.c | 112 ++- 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/app/proc_info/main.c b/app/proc_info/main.c index

[dpdk-dev] [PATCH] ethdev: fix wrong sizeof argument in malloc function

2017-05-08 Thread Kuba Kozak
From: Michal Jastrzebski Coverity reported that an argument for sizeof was used improperly. We should allocate memory for value size that pointer points to, instead of pointer size itself. Coverity issue: 144522 Fixes: 79c913a42f0e ("ethdev: retrieve xstats by ID") Signed-off-by: Michal Jastr

[dpdk-dev] [PATCH] proc-info: wrong sizeof argument in malloc function

2017-05-08 Thread Kuba Kozak
From: Michal Jastrzebski Coverity reported that an argument for sizeof was used improperly. We should allocate memory for value size that pointer points to, instead of pointer size itself. Coverity issue: 144523, 144521 Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name") S

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

2017-07-13 Thread Kuba Kozak
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() functi

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

2017-07-13 Thread Kuba Kozak
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() functi

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

2017-07-13 Thread 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 --- lib/Makefile| 3 + lib/librte_eal/bsdapp/eal/Makefile | 4 + lib

[dpdk-dev] [PATCH v5 3/3] app/testpmd: add parse options from JSON cfg file

2017-07-13 Thread Kuba Kozak
n INI file is loaded. The INI file can be passed also from --cfgfile-path option. If a file called config.ini is present in current working directory, and no --cfgfile-path option is passed in, config.ini file will be loaded and used by app. Signed-off-by: Kuba Kozak Suggested-by: Bruce Richa

[dpdk-dev] [PATCH v5 2/3] app/testpmd: add parse options from cfg file

2017-07-13 Thread Kuba Kozak
, config.ini file will be loaded and used by app as default configuration. Signed-off-by: Kuba Kozak Suggested-by: Bruce Richardson --- app/test-pmd/config.ini | 24 + app/test-pmd/parameters.c | 1181 + app/test-pmd/testpmd.c| 67 ++- app/test

[dpdk-dev] [PATCH] examples/l2fwd-crypto: add option --[no-]mac-updating

2017-07-19 Thread Kuba Kozak
This patch adds a new option to enable/disable the MAC addresses updating done at forwarding time: --[no-]mac-updating By default, MAC address updating remains enabled, to keep consistency with previous usage. Signed-off-by: Kuba Kozak --- doc/guides/sample_app_ug/l2_forward_crypto.rst | 7

[dpdk-dev] [PATCH] net/e1000: fix out of bounds access

2017-07-25 Thread Kuba Kozak
Fix wrong structure type used as argument in memset() call. Coverity issue: 147223 Coverity issue: 147227 Fixes: a8600af43738 ("net/igb: parse flow API ethertype filter") Fixes: 22bb13410cb2 ("net/igb: create consistent filter") Cc: sta...@dpdk.org Signed-off-by: Kuba Koz

[dpdk-dev] [PATCH] net/i40e: fix dereferencing null pointer

2017-07-27 Thread Kuba Kozak
Add check if o_vlan_mask and i_vlan_mask are not a NULL pointer. Coverity issue: 143448 Coverity issue: 143449 Fixes: d37705068ee8 ("net/i40e: parse QinQ pattern") Cc: sta...@dpdk.org Signed-off-by: Kuba Kozak --- drivers/net/i40e/i40e_flow.c | 6 -- 1 file changed, 4 insert

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

2017-07-10 Thread 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 --- lib/Makefile| 3 + lib/librte_eal/bsdapp/eal/Makefile | 4 + lib

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

2017-07-10 Thread Kuba Kozak
simplifying the code Add unit test realloc_sections() in TEST app for testing realloc/malloc of new API functions, add test for save() function Kuba Kozak (3): eal: add functions parsing EAL arguments app/testpmd: add parse options from cfg file app/testpmd: add parse options from JSON

[dpdk-dev] [PATCH v4 2/3] app/testpmd: add parse options from cfg file

2017-07-10 Thread Kuba Kozak
, config.ini file will be loaded and used by app as default configuration. Signed-off-by: Kuba Kozak Suggested-by: Bruce Richardson --- app/test-pmd/config.ini | 24 + app/test-pmd/parameters.c | 1181 + app/test-pmd/testpmd.c| 67 ++- app/test

[dpdk-dev] [PATCH v4 3/3] app/testpmd: add parse options from JSON cfg file

2017-07-10 Thread Kuba Kozak
n INI file is loaded. The INI file can be passed also from --cfgfile-path option. If a file called config.ini is present in current working directory, and no --cfgfile-path option is passed in, config.ini file will be loaded and used by app. Signed-off-by: Kuba Kozak Suggested-by: Bruce Richa