DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] cryptodev test improvements
@ 2023-03-07 17:17 Ciara Power
  2023-03-07 17:17 ` [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL Ciara Power
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Ciara Power @ 2023-03-07 17:17 UTC (permalink / raw)
  To: dev; +Cc: kai.ji, Ciara Power

The meson driver-tests suite was missing some QAT and SW PMD
crypto tests, which are now added.

Some issues were highlighted after adding to the driver-tests
suite, which are also addressed in this patchset.

Ciara Power (3):
  test/crypto: fix skip condition for CPU crypto SGL
  test/crypto: skip asym test if driver or device missing
  app/test: add more cryptodev tests to meson suite

 app/test/meson.build           |  5 +++++
 app/test/test_cryptodev.c      | 15 +++++++++++++--
 app/test/test_cryptodev_asym.c | 12 ++++++------
 3 files changed, 24 insertions(+), 8 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL
  2023-03-07 17:17 [PATCH 0/3] cryptodev test improvements Ciara Power
@ 2023-03-07 17:17 ` Ciara Power
  2023-03-07 17:43   ` Ji, Kai
  2023-03-07 17:17 ` [PATCH 2/3] test/crypto: skip asym test if driver or device missing Ciara Power
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Ciara Power @ 2023-03-07 17:17 UTC (permalink / raw)
  To: dev; +Cc: kai.ji, Ciara Power, Akhil Goyal, Fan Zhang

When SGL support was added to AESNI_MB PMD, the feature flag was enabled.
This meant SGL testcases were incorrectly running for the
cryptodev_cpu_aesni_mb_autotest, and SGL support was not added for
CPU crypto.

Now skipping the ZUC auth cipher SGL tests for CPU crypto,
and GCM authenticated encryption SGL tests for CPU crypto on AESNI_MB
only, as AESNI_GCM CPU crypto supports inplace SGL.

Fixes: f9dfb59edbcc ("crypto/ipsec_mb: support remaining SGL")

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index aa831d79a2..b7c01a1663 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -6537,6 +6537,9 @@ test_zuc_auth_cipher_sgl(const struct wireless_test_data *tdata,
 			tdata->digest.len) < 0)
 		return TEST_SKIPPED;
 
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+		return TEST_SKIPPED;
+
 	rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
 
 	uint64_t feat_flags = dev_info.feature_flags;
@@ -7896,6 +7899,9 @@ test_mixed_auth_cipher_sgl(const struct mixed_cipher_auth_test_data *tdata,
 		}
 	}
 
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+		return TEST_SKIPPED;
+
 	/* Create the session */
 	if (verify)
 		retval = create_wireless_algo_cipher_auth_session(
@@ -14719,8 +14725,13 @@ test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
 			&cap_idx) == NULL)
 		return TEST_SKIPPED;
 
