mbox series

[0/3] Crypto test refactoring (second phase)

Message ID 1586887459-222433-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
Headers
Series Crypto test refactoring (second phase) |

Message

De Lara Guarch, Pablo April 14, 2020, 6:04 p.m. UTC
  This patchset is the phase two of the crypto test refactoring
effort. It mainly focuses on removing the PMD bitmask used
to select which PMDs are used to run the tests against.
Instead, now all PMDs will run all test cases and the capability
checking will determine which ones are supported and therefore,
are not skipped.

Since there are tests cases that require sessionless support,
a new feature flag has been added, which reflects this support per PMD.

I am CC'ing all PMD maintainers, asking for their collaboration to
test this patchset, as this might impact the testing of each PMD.


This patchset depends on:
(1) http://patches.dpdk.org/patch/68433/ (crypto/openssl: fix out-of-place encryption)
(2) http://patches.dpdk.org/patch/68434/ (cryptodev: add missing feature name)
(3) http://patches.dpdk.org/cover/68435/ (Crypto test refactoring (first phase))

Pablo de Lara (3):
  cryptodev: add sessionless support feature flag
  test/crypto: check if device supports sessionless
  test/crypto: do not check for PMD in tests

 app/test/test_cryptodev.c                    |   1 -
 app/test/test_cryptodev_aes_test_vectors.h   | 519 ---------------------------
 app/test/test_cryptodev_blockcipher.c        | 139 +------
 app/test/test_cryptodev_blockcipher.h        |  18 -
 app/test/test_cryptodev_des_test_vectors.h   | 160 ---------
 app/test/test_cryptodev_hash_test_vectors.h  | 219 -----------
 doc/guides/cryptodevs/features/aesni_gcm.ini |   1 +
 doc/guides/cryptodevs/features/aesni_mb.ini  |   1 +
 doc/guides/cryptodevs/features/armv8.ini     |   1 +
 doc/guides/cryptodevs/features/caam_jr.ini   |   2 +-
 doc/guides/cryptodevs/features/ccp.ini       |   3 +-
 doc/guides/cryptodevs/features/default.ini   |   1 +
 doc/guides/cryptodevs/features/kasumi.ini    |   3 +-
 doc/guides/cryptodevs/features/octeontx.ini  |   1 +
 doc/guides/cryptodevs/features/octeontx2.ini |   1 +
 doc/guides/cryptodevs/features/openssl.ini   |   1 +
 doc/guides/cryptodevs/features/snow3g.ini    |   3 +-
 doc/guides/cryptodevs/features/zuc.ini       |   1 +
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c     |   3 +-
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c   |   3 +-
 drivers/crypto/armv8/rte_armv8_pmd.c         |   3 +-
 drivers/crypto/ccp/rte_ccp_pmd.c             |   3 +-
 drivers/crypto/kasumi/rte_kasumi_pmd.c       |   3 +-
 drivers/crypto/null/null_crypto_pmd.c        |   3 +-
 drivers/crypto/octeontx/otx_cryptodev_ops.c  |   3 +-
 drivers/crypto/octeontx2/otx2_cryptodev.c    |   3 +-
 drivers/crypto/openssl/rte_openssl_pmd.c     |   3 +-
 drivers/crypto/snow3g/rte_snow3g_pmd.c       |   3 +-
 drivers/crypto/zuc/rte_zuc_pmd.c             |   3 +-
 lib/librte_cryptodev/rte_cryptodev.c         |   2 +
 lib/librte_cryptodev/rte_cryptodev.h         |   2 +
 31 files changed, 51 insertions(+), 1061 deletions(-)
  

Comments

