[1/3] test/crypto: fix skip condition for CPU crypto SGL

Message ID 20230307171734.2872005-2-ciara.power@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series cryptodev test improvements |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Power, Ciara March 7, 2023, 5:17 p.m. UTC
  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(-)
  

Comments

Ji, Kai March 7, 2023, 5:43 p.m. UTC | #1
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
  

Patch

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 */