-	/* OOP not supported with CPU crypto */
-	if (oop && gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO)
+	/*
+	 * SGL not supported on AESNI_MB PMD CPU crypto,
+	 * OOP not supported on AESNI_GCM CPU crypto
+	 */
+	if (gbl_action_type == RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO &&
+			(gbl_driver_id == rte_cryptodev_driver_id_get(
+			RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD)) || oop))
 		return TEST_SKIPPED;
 
 	/* Detailed check for the particular SGL support flag */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/3] test/crypto: skip asym test if driver or device missing
  2023-03-07 17:17 [PATCH 0/3] cryptodev test improvements Ciara Power
  2023-03-07 17:17 ` [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL Ciara Power
@ 2023-03-07 17:17 ` Ciara Power
  2023-03-07 17:17 ` [PATCH 3/3] app/test: add more cryptodev tests to meson suite Ciara Power
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Ciara Power @ 2023-03-07 17:17 UTC (permalink / raw)
  To: dev; +Cc: kai.ji, Ciara Power, Akhil Goyal, Fan Zhang

Asym crypto tests returned FAILED if the required driver wasn't loaded,
or no suitable device was found.

This is now updated to return SKIPPED in these cases, which better
reflects the status of the test, and follows the convention set in the
sym crypto tests in similar circumstances.

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev_asym.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
index 5b16dcab56..9236817650 100644
--- a/app/test/test_cryptodev_asym.c
+++ b/app/test/test_cryptodev_asym.c
@@ -844,7 +844,7 @@ testsuite_setup(void)
 				valid_devs, RTE_CRYPTO_MAX_DEVS);
 	if (nb_devs < 1) {
 		RTE_LOG(ERR, USER1, "No crypto devices found?\n");
-		return TEST_FAILED;
+		return TEST_SKIPPED;
 	}
 
 	/*
@@ -2256,7 +2256,7 @@ test_cryptodev_openssl_asym(void)
 
 	if (gbl_driver_id == -1) {
 		RTE_LOG(ERR, USER1, "OPENSSL PMD must be loaded.\n");
-		return TEST_FAILED;
+		return TEST_SKIPPED;
 	}
 
 	return unit_test_suite_runner(&cryptodev_openssl_asym_testsuite);
@@ -2270,7 +2270,7 @@ test_cryptodev_qat_asym(void)
 
 	if (gbl_driver_id == -1) {
 		RTE_LOG(ERR, USER1, "QAT PMD must be loaded.\n");
-		return TEST_FAILED;
+		return TEST_SKIPPED;
 	}
 
 	return unit_test_suite_runner(&cryptodev_qat_asym_testsuite);
@@ -2283,7 +2283,7 @@ test_cryptodev_octeontx_asym(void)
 			RTE_STR(CRYPTODEV_NAME_OCTEONTX_SYM_PMD));
 	if (gbl_driver_id == -1) {
 		RTE_LOG(ERR, USER1, "OCTEONTX PMD must be loaded.\n");
-		return TEST_FAILED;
+		return TEST_SKIPPED;
 	}
 	return unit_test_suite_runner(&cryptodev_octeontx_asym_testsuite);
 }
@@ -2295,7 +2295,7 @@ test_cryptodev_cn9k_asym(void)
 			RTE_STR(CRYPTODEV_NAME_CN9K_PMD));
 	if (gbl_driver_id == -1) {
 		RTE_LOG(ERR, USER1, "CN9K PMD must be loaded.\n");
-		return TEST_FAILED;
+		return TEST_SKIPPED;
 	}
 
 	/* Use test suite registered for crypto_octeontx PMD */
@@ -2309,7 +2309,7 @@ test_cryptodev_cn10k_asym(void)
 			RTE_STR(CRYPTODEV_NAME_CN10K_PMD));
 	if (gbl_driver_id == -1) {
 		RTE_LOG(ERR, USER1, "CN10K PMD must be loaded.\n");
-		return TEST_FAILED;
+		return TEST_SKIPPED;
 	}
 
 	/* Use test suite registered for crypto_octeontx PMD */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/3] app/test: add more cryptodev tests to meson suite
  2023-03-07 17:17 [PATCH 0/3] cryptodev test improvements Ciara Power
  2023-03-07 17:17 ` [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL Ciara Power
  2023-03-07 17:17 ` [PATCH 2/3] test/crypto: skip asym test if driver or device missing Ciara Power
@ 2023-03-07 17:17 ` Ciara Power
  2023-03-07 17:23   ` [EXT] " Akhil Goyal
  2023-03-07 17:43 ` [PATCH 0/3] cryptodev test improvements Ji, Kai
  2023-03-07 17:46 ` Ji, Kai
  4 siblings, 1 reply; 11+ messages in thread
From: Ciara Power @ 2023-03-07 17:17 UTC (permalink / raw)
  To: dev; +Cc: kai.ji, Ciara Power

The meson driver-tests suite did not include some ipsec_mb SW Crypto
PMD tests, and QAT tests. These are now added to avoid them being missed
if the user runs tests only using the meson suite infrastructure.

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/meson.build | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/test/meson.build b/app/test/meson.build
index f34d19e3c3..8c30442b62 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -300,13 +300,18 @@ perf_test_names = [
 driver_test_names = [
         'cryptodev_aesni_gcm_autotest',
         'cryptodev_aesni_mb_autotest',
+        'cryptodev_chacha_poly_mb_autotest',
         'cryptodev_cn10k_autotest',
         'cryptodev_cn9k_autotest',
+        'cryptodev_cpu_aesni_mb_autotest',
+        'cryptodev_cpu_aesni_gcm_autotest',
         'cryptodev_dpaa2_sec_autotest',
         'cryptodev_dpaa_sec_autotest',
         'cryptodev_null_autotest',
         'cryptodev_openssl_autotest',
         'cryptodev_qat_autotest',
+        'cryptodev_qat_asym_autotest',
+        'cryptodev_qat_raw_api_autotest',
         'cryptodev_sw_armv8_autotest',
         'cryptodev_sw_kasumi_autotest',
         'cryptodev_sw_mvsam_autotest',
-- 
2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson suite
  2023-03-07 17:17 ` [PATCH 3/3] app/test: add more cryptodev tests to meson suite Ciara Power
@ 2023-03-07 17:23   ` Akhil Goyal
  2023-03-07 17:32     ` Power, Ciara
  0 siblings, 1 reply; 11+ messages in thread
From: Akhil Goyal @ 2023-03-07 17:23 UTC (permalink / raw)
  To: Ciara Power, dev; +Cc: kai.ji

> Subject: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson suite
> 
> The meson driver-tests suite did not include some ipsec_mb SW Crypto
> PMD tests, and QAT tests. These are now added to avoid them being missed
> if the user runs tests only using the meson suite infrastructure.
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---
This patch is ok for now, but it is not scalable.
We should look for a way to consolidate all cryptodev autotests under one name.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson suite
  2023-03-07 17:23   ` [EXT] " Akhil Goyal
@ 2023-03-07 17:32     ` Power, Ciara
  2023-03-07 17:42       ` Akhil Goyal
  0 siblings, 1 reply; 11+ messages in thread
From: Power, Ciara @ 2023-03-07 17:32 UTC (permalink / raw)
  To: Akhil Goyal, dev; +Cc: Ji, Kai

Hi Akhil,

> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Tuesday 7 March 2023 17:23
> To: Power, Ciara <ciara.power@intel.com>; dev@dpdk.org
> Cc: Ji, Kai <kai.ji@intel.com>
> Subject: RE: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson
> suite
> 
> > Subject: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson
> > suite
> >
> > The meson driver-tests suite did not include some ipsec_mb SW Crypto
> > PMD tests, and QAT tests. These are now added to avoid them being
> > missed if the user runs tests only using the meson suite infrastructure.
> >
> > Signed-off-by: Ciara Power <ciara.power@intel.com>
> > ---
> This patch is ok for now, but it is not scalable.
> We should look for a way to consolidate all cryptodev autotests under one
> name.

I actually had started out to add all the missing cryptodev tests (bcmfs, caam_jr, ccp, nitrox etc.),
But the docs mention it's up to the maintainer/developer to decide whether the tests should be included in the meson test suite or not.
So, because I was unaware of the reasoning behind leaving them out, I just stuck to adding QAT + ipsec_mb ones in.

I guess, if we have them all under one name, it would remove that level of granularity for which tests are added.
Not sure if that is needed or not?

Thanks,
Ciara

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson suite
  2023-03-07 17:32     ` Power, Ciara
@ 2023-03-07 17:42       ` Akhil Goyal
  0 siblings, 0 replies; 11+ messages in thread
From: Akhil Goyal @ 2023-03-07 17:42 UTC (permalink / raw)
  To: Power, Ciara, dev; +Cc: Ji, Kai

Hi Ciara,
> Hi Akhil,
> 
> > -----Original Message-----
> > From: Akhil Goyal <gakhil@marvell.com>
> > Sent: Tuesday 7 March 2023 17:23
> > To: Power, Ciara <ciara.power@intel.com>; dev@dpdk.org
> > Cc: Ji, Kai <kai.ji@intel.com>
> > Subject: RE: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson
> > suite
> >
> > > Subject: [EXT] [PATCH 3/3] app/test: add more cryptodev tests to meson
> > > suite
> > >
> > > The meson driver-tests suite did not include some ipsec_mb SW Crypto
> > > PMD tests, and QAT tests. These are now added to avoid them being
> > > missed if the user runs tests only using the meson suite infrastructure.
> > >
> > > Signed-off-by: Ciara Power <ciara.power@intel.com>
> > > ---
> > This patch is ok for now, but it is not scalable.
> > We should look for a way to consolidate all cryptodev autotests under one
> > name.
> 
> I actually had started out to add all the missing cryptodev tests (bcmfs, caam_jr,
> ccp, nitrox etc.),
> But the docs mention it's up to the maintainer/developer to decide whether the
> tests should be included in the meson test suite or not.
> So, because I was unaware of the reasoning behind leaving them out, I just stuck
> to adding QAT + ipsec_mb ones in.
> 
> I guess, if we have them all under one name, it would remove that level of
> granularity for which tests are added.
> Not sure if that is needed or not?
> 
From the past some time, we have added a lot of capability checks in the test cases
So that the same case may be run on all the PMDs.

I believe it should be doable at some point going forward.
This will help in reducing the unnecessary bloating of the code.
We should put in some effort to make it similar to other device test cases.
PMD specific suites are only in case of cryptodev. This should be fixed.
Moreover, it would be beneficial for all the PMDs to be tested at similar levels
Of granularity.

Regards,
Akhil

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL
  2023-03-07 17:17 ` [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL Ciara Power
@ 2023-03-07 17:43   ` Ji, Kai
  0 siblings, 0 replies; 11+ messages in thread
From: Ji, Kai @ 2023-03-07 17:43 UTC (permalink / raw)
  To: Power, Ciara, dev; +Cc: Akhil Goyal, Fan Zhang

Acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Tuesday, March 7, 2023 5:18 PM
> To: dev@dpdk.org
> Cc: Ji, Kai <kai.ji@intel.com>; Power, Ciara <ciara.power@intel.com>;
> Akhil Goyal <gakhil@marvell.com>; Fan Zhang <fanzhang.oss@gmail.com>
> Subject: [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL
> 
> When SGL support was added to AESNI_MB PMD, the feature flag was
> enabled.
> This meant SGL testcases were incorrectly running for the
> cryptodev_cpu_aesni_mb_autotest, and SGL support was not added for CPU
> crypto.
> 
> Now skipping the ZUC auth cipher SGL tests for CPU crypto, and GCM
> authenticated encryption SGL tests for CPU crypto on AESNI_MB only, as
> AESNI_GCM CPU crypto supports inplace SGL.
> 
> Fixes: f9dfb59edbcc ("crypto/ipsec_mb: support remaining SGL")
> 
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---> 2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 0/3] cryptodev test improvements
  2023-03-07 17:17 [PATCH 0/3] cryptodev test improvements Ciara Power
                   ` (2 preceding siblings ...)
  2023-03-07 17:17 ` [PATCH 3/3] app/test: add more cryptodev tests to meson suite Ciara Power
@ 2023-03-07 17:43 ` Ji, Kai
  2023-03-16 18:16   ` Akhil Goyal
  2023-03-07 17:46 ` Ji, Kai
  4 siblings, 1 reply; 11+ messages in thread
From: Ji, Kai @ 2023-03-07 17:43 UTC (permalink / raw)
  To: Power, Ciara, dev

Acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Tuesday, March 7, 2023 5:18 PM
> To: dev@dpdk.org
> Cc: Ji, Kai <kai.ji@intel.com>; Power, Ciara <ciara.power@intel.com>
> Subject: [PATCH 0/3] cryptodev test improvements
> 
> The meson driver-tests suite was missing some QAT and SW PMD crypto
> tests, which are now added.
> 
> Some issues were highlighted after adding to the driver-tests suite,
> which are also addressed in this patchset.
> 
> Ciara Power (3):
>   test/crypto: fix skip condition for CPU crypto SGL
>   test/crypto: skip asym test if driver or device missing
>   app/test: add more cryptodev tests to meson suite
> 
>  app/test/meson.build           |  5 +++++
>  app/test/test_cryptodev.c      | 15 +++++++++++++--
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  3 files changed, 24 insertions(+), 8 deletions(-)
> 
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 0/3] cryptodev test improvements
  2023-03-07 17:17 [PATCH 0/3] cryptodev test improvements Ciara Power
                   ` (3 preceding siblings ...)
  2023-03-07 17:43 ` [PATCH 0/3] cryptodev test improvements Ji, Kai
@ 2023-03-07 17:46 ` Ji, Kai
  4 siblings, 0 replies; 11+ messages in thread
From: Ji, Kai @ 2023-03-07 17:46 UTC (permalink / raw)
  To: Power, Ciara, dev

Series-acked-by: Kai Ji <kai.ji@intel.com>

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Tuesday, March 7, 2023 5:18 PM
> To: dev@dpdk.org
> Cc: Ji, Kai <kai.ji@intel.com>; Power, Ciara <ciara.power@intel.com>
> Subject: [PATCH 0/3] cryptodev test improvements
> 
> The meson driver-tests suite was missing some QAT and SW PMD crypto
> tests, which are now added.
> 
> Some issues were highlighted after adding to the driver-tests suite,
> which are also addressed in this patchset.
> 
> Ciara Power (3):
>   test/crypto: fix skip condition for CPU crypto SGL
>   test/crypto: skip asym test if driver or device missing
>   app/test: add more cryptodev tests to meson suite
> 
>  app/test/meson.build           |  5 +++++
>  app/test/test_cryptodev.c      | 15 +++++++++++++--
>  app/test/test_cryptodev_asym.c | 12 ++++++------
>  3 files changed, 24 insertions(+), 8 deletions(-)
> 
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: [PATCH 0/3] cryptodev test improvements
  2023-03-07 17:43 ` [PATCH 0/3] cryptodev test improvements Ji, Kai
@ 2023-03-16 18:16   ` Akhil Goyal
  0 siblings, 0 replies; 11+ messages in thread
From: Akhil Goyal @ 2023-03-16 18:16 UTC (permalink / raw)
  To: Ji, Kai, Power, Ciara, dev

> Acked-by: Kai Ji <kai.ji@intel.com>
> 
> > Subject: [PATCH 0/3] cryptodev test improvements
> >
> > The meson driver-tests suite was missing some QAT and SW PMD crypto
> > tests, which are now added.
> >
> > Some issues were highlighted after adding to the driver-tests suite,
> > which are also addressed in this patchset.
Applied to dpdk-next-crypto

Thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-16 18:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 17:17 [PATCH 0/3] cryptodev test improvements Ciara Power
2023-03-07 17:17 ` [PATCH 1/3] test/crypto: fix skip condition for CPU crypto SGL Ciara Power
2023-03-07 17:43   ` Ji, Kai
2023-03-07 17:17 ` [PATCH 2/3] test/crypto: skip asym test if driver or device missing Ciara Power
2023-03-07 17:17 ` [PATCH 3/3] app/test: add more cryptodev tests to meson suite Ciara Power
2023-03-07 17:23   ` [EXT] " Akhil Goyal
2023-03-07 17:32     ` Power, Ciara
2023-03-07 17:42       ` Akhil Goyal
2023-03-07 17:43 ` [PATCH 0/3] cryptodev test improvements Ji, Kai
2023-03-16 18:16   ` Akhil Goyal
2023-03-07 17:46 ` Ji, Kai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).