Set of patches fix minor issues like proper verification of input parameters and aligning documentation with code in the matter of return values. Another fixed issue is invalid decrementation of the session counter which might cause inconsistency between counter values and a true number of sessions.
All of these issues (and all the librte_security) code is covered with unit tests. The tests are added to dpdk-test application and can be launched with "security_autotest" command. --- v2: * Fix patches' topics for librte_security to security * Introduce CONFIG_RTE_LIBRTE_SECURITY_DEBUG flag and: ** make it disabled by default ** verify parameters in dataplane API calls only when option is enabled ** skip tests of code disabled by the option * Add Fixes tags * Introduce RTE_PTR_CHAIN3_OR_ERR_RET macro for doing 3 chain checks * Removed C99 style comments * Remove check of m parameter in rte_security_set_pkt_metadata * Fix code style warnings Lukasz Wojciechowski (13): security: fix verification of parameters security: fix return types in documentation security: fix session counter app/test: fix macro definition app/test: introduce librte security tests app/test: add rte security session update tests app/test: add rte security session get size tests app/test: add rte security session stats get tests app/test: add rte security session destroy tests app/test: add rte security set pkt metadata tests app/test: add rte security get userdata tests app/test: add rte security capabilities get tests app/test: add rte security capability get tests app/test/Makefile | 2 + app/test/meson.build | 3 + app/test/test.h | 4 +- app/test/test_security.c | 2435 ++++++++++++++++++++++++++++ config/common_base | 1 + lib/librte_security/rte_security.c | 71 +- lib/librte_security/rte_security.h | 8 +- 7 files changed, 2502 insertions(+), 22 deletions(-) create mode 100644 app/test/test_security.c -- 2.17.1