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.po...@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

Reply via email to