Ruifeng Wang April 16, 2020, 8:28 a.m. UTC | #1
> -----Original Message-----
> From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> Sent: Wednesday, April 15, 2020 2:04 AM
> To: declan.doherty@intel.com; ravi1.kumar@amd.com; Ruifeng Wang
> <Ruifeng.Wang@arm.com>; anoobj@marvell.com; roy.fan.zhang@intel.com;
> fiona.trahe@intel.com; tdu@semihalf.com; rnagadheeraj@marvell.com;
> adwivedi@marvell.com; g.singh@nxp.com; hemant.agrawal@nxp.com;
> jianjay.zhou@huawei.com
> Cc: dev@dpdk.org; Akhil.goyal@nxp.com; Pablo de Lara
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH 0/3] Crypto test refactoring (second phase)
> 
> This patchset is the phase two of the crypto test refactoring effort. It mainly
> focuses on removing the PMD bitmask used to select which PMDs are used
> to run the tests against.
> Instead, now all PMDs will run all test cases and the capability checking will
> determine which ones are supported and therefore, are not skipped.
> 
> Since there are tests cases that require sessionless support, a new feature
> flag has been added, which reflects this support per PMD.
> 
> I am CC'ing all PMD maintainers, asking for their collaboration to test this
> patchset, as this might impact the testing of each PMD.
> 
> 
> This patchset depends on:
> (1) http://patches.dpdk.org/patch/68433/ (crypto/openssl: fix out-of-place
> encryption)
> (2) http://patches.dpdk.org/patch/68434/ (cryptodev: add missing feature
> name)
> (3) http://patches.dpdk.org/cover/68435/ (Crypto test refactoring (first
> phase))
> 
> Pablo de Lara (3):
>   cryptodev: add sessionless support feature flag
>   test/crypto: check if device supports sessionless
>   test/crypto: do not check for PMD in tests
> 
There is one test case failure with crypto_armv8 after applying these patches.
I will try to locate it.

  33) TestCase AES-128-CBC HMAC-SHA1 Decryption Digest Verify Sessionless PASS
  34) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x8byte PASS
  35) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x8byte PASS
  36) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x8byte - OOP PASS
  37) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x8byte - OOP PASS
  38) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x4byte PASS
  39) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x4byte PASS
  40) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x4byte - OOP PASS
  41) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x4byte - OOP PASS
  42) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x1byte PASS
  43) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x1byte PASS
  44) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x1byte - OOP PASS
  45) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x1byte - OOP PASS
 + TestCase [ 0] : test_AES_chain_all failed
digest: at [0x13e6fe340], len=20
00000000: 9A 4F 88 1B B6 8F D8 60 42 1A 7D 3D F5 82 80 F1 | .O.....`B.}=....
00000010: 18 8C 1D 32                                     | ...2
 + TestCase [ 1] : auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt succeeded
digest: at [0x13e6fe340], len=20
00000000: 9A 4F 88 1B B6 8F D8 60 42 1A 7D 3D F5 82 80 F1 | .O.....`B.}=....
00000010: 18 8C 1D 32                                     | ...2
 + TestCase [ 2] : auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt succeeded
 + ------------------------------------------------------- +
 + Test Suite Summary
 + Tests Total :        3
 + Tests Skipped :      0
 + Tests Executed :     3
 + Tests Unsupported:   0
 + Tests Passed :       2
 + Tests Failed :       1
 + ------------------------------------------------------- +
Test Failed
RTE>>

>  app/test/test_cryptodev.c                    |   1 -
>  app/test/test_cryptodev_aes_test_vectors.h   | 519 ---------------------------
>  app/test/test_cryptodev_blockcipher.c        | 139 +------
>  app/test/test_cryptodev_blockcipher.h        |  18 -
>  app/test/test_cryptodev_des_test_vectors.h   | 160 ---------
>  app/test/test_cryptodev_hash_test_vectors.h  | 219 -----------
>  doc/guides/cryptodevs/features/aesni_gcm.ini |   1 +
>  doc/guides/cryptodevs/features/aesni_mb.ini  |   1 +
>  doc/guides/cryptodevs/features/armv8.ini     |   1 +
>  doc/guides/cryptodevs/features/caam_jr.ini   |   2 +-
>  doc/guides/cryptodevs/features/ccp.ini       |   3 +-
>  doc/guides/cryptodevs/features/default.ini   |   1 +
>  doc/guides/cryptodevs/features/kasumi.ini    |   3 +-
>  doc/guides/cryptodevs/features/octeontx.ini  |   1 +
>  doc/guides/cryptodevs/features/octeontx2.ini |   1 +
>  doc/guides/cryptodevs/features/openssl.ini   |   1 +
>  doc/guides/cryptodevs/features/snow3g.ini    |   3 +-
>  doc/guides/cryptodevs/features/zuc.ini       |   1 +
>  drivers/crypto/aesni_gcm/aesni_gcm_pmd.c     |   3 +-
>  drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c   |   3 +-
>  drivers/crypto/armv8/rte_armv8_pmd.c         |   3 +-
>  drivers/crypto/ccp/rte_ccp_pmd.c             |   3 +-
>  drivers/crypto/kasumi/rte_kasumi_pmd.c       |   3 +-
>  drivers/crypto/null/null_crypto_pmd.c        |   3 +-
>  drivers/crypto/octeontx/otx_cryptodev_ops.c  |   3 +-
>  drivers/crypto/octeontx2/otx2_cryptodev.c    |   3 +-
>  drivers/crypto/openssl/rte_openssl_pmd.c     |   3 +-
>  drivers/crypto/snow3g/rte_snow3g_pmd.c       |   3 +-
>  drivers/crypto/zuc/rte_zuc_pmd.c             |   3 +-
>  lib/librte_cryptodev/rte_cryptodev.c         |   2 +
>  lib/librte_cryptodev/rte_cryptodev.h         |   2 +
>  31 files changed, 51 insertions(+), 1061 deletions(-)
> 
> --
> 2.7.5
  
De Lara Guarch, Pablo April 16, 2020, 1:28 p.m. UTC | #2
Hi Ruifeng,

> -----Original Message-----
> From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> Sent: Thursday, April 16, 2020 9:29 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; ravi1.kumar@amd.com; anoobj@marvell.com;
> Zhang, Roy Fan <roy.fan.zhang@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; tdu@semihalf.com; rnagadheeraj@marvell.com;
> adwivedi@marvell.com; g.singh@nxp.com; hemant.agrawal@nxp.com;
> jianjay.zhou@huawei.com
> Cc: dev@dpdk.org; Akhil.goyal@nxp.com; nd <nd@arm.com>
> Subject: RE: [PATCH 0/3] Crypto test refactoring (second phase)
> 
> 
> > -----Original Message-----
> > From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > Sent: Wednesday, April 15, 2020 2:04 AM
> > To: declan.doherty@intel.com; ravi1.kumar@amd.com; Ruifeng Wang
> > <Ruifeng.Wang@arm.com>; anoobj@marvell.com; roy.fan.zhang@intel.com;
> > fiona.trahe@intel.com; tdu@semihalf.com; rnagadheeraj@marvell.com;
> > adwivedi@marvell.com; g.singh@nxp.com; hemant.agrawal@nxp.com;
> > jianjay.zhou@huawei.com
> > Cc: dev@dpdk.org; Akhil.goyal@nxp.com; Pablo de Lara
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [PATCH 0/3] Crypto test refactoring (second phase)
> >
> > This patchset is the phase two of the crypto test refactoring effort.
> > It mainly focuses on removing the PMD bitmask used to select which
> > PMDs are used to run the tests against.
> > Instead, now all PMDs will run all test cases and the capability
> > checking will determine which ones are supported and therefore, are not
> skipped.
> >
> > Since there are tests cases that require sessionless support, a new
> > feature flag has been added, which reflects this support per PMD.
> >
> > I am CC'ing all PMD maintainers, asking for their collaboration to
> > test this patchset, as this might impact the testing of each PMD.
> >
> >
> > This patchset depends on:
> > (1) http://patches.dpdk.org/patch/68433/ (crypto/openssl: fix
> > out-of-place
> > encryption)
> > (2) http://patches.dpdk.org/patch/68434/ (cryptodev: add missing
> > feature
> > name)
> > (3) http://patches.dpdk.org/cover/68435/ (Crypto test refactoring
> > (first
> > phase))
> >
> > Pablo de Lara (3):
> >   cryptodev: add sessionless support feature flag
> >   test/crypto: check if device supports sessionless
> >   test/crypto: do not check for PMD in tests
> >
> There is one test case failure with crypto_armv8 after applying these patches.
> I will try to locate it.
> 
>   33) TestCase AES-128-CBC HMAC-SHA1 Decryption Digest Verify Sessionless
> PASS
>   34) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x8byte PASS
>   35) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x8byte PASS
>   36) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x8byte - OOP PASS
>   37) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x8byte - OOP PASS
>   38) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x4byte PASS
>   39) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x4byte PASS
>   40) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x4byte - OOP PASS
>   41) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x4byte - OOP PASS
>   42) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x1byte PASS
>   43) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x1byte PASS
>   44) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x1byte - OOP PASS
>   45) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x1byte - OOP PASS  +

These test cases shouldn't be run, as your PMD doesn't support NULL cipher/auth.
Have you merged the first phase of this refactoring work?
I just pushed new versions for both phases, as there were a few problems in the first ones:
http://patches.dpdk.org/cover/68677/
http://patches.dpdk.org/cover/68681/

Could you tried the new versions? (remember to also apply http://patches.dpdk.org/patch/68433/
and http://patches.dpdk.org/patch/68434/)

Thanks,
Pablo
  
Ruifeng Wang April 16, 2020, 3:23 p.m. UTC | #3
> -----Original Message-----
> From: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Sent: Thursday, April 16, 2020 9:29 PM
> To: Ruifeng Wang <Ruifeng.Wang@arm.com>; Doherty, Declan
> <declan.doherty@intel.com>; ravi1.kumar@amd.com; anoobj@marvell.com;
> Zhang, Roy Fan <roy.fan.zhang@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>; tdu@semihalf.com; rnagadheeraj@marvell.com;
> adwivedi@marvell.com; g.singh@nxp.com; hemant.agrawal@nxp.com;
> jianjay.zhou@huawei.com
> Cc: dev@dpdk.org; Akhil.goyal@nxp.com; nd <nd@arm.com>
> Subject: RE: [PATCH 0/3] Crypto test refactoring (second phase)
> 
> Hi Ruifeng,
> 
> > -----Original Message-----
> > From: Ruifeng Wang <Ruifeng.Wang@arm.com>
> > Sent: Thursday, April 16, 2020 9:29 AM
> > To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty,
> > Declan <declan.doherty@intel.com>; ravi1.kumar@amd.com;
> > anoobj@marvell.com; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Trahe,
> > Fiona <fiona.trahe@intel.com>; tdu@semihalf.com;
> > rnagadheeraj@marvell.com; adwivedi@marvell.com; g.singh@nxp.com;
> > hemant.agrawal@nxp.com; jianjay.zhou@huawei.com
> > Cc: dev@dpdk.org; Akhil.goyal@nxp.com; nd <nd@arm.com>
> > Subject: RE: [PATCH 0/3] Crypto test refactoring (second phase)
> >
> >
> > > -----Original Message-----
> > > From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > > Sent: Wednesday, April 15, 2020 2:04 AM
> > > To: declan.doherty@intel.com; ravi1.kumar@amd.com; Ruifeng Wang
> > > <Ruifeng.Wang@arm.com>; anoobj@marvell.com;
> roy.fan.zhang@intel.com;
> > > fiona.trahe@intel.com; tdu@semihalf.com; rnagadheeraj@marvell.com;
> > > adwivedi@marvell.com; g.singh@nxp.com; hemant.agrawal@nxp.com;
> > > jianjay.zhou@huawei.com
> > > Cc: dev@dpdk.org; Akhil.goyal@nxp.com; Pablo de Lara
> > > <pablo.de.lara.guarch@intel.com>
> > > Subject: [PATCH 0/3] Crypto test refactoring (second phase)
> > >
> > > This patchset is the phase two of the crypto test refactoring effort.
> > > It mainly focuses on removing the PMD bitmask used to select which
> > > PMDs are used to run the tests against.
> > > Instead, now all PMDs will run all test cases and the capability
> > > checking will determine which ones are supported and therefore, are
> > > not
> > skipped.
> > >
> > > Since there are tests cases that require sessionless support, a new
> > > feature flag has been added, which reflects this support per PMD.
> > >
> > > I am CC'ing all PMD maintainers, asking for their collaboration to
> > > test this patchset, as this might impact the testing of each PMD.
> > >
> > >
> > > This patchset depends on:
> > > (1) http://patches.dpdk.org/patch/68433/ (crypto/openssl: fix
> > > out-of-place
> > > encryption)
> > > (2) http://patches.dpdk.org/patch/68434/ (cryptodev: add missing
> > > feature
> > > name)
> > > (3) http://patches.dpdk.org/cover/68435/ (Crypto test refactoring
> > > (first
> > > phase))
> > >
> > > Pablo de Lara (3):
> > >   cryptodev: add sessionless support feature flag
> > >   test/crypto: check if device supports sessionless
> > >   test/crypto: do not check for PMD in tests
> > >
> > There is one test case failure with crypto_armv8 after applying these
> patches.
> > I will try to locate it.
> >
> >   33) TestCase AES-128-CBC HMAC-SHA1 Decryption Digest Verify
> > Sessionless PASS
> >   34) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x8byte PASS
> >   35) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x8byte PASS
> >   36) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x8byte - OOP PASS
> >   37) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x8byte - OOP
> PASS
> >   38) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x4byte PASS
> >   39) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x4byte PASS
> >   40) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x4byte - OOP PASS
> >   41) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x4byte - OOP
> PASS
> >   42) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x1byte PASS
> >   43) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x1byte PASS
> >   44) TestCase NULL-CIPHER-NULL-AUTH encrypt & gen x1byte - OOP PASS
> >   45) TestCase NULL-AUTH-NULL-CIPHER verify & decrypt x1byte - OOP
> > PASS  +
> 
> These test cases shouldn't be run, as your PMD doesn't support NULL
> cipher/auth.
> Have you merged the first phase of this refactoring work?
Yes, I applied listed dependencies. 68433/68434/68436/68437/68439/68440/68441

> I just pushed new versions for both phases, as there were a few problems in
> the first ones:
> http://patches.dpdk.org/cover/68677/
> http://patches.dpdk.org/cover/68681/
> 
> Could you tried the new versions? (remember to also apply
> http://patches.dpdk.org/patch/68433/
> and http://patches.dpdk.org/patch/68434/)
The new versions works fine. Since OOP tests are skipped.

Thanks.
/Ruifeng
> 
> Thanks,
> Pablo
> 
> 
>