mbox series

[v3,00/13] Fixes and unit tests for librte_security

Message ID 20200409172502.1693-1-l.wojciechow@partner.samsung.com (mailing list archive)
Headers
Series Fixes and unit tests for librte_security |

Message

Lukasz Wojciechowski April 9, 2020, 5:24 p.m. UTC
  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.

---
v3:
* Use generic RTE_DEBUG flag instead CONFIG_RTE_LIBRTE_SECURITY_DEBUG
* Remove RTE_TEST_TRACE_FAILURE macro definition in app/test/test.h

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: remove 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                    |    2 -
 app/test/test_security.c           | 2435 ++++++++++++++++++++++++++++
 lib/librte_security/rte_security.c |   71 +-
 lib/librte_security/rte_security.h |    8 +-
 6 files changed, 2498 insertions(+), 23 deletions(-)
 create mode 100644 app/test/test_security.c
  

Comments

Akhil Goyal April 17, 2020, 7:46 p.m. UTC | #1
Hi Lukasz,
> 
> 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.
> 
> ---
Series
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>


>  create mode 100644 app/test/test_security.c
This file need a MAINTANERS entry
Could you please send an update? I will squash it in the 5th patch.


> 
> --
> 2.17.1
  
Lukasz Wojciechowski April 17, 2020, 8:14 p.m. UTC | #2
W dniu 17.04.2020 o 21:46, Akhil Goyal pisze:
> Hi Lukasz,
>> 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.
>>
>> ---
> Series
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Thank you
>
>>   create mode 100644 app/test/test_security.c
> This file need a MAINTANERS entry
> Could you please send an update? I will squash it in the 5th patch.
>
I don't know if I should send the new version of al patches or just 
paste it here. Please let me know, if I should send the new updated patches.

diff --git a/MAINTAINERS b/MAINTAINERS
index f38621c2e..baa7fe015 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -412,6 +412,7 @@ M: Declan Doherty <declan.doherty@intel.com>
  T: git://dpdk.org/next/dpdk-next-crypto
  F: lib/librte_security/
  F: doc/guides/prog_guide/rte_security.rst
+F: app/test/test_security.c

  Compression API - EXPERIMENTAL
  M: Fiona Trahe <fiona.trahe@intel.com>

>> --
>> 2.17.1
  
Akhil Goyal April 17, 2020, 8:21 p.m. UTC | #3
> W dniu 17.04.2020 o 21:46, Akhil Goyal pisze:
> > Hi Lukasz,
> >> 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.
> >>
> >> ---
> > Series
> > Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
> Thank you
> >
> >>   create mode 100644 app/test/test_security.c
> > This file need a MAINTANERS entry
> > Could you please send an update? I will squash it in the 5th patch.
> >
> I don't know if I should send the new version of al patches or just
> paste it here. Please let me know, if I should send the new updated patches.
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f38621c2e..baa7fe015 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -412,6 +412,7 @@ M: Declan Doherty <declan.doherty@intel.com>
>   T: git://dpdk.org/next/dpdk-next-crypto
>   F: lib/librte_security/
>   F: doc/guides/prog_guide/rte_security.rst
> +F: app/test/test_security.c
> 
Added the above change in your 5th patch.

Applied to dpdk-next-crypto

Thanks
  
Lukasz Wojciechowski April 17, 2020, 8:39 p.m. UTC | #4
W dniu 17.04.2020 o 22:21, Akhil Goyal pisze:
>> W dniu 17.04.2020 o 21:46, Akhil Goyal pisze:
>>> Hi Lukasz,
>>>> 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.
>>>>
>>>> ---
>>> Series
>>> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
>> Thank you
>>>>    create mode 100644 app/test/test_security.c
>>> This file need a MAINTANERS entry
>>> Could you please send an update? I will squash it in the 5th patch.
>>>
>> I don't know if I should send the new version of al patches or just
>> paste it here. Please let me know, if I should send the new updated patches.
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index f38621c2e..baa7fe015 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -412,6 +412,7 @@ M: Declan Doherty <declan.doherty@intel.com>
>>    T: git://dpdk.org/next/dpdk-next-crypto
>>    F: lib/librte_security/
>>    F: doc/guides/prog_guide/rte_security.rst
>> +F: app/test/test_security.c
>>
> Added the above change in your 5th patch.
>
> Applied to dpdk-next-crypto
>
> Thanks
>
Great! Thank you so much.