]> git.droids-corp.org - dpdk.git/commitdiff
test/crypto: fix cipher offset for ZUC
authorCiara Power <ciara.power@intel.com>
Tue, 21 Jun 2022 11:41:32 +0000 (11:41 +0000)
committerAkhil Goyal <gakhil@marvell.com>
Tue, 21 Jun 2022 18:04:50 +0000 (20:04 +0200)
The cipher offset in bits was not being used in ZUC encryption test
functions when creating the operation, it was hardcoded to 0.
This is fixed to use the offset from the test vector as intended.

Fixes: fd01a9be38d5 ("test/crypto: move IV to crypto op private data")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Kai Ji <kai.ji@intel.com>
app/test/test_cryptodev.c

index 15df53a1f01b7280444deb814772aed396ceaf98..1cac76a64a0db68e7232c50abaee594a6fb888ee 100644 (file)
@@ -6033,7 +6033,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
        retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
                                        tdata->cipher_iv.len,
                                        tdata->plaintext.len,
-                                       0);
+                                       tdata->validCipherOffsetInBits.len);
        if (retval < 0)
                return retval;
 
@@ -6128,7 +6128,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
        /* Create ZUC operation */
        retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
                        tdata->cipher_iv.len, tdata->plaintext.len,
-                       0);
+                       tdata->validCipherOffsetInBits.len);
        if (retval < 0)
                return retval;