git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: rely on dynamic log level to display hexdumps
[dpdk.git]
/
test
/
test
/
test_cryptodev.c
diff --git
a/test/test/test_cryptodev.c
b/test/test/test_cryptodev.c
index
cb9b486
..
6662bf3
100644
(file)
--- a/
test/test/test_cryptodev.c
+++ b/
test/test/test_cryptodev.c
@@
-36,6
+36,7
@@
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_pause.h>
#include <rte_malloc.h>
#include <rte_memcpy.h>
#include <rte_pause.h>
+#include <rte_bus_vdev.h>
#include <rte_crypto.h>
#include <rte_cryptodev.h>
#include <rte_crypto.h>
#include <rte_cryptodev.h>
@@
-1332,7
+1333,7
@@
test_AES_CBC_HMAC_SHA1_encrypt_digest(void)
/* Set crypto operation authentication parameters */
sym_op->auth.digest.data = ut_params->digest;
/* Set crypto operation authentication parameters */
sym_op->auth.digest.data = ut_params->digest;
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, QUOTE_512_BYTES);
sym_op->auth.data.offset = 0;
ut_params->ibuf, QUOTE_512_BYTES);
sym_op->auth.data.offset = 0;
@@
-1484,7
+1485,7
@@
test_AES_CBC_HMAC_SHA512_decrypt_perform(struct rte_cryptodev_sym_session *sess,
sym_op->m_src = ut_params->ibuf;
sym_op->auth.digest.data = ut_params->digest;
sym_op->m_src = ut_params->ibuf;
sym_op->auth.digest.data = ut_params->digest;
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, QUOTE_512_BYTES);
sym_op->auth.data.offset = 0;
ut_params->ibuf, QUOTE_512_BYTES);
sym_op->auth.data.offset = 0;
@@
-2051,7
+2052,7
@@
create_wireless_algo_hash_session(uint8_t dev_id,
memcpy(hash_key, key, key_len);
memcpy(hash_key, key, key_len);
-
TEST_HEXDUMP
(stdout, "key:", key, key_len);
+
debug_hexdump
(stdout, "key:", key, key_len);
/* Setup Authentication Parameters */
ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
/* Setup Authentication Parameters */
ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
@@
-2098,7
+2099,7
@@
create_wireless_algo_cipher_session(uint8_t dev_id,
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = iv_len;
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = iv_len;
-
TEST_HEXDUMP
(stdout, "key:", key, key_len);
+
debug_hexdump
(stdout, "key:", key, key_len);
/* Create Crypto session */
ut_params->sess = rte_cryptodev_sym_session_create(
/* Create Crypto session */
ut_params->sess = rte_cryptodev_sym_session_create(
@@
-2214,7
+2215,7
@@
create_wireless_algo_cipher_auth_session(uint8_t dev_id,
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
-
TEST_HEXDUMP
(stdout, "key:", key, key_len);
+
debug_hexdump
(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
@@
-2273,7
+2274,7
@@
create_wireless_cipher_auth_session(uint8_t dev_id,
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
-
TEST_HEXDUMP
(stdout, "key:", key, key_len);
+
debug_hexdump
(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
@@
-2335,7
+2336,7
@@
create_wireless_algo_auth_cipher_session(uint8_t dev_id,
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
ut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;
ut_params->cipher_xform.cipher.iv.length = cipher_iv_len;
-
TEST_HEXDUMP
(stdout, "key:", key, key_len);
+
debug_hexdump
(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
@@
-2385,14
+2386,14
@@
create_wireless_algo_hash_operation(const uint8_t *auth_tag,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
ut_params->digest = sym_op->auth.digest.data;
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
ut_params->digest = sym_op->auth.digest.data;
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, data_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
memset(sym_op->auth.digest.data, 0, auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
ut_params->ibuf, data_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
memset(sym_op->auth.digest.data, 0, auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
sym_op->auth.digest.data,
auth_tag_len);
@@
-2441,14
+2442,14
@@
create_wireless_cipher_hash_operation(const struct wireless_test_data *tdata,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
ut_params->digest = sym_op->auth.digest.data;
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
ut_params->digest = sym_op->auth.digest.data;
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, data_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
memset(sym_op->auth.digest.data, 0, auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
ut_params->ibuf, data_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
memset(sym_op->auth.digest.data, 0, auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
sym_op->auth.digest.data,
auth_tag_len);
@@
-2508,14
+2509,14
@@
create_wireless_algo_cipher_hash_operation(const uint8_t *auth_tag,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
ut_params->digest = sym_op->auth.digest.data;
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
ut_params->digest = sym_op->auth.digest.data;
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, data_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
memset(sym_op->auth.digest.data, 0, auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
ut_params->ibuf, data_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_GENERATE)
memset(sym_op->auth.digest.data, 0, auth_tag_len);
else
rte_memcpy(sym_op->auth.digest.data, auth_tag, auth_tag_len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
sym_op->auth.digest.data,
auth_tag_len);
@@
-2566,12
+2567,12
@@
create_wireless_algo_auth_cipher_operation(unsigned int auth_tag_len,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, data_pad_len);
memset(sym_op->auth.digest.data, 0, auth_tag_len);
ut_params->ibuf, data_pad_len);
memset(sym_op->auth.digest.data, 0, auth_tag_len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
auth_tag_len);
sym_op->auth.digest.data,
auth_tag_len);
@@
-3004,7
+3005,7
@@
test_kasumi_encryption(const struct kasumi_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
@@
-3024,7
+3025,7
@@
test_kasumi_encryption(const struct kasumi_test_data *tdata)
else
ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3);
else
ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
@@
-3104,7
+3105,7
@@
test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
plaintext_len, buffer);
/* Validate obuf */
plaintext_len, buffer);
/* Validate obuf */
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
@@
-3153,7
+3154,7
@@
test_kasumi_encryption_oop(const struct kasumi_test_data *tdata)
rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
@@
-3173,7
+3174,7
@@
test_kasumi_encryption_oop(const struct kasumi_test_data *tdata)
else
ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3);
else
ciphertext = plaintext + (tdata->validCipherOffsetInBits.len >> 3);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
const uint8_t *reference_ciphertext = tdata->ciphertext.data +
(tdata->validCipherOffsetInBits.len >> 3);
@@
-3300,7
+3301,7
@@
test_kasumi_decryption_oop(const struct kasumi_test_data *tdata)
rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, ciphertext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
@@
-3320,7
+3321,7
@@
test_kasumi_decryption_oop(const struct kasumi_test_data *tdata)
else
plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3);
else
plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, ciphertext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, ciphertext_len);
const uint8_t *reference_plaintext = tdata->plaintext.data +
(tdata->validCipherOffsetInBits.len >> 3);
const uint8_t *reference_plaintext = tdata->plaintext.data +
(tdata->validCipherOffsetInBits.len >> 3);
@@
-3367,7
+3368,7
@@
test_kasumi_decryption(const struct kasumi_test_data *tdata)
ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, ciphertext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
@@
-3387,7
+3388,7
@@
test_kasumi_decryption(const struct kasumi_test_data *tdata)
else
plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3);
else
plaintext = ciphertext + (tdata->validCipherOffsetInBits.len >> 3);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, ciphertext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, ciphertext_len);
const uint8_t *reference_plaintext = tdata->plaintext.data +
(tdata->validCipherOffsetInBits.len >> 3);
const uint8_t *reference_plaintext = tdata->plaintext.data +
(tdata->validCipherOffsetInBits.len >> 3);
@@
-3434,7
+3435,7
@@
test_snow3g_encryption(const struct snow3g_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
@@
-3454,7
+3455,7
@@
test_snow3g_encryption(const struct snow3g_test_data *tdata)
else
ciphertext = plaintext;
else
ciphertext = plaintext;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@
-3507,7
+3508,7
@@
test_snow3g_encryption_oop(const struct snow3g_test_data *tdata)
rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
rte_pktmbuf_append(ut_params->obuf, plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
@@
-3527,7
+3528,7
@@
test_snow3g_encryption_oop(const struct snow3g_test_data *tdata)
else
ciphertext = plaintext;
else
ciphertext = plaintext;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@
-3605,7
+3606,7
@@
test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
ciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,
plaintext_len, buffer);
ciphertext = rte_pktmbuf_read(ut_params->ibuf, 0,
plaintext_len, buffer);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@
-3763,7
+3764,7
@@
static int test_snow3g_decryption(const struct snow3g_test_data *tdata)
ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, ciphertext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
@@
-3782,7
+3783,7
@@
static int test_snow3g_decryption(const struct snow3g_test_data *tdata)
else
plaintext = ciphertext;
else
plaintext = ciphertext;
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, ciphertext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, ciphertext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
@@
-3836,7
+3837,7
@@
static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata)
rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
rte_pktmbuf_append(ut_params->obuf, ciphertext_pad_len);
memcpy(ciphertext, tdata->ciphertext.data, ciphertext_len);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, ciphertext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, ciphertext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation_oop(tdata->cipher_iv.data,
@@
-3855,7
+3856,7
@@
static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata)
else
plaintext = ciphertext;
else
plaintext = ciphertext;
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, ciphertext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, ciphertext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(plaintext,
@@
-3915,7
+3916,7
@@
test_zuc_cipher_auth(const struct wireless_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create ZUC operation */
retval = create_zuc_cipher_hash_generate_operation(tdata);
/* Create ZUC operation */
retval = create_zuc_cipher_hash_generate_operation(tdata);
@@
-3931,7
+3932,7
@@
test_zuc_cipher_auth(const struct wireless_test_data *tdata)
else
ciphertext = plaintext;
else
ciphertext = plaintext;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext,
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext,
@@
-3988,7
+3989,7
@@
test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
@@
-4013,7
+4014,7
@@
test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
else
ciphertext = plaintext;
else
ciphertext = plaintext;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext,
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
ciphertext,
@@
-4070,7
+4071,7
@@
test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create SNOW 3G operation */
retval = create_wireless_algo_auth_cipher_operation(
/* Create SNOW 3G operation */
retval = create_wireless_algo_auth_cipher_operation(
@@
-4097,7
+4098,7
@@
test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ plaintext_pad_len;
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ plaintext_pad_len;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@
-4153,7
+4154,7
@@
test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_auth_cipher_operation(tdata->digest.len,
/* Create KASUMI operation */
retval = create_wireless_algo_auth_cipher_operation(tdata->digest.len,
@@
-4239,7
+4240,7
@@
test_kasumi_cipher_auth(const struct kasumi_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_hash_operation(tdata->digest.data,
@@
-4331,7
+4332,7
@@
test_zuc_encryption(const struct wireless_test_data *tdata)
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
plaintext_pad_len);
memcpy(plaintext, tdata->plaintext.data, plaintext_len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, plaintext_len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, plaintext_len);
/* Create ZUC operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
/* Create ZUC operation */
retval = create_wireless_algo_cipher_operation(tdata->cipher_iv.data,
@@
-4351,7
+4352,7
@@
test_zuc_encryption(const struct wireless_test_data *tdata)
else
ciphertext = plaintext;
else
ciphertext = plaintext;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@
-4438,7
+4439,7
@@
test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
0, plaintext_len, ciphertext_buffer);
/* Validate obuf */
0, plaintext_len, ciphertext_buffer);
/* Validate obuf */
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, plaintext_len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, plaintext_len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL_BIT(
@@
-5082,7
+5083,7
@@
create_aead_session(uint8_t dev_id, enum rte_crypto_aead_algorithm algo,
ut_params->aead_xform.aead.digest_length = auth_len;
ut_params->aead_xform.aead.aad_length = aad_len;
ut_params->aead_xform.aead.digest_length = auth_len;
ut_params->aead_xform.aead.aad_length = aad_len;
-
TEST_HEXDUMP
(stdout, "key:", key, key_len);
+
debug_hexdump
(stdout, "key:", key, key_len);
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
/* Create Crypto session*/
ut_params->sess = rte_cryptodev_sym_session_create(
@@
-5121,7
+5122,7
@@
create_aead_xform(struct rte_crypto_op *op,
sym_op->xform->aead.digest_length = auth_len;
sym_op->xform->aead.aad_length = aad_len;
sym_op->xform->aead.digest_length = auth_len;
sym_op->xform->aead.aad_length = aad_len;
-
TEST_HEXDUMP
(stdout, "key:", key, key_len);
+
debug_hexdump
(stdout, "key:", key, key_len);
return 0;
}
return 0;
}
@@
-5153,10
+5154,10
@@
create_aead_operation(enum rte_crypto_aead_operation op,
"no room to append aad");
sym_op->aead.aad.phys_addr =
"no room to append aad");
sym_op->aead.aad.phys_addr =
- rte_pktmbuf_
mtophys
(ut_params->ibuf);
+ rte_pktmbuf_
iova
(ut_params->ibuf);
/* Copy AAD 18 bytes after the AAD pointer, according to the API */
memcpy(sym_op->aead.aad.data + 18, tdata->aad.data, tdata->aad.len);
/* Copy AAD 18 bytes after the AAD pointer, according to the API */
memcpy(sym_op->aead.aad.data + 18, tdata->aad.data, tdata->aad.len);
-
TEST_HEXDUMP
(stdout, "aad:", sym_op->aead.aad.data,
+
debug_hexdump
(stdout, "aad:", sym_op->aead.aad.data,
tdata->aad.len);
/* Append IV at the end of the crypto operation*/
tdata->aad.len);
/* Append IV at the end of the crypto operation*/
@@
-5165,7
+5166,7
@@
create_aead_operation(enum rte_crypto_aead_operation op,
/* Copy IV 1 byte after the IV pointer, according to the API */
rte_memcpy(iv_ptr + 1, tdata->iv.data, tdata->iv.len);
/* Copy IV 1 byte after the IV pointer, according to the API */
rte_memcpy(iv_ptr + 1, tdata->iv.data, tdata->iv.len);
-
TEST_HEXDUMP
(stdout, "iv:", iv_ptr,
+
debug_hexdump
(stdout, "iv:", iv_ptr,
tdata->iv.len);
} else {
aad_pad_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
tdata->iv.len);
} else {
aad_pad_len = RTE_ALIGN_CEIL(tdata->aad.len, 16);
@@
-5175,9
+5176,9
@@
create_aead_operation(enum rte_crypto_aead_operation op,
"no room to append aad");
sym_op->aead.aad.phys_addr =
"no room to append aad");
sym_op->aead.aad.phys_addr =
- rte_pktmbuf_
mtophys
(ut_params->ibuf);
+ rte_pktmbuf_
iova
(ut_params->ibuf);
memcpy(sym_op->aead.aad.data, tdata->aad.data, tdata->aad.len);
memcpy(sym_op->aead.aad.data, tdata->aad.data, tdata->aad.len);
-
TEST_HEXDUMP
(stdout, "aad:", sym_op->aead.aad.data,
+
debug_hexdump
(stdout, "aad:", sym_op->aead.aad.data,
tdata->aad.len);
/* Append IV at the end of the crypto operation*/
tdata->aad.len);
/* Append IV at the end of the crypto operation*/
@@
-5185,7
+5186,7
@@
create_aead_operation(enum rte_crypto_aead_operation op,
uint8_t *, IV_OFFSET);
rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
uint8_t *, IV_OFFSET);
rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
-
TEST_HEXDUMP
(stdout, "iv:", iv_ptr,
+
debug_hexdump
(stdout, "iv:", iv_ptr,
tdata->iv.len);
}
tdata->iv.len);
}
@@
-5197,7
+5198,7
@@
create_aead_operation(enum rte_crypto_aead_operation op,
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext,
+
debug_hexdump
(stdout, "plaintext:", plaintext,
tdata->plaintext.len);
if (ut_params->obuf) {
tdata->plaintext.len);
if (ut_params->obuf) {
@@
-5219,7
+5220,7
@@
create_aead_operation(enum rte_crypto_aead_operation op,
memcpy(ciphertext, tdata->ciphertext.data,
tdata->ciphertext.len);
memcpy(ciphertext, tdata->ciphertext.data,
tdata->ciphertext.len);
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext,
+
debug_hexdump
(stdout, "ciphertext:", ciphertext,
tdata->ciphertext.len);
if (ut_params->obuf) {
tdata->ciphertext.len);
if (ut_params->obuf) {
@@
-5243,7
+5244,7
@@
create_aead_operation(enum rte_crypto_aead_operation op,
TEST_ASSERT_NOT_NULL(sym_op->aead.digest.data,
"no room to append digest");
memset(sym_op->aead.digest.data, 0, tdata->auth_tag.len);
TEST_ASSERT_NOT_NULL(sym_op->aead.digest.data,
"no room to append digest");
memset(sym_op->aead.digest.data, 0, tdata->auth_tag.len);
- sym_op->aead.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->aead.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->obuf ? ut_params->obuf :
ut_params->ibuf,
plaintext_pad_len +
ut_params->obuf ? ut_params->obuf :
ut_params->ibuf,
plaintext_pad_len +
@@
-5253,13
+5254,13
@@
create_aead_operation(enum rte_crypto_aead_operation op,
ut_params->ibuf, tdata->auth_tag.len);
TEST_ASSERT_NOT_NULL(sym_op->aead.digest.data,
"no room to append digest");
ut_params->ibuf, tdata->auth_tag.len);
TEST_ASSERT_NOT_NULL(sym_op->aead.digest.data,
"no room to append digest");
- sym_op->aead.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->aead.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf,
plaintext_pad_len + aad_pad_len);
rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data,
tdata->auth_tag.len);
ut_params->ibuf,
plaintext_pad_len + aad_pad_len);
rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data,
tdata->auth_tag.len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->aead.digest.data,
tdata->auth_tag.len);
}
sym_op->aead.digest.data,
tdata->auth_tag.len);
}
@@
-5333,8
+5334,8
@@
test_authenticated_encryption(const struct aead_test_data *tdata)
auth_tag = ciphertext + plaintext_pad_len;
}
auth_tag = ciphertext + plaintext_pad_len;
}
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
-
TEST_HEXDUMP
(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
+
debug_hexdump
(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@
-5547,7
+5548,7
@@
test_authenticated_decryption(const struct aead_test_data *tdata)
uint8_t *,
ut_params->op->sym->cipher.data.offset);
uint8_t *,
ut_params->op->sym->cipher.data.offset);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@
-5752,8
+5753,8
@@
test_authenticated_encryption_oop(const struct aead_test_data *tdata)
ut_params->op->sym->cipher.data.offset);
auth_tag = ciphertext + plaintext_pad_len;
ut_params->op->sym->cipher.data.offset);
auth_tag = ciphertext + plaintext_pad_len;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
-
TEST_HEXDUMP
(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
+
debug_hexdump
(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@
-5826,7
+5827,7
@@
test_authenticated_decryption_oop(const struct aead_test_data *tdata)
plaintext = rte_pktmbuf_mtod_offset(ut_params->obuf, uint8_t *,
ut_params->op->sym->cipher.data.offset);
plaintext = rte_pktmbuf_mtod_offset(ut_params->obuf, uint8_t *,
ut_params->op->sym->cipher.data.offset);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@
-5902,8
+5903,8
@@
test_authenticated_encryption_sessionless(
ut_params->op->sym->cipher.data.offset);
auth_tag = ciphertext + plaintext_pad_len;
ut_params->op->sym->cipher.data.offset);
auth_tag = ciphertext + plaintext_pad_len;
-
TEST_HEXDUMP
(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
-
TEST_HEXDUMP
(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
+
debug_hexdump
(stdout, "ciphertext:", ciphertext, tdata->ciphertext.len);
+
debug_hexdump
(stdout, "auth tag:", auth_tag, tdata->auth_tag.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@
-5980,7
+5981,7
@@
test_authenticated_decryption_sessionless(
plaintext = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *,
ut_params->op->sym->cipher.data.offset);
plaintext = rte_pktmbuf_mtod_offset(ut_params->ibuf, uint8_t *,
ut_params->op->sym->cipher.data.offset);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
+
debug_hexdump
(stdout, "plaintext:", plaintext, tdata->ciphertext.len);
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
/* Validate obuf */
TEST_ASSERT_BUFFERS_ARE_EQUAL(
@@
-6226,7
+6227,7
@@
static int MD5_HMAC_create_op(struct crypto_unittest_params *ut_params,
ut_params->ibuf, MD5_DIGEST_LEN);
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append digest");
ut_params->ibuf, MD5_DIGEST_LEN);
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append digest");
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, plaintext_pad_len);
if (ut_params->auth_xform.auth.op == RTE_CRYPTO_AUTH_OP_VERIFY) {
ut_params->ibuf, plaintext_pad_len);
if (ut_params->auth_xform.auth.op == RTE_CRYPTO_AUTH_OP_VERIFY) {
@@
-6962,13
+6963,13
@@
create_gmac_operation(enum rte_crypto_auth_operation op,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append digest");
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append digest");
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, plaintext_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_VERIFY) {
rte_memcpy(sym_op->auth.digest.data, tdata->gmac_tag.data,
tdata->gmac_tag.len);
ut_params->ibuf, plaintext_pad_len);
if (op == RTE_CRYPTO_AUTH_OP_VERIFY) {
rte_memcpy(sym_op->auth.digest.data, tdata->gmac_tag.data,
tdata->gmac_tag.len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
tdata->gmac_tag.len);
}
sym_op->auth.digest.data,
tdata->gmac_tag.len);
}
@@
-6978,7
+6979,7
@@
create_gmac_operation(enum rte_crypto_auth_operation op,
rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
-
TEST_HEXDUMP
(stdout, "iv:", iv_ptr, tdata->iv.len);
+
debug_hexdump
(stdout, "iv:", iv_ptr, tdata->iv.len);
sym_op->cipher.data.length = 0;
sym_op->cipher.data.offset = 0;
sym_op->cipher.data.length = 0;
sym_op->cipher.data.offset = 0;
@@
-7068,7
+7069,7
@@
test_AES_GMAC_authentication(const struct gmac_test_data *tdata)
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext,
+
debug_hexdump
(stdout, "plaintext:", plaintext,
tdata->plaintext.len);
retval = create_gmac_operation(RTE_CRYPTO_AUTH_OP_GENERATE,
tdata->plaintext.len);
retval = create_gmac_operation(RTE_CRYPTO_AUTH_OP_GENERATE,
@@
-7094,7
+7095,7
@@
test_AES_GMAC_authentication(const struct gmac_test_data *tdata)
auth_tag = plaintext + plaintext_pad_len;
}
auth_tag = plaintext + plaintext_pad_len;
}
-
TEST_HEXDUMP
(stdout, "auth tag:", auth_tag, tdata->gmac_tag.len);
+
debug_hexdump
(stdout, "auth tag:", auth_tag, tdata->gmac_tag.len);
TEST_ASSERT_BUFFERS_ARE_EQUAL(
auth_tag,
TEST_ASSERT_BUFFERS_ARE_EQUAL(
auth_tag,
@@
-7172,7
+7173,7
@@
test_AES_GMAC_authentication_verify(const struct gmac_test_data *tdata)
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, tdata->plaintext.data, tdata->plaintext.len);
-
TEST_HEXDUMP
(stdout, "plaintext:", plaintext,
+
debug_hexdump
(stdout, "plaintext:", plaintext,
tdata->plaintext.len);
retval = create_gmac_operation(RTE_CRYPTO_AUTH_OP_VERIFY,
tdata->plaintext.len);
retval = create_gmac_operation(RTE_CRYPTO_AUTH_OP_VERIFY,
@@
-7484,7
+7485,7
@@
create_auth_operation(struct crypto_testsuite_params *ts_params,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, reference->plaintext.len);
if (auth_generate)
ut_params->ibuf, reference->plaintext.len);
if (auth_generate)
@@
-7494,7
+7495,7
@@
create_auth_operation(struct crypto_testsuite_params *ts_params,
reference->digest.data,
reference->digest.len);
reference->digest.data,
reference->digest.len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
reference->digest.len);
sym_op->auth.digest.data,
reference->digest.len);
@@
-7531,7
+7532,7
@@
create_auth_GMAC_operation(struct crypto_testsuite_params *ts_params,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, reference->ciphertext.len);
if (auth_generate)
ut_params->ibuf, reference->ciphertext.len);
if (auth_generate)
@@
-7541,7
+7542,7
@@
create_auth_GMAC_operation(struct crypto_testsuite_params *ts_params,
reference->digest.data,
reference->digest.len);
reference->digest.data,
reference->digest.len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
reference->digest.len);
sym_op->auth.digest.data,
reference->digest.len);
@@
-7584,7
+7585,7
@@
create_cipher_auth_operation(struct crypto_testsuite_params *ts_params,
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
"no room to append auth tag");
- sym_op->auth.digest.phys_addr = rte_pktmbuf_
mtophys
_offset(
+ sym_op->auth.digest.phys_addr = rte_pktmbuf_
iova
_offset(
ut_params->ibuf, reference->ciphertext.len);
if (auth_generate)
ut_params->ibuf, reference->ciphertext.len);
if (auth_generate)
@@
-7594,7
+7595,7
@@
create_cipher_auth_operation(struct crypto_testsuite_params *ts_params,
reference->digest.data,
reference->digest.len);
reference->digest.data,
reference->digest.len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->auth.digest.data,
reference->digest.len);
sym_op->auth.digest.data,
reference->digest.len);
@@
-7667,7
+7668,8
@@
test_authentication_verify_fail_when_data_corruption(
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, reference->plaintext.data, reference->plaintext.len);
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, reference->plaintext.data, reference->plaintext.len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, reference->plaintext.len);
+ debug_hexdump(stdout, "plaintext:", plaintext,
+ reference->plaintext.len);
/* Create operation */
retval = create_auth_verify_operation(ts_params, ut_params, reference);
/* Create operation */
retval = create_auth_verify_operation(ts_params, ut_params, reference);
@@
-7725,7
+7727,8
@@
test_authentication_verify_GMAC_fail_when_corruption(
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, reference->plaintext.data, reference->plaintext.len);
TEST_ASSERT_NOT_NULL(plaintext, "no room to append plaintext");
memcpy(plaintext, reference->plaintext.data, reference->plaintext.len);
- TEST_HEXDUMP(stdout, "plaintext:", plaintext, reference->plaintext.len);
+ debug_hexdump(stdout, "plaintext:", plaintext,
+ reference->plaintext.len);
/* Create operation */
retval = create_auth_verify_GMAC_operation(ts_params,
/* Create operation */
retval = create_auth_verify_GMAC_operation(ts_params,
@@
-7844,7
+7847,7
@@
create_aead_operation_SGL(enum rte_crypto_aead_operation op,
if (op == RTE_CRYPTO_AEAD_OP_DECRYPT) {
rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data,
auth_tag_len);
if (op == RTE_CRYPTO_AEAD_OP_DECRYPT) {
rte_memcpy(sym_op->aead.digest.data, tdata->auth_tag.data,
auth_tag_len);
-
TEST_HEXDUMP
(stdout, "digest:",
+
debug_hexdump
(stdout, "digest:",
sym_op->aead.digest.data,
auth_tag_len);
}
sym_op->aead.digest.data,
auth_tag_len);
}
@@
-7863,15
+7866,15
@@
create_aead_operation_SGL(enum rte_crypto_aead_operation op,
ut_params->ibuf, aad_len);
TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
"no room to prepend aad");
ut_params->ibuf, aad_len);
TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
"no room to prepend aad");
- sym_op->aead.aad.phys_addr = rte_pktmbuf_
mtophys
(
+ sym_op->aead.aad.phys_addr = rte_pktmbuf_
iova
(
ut_params->ibuf);
memset(sym_op->aead.aad.data, 0, aad_len);
/* Copy AAD 18 bytes after the AAD pointer, according to the API */
rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len);
ut_params->ibuf);
memset(sym_op->aead.aad.data, 0, aad_len);
/* Copy AAD 18 bytes after the AAD pointer, according to the API */
rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len);
-
TEST_HEXDUMP
(stdout, "iv:", iv_ptr, iv_len);
-
TEST_HEXDUMP
(stdout, "aad:",
+
debug_hexdump
(stdout, "iv:", iv_ptr, iv_len);
+
debug_hexdump
(stdout, "aad:",
sym_op->aead.aad.data, aad_len);
} else {
uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op,
sym_op->aead.aad.data, aad_len);
} else {
uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op,
@@
-7883,14
+7886,14
@@
create_aead_operation_SGL(enum rte_crypto_aead_operation op,
ut_params->ibuf, aad_len);
TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
"no room to prepend aad");
ut_params->ibuf, aad_len);
TEST_ASSERT_NOT_NULL(sym_op->aead.aad.data,
"no room to prepend aad");
- sym_op->aead.aad.phys_addr = rte_pktmbuf_
mtophys
(
+ sym_op->aead.aad.phys_addr = rte_pktmbuf_
iova
(
ut_params->ibuf);
memset(sym_op->aead.aad.data, 0, aad_len);
rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len);
ut_params->ibuf);
memset(sym_op->aead.aad.data, 0, aad_len);
rte_memcpy(sym_op->aead.aad.data, tdata->aad.data, aad_len);
-
TEST_HEXDUMP
(stdout, "iv:", iv_ptr, iv_len);
-
TEST_HEXDUMP
(stdout, "aad:",
+
debug_hexdump
(stdout, "iv:", iv_ptr, iv_len);
+
debug_hexdump
(stdout, "aad:",
sym_op->aead.aad.data, aad_len);
}
sym_op->aead.aad.data, aad_len);
}
@@
-8030,7
+8033,7
@@
test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
digest_mem = rte_pktmbuf_append(ut_params->obuf,
tdata->auth_tag.len);
digest_mem = rte_pktmbuf_append(ut_params->obuf,
tdata->auth_tag.len);
- digest_phys = rte_pktmbuf_
mtophys
_offset(
+ digest_phys = rte_pktmbuf_
iova
_offset(
ut_params->obuf,
tdata->plaintext.len + prepend_len);
}
ut_params->obuf,
tdata->plaintext.len + prepend_len);
}
@@
-8068,14
+8071,14
@@
test_authenticated_encryption_SGL(const struct aead_test_data *tdata,
* Place digest at the end of the last buffer
*/
if (!digest_phys)
* Place digest at the end of the last buffer
*/
if (!digest_phys)
- digest_phys = rte_pktmbuf_
mtophys
(buf) + to_trn;
+ digest_phys = rte_pktmbuf_
iova
(buf) + to_trn;
if (oop && buf_last_oop)
if (oop && buf_last_oop)
- digest_phys = rte_pktmbuf_
mtophys
(buf_last_oop) + to_trn;
+ digest_phys = rte_pktmbuf_
iova
(buf_last_oop) + to_trn;
if (!digest_mem && !oop) {
digest_mem = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ tdata->auth_tag.len);
if (!digest_mem && !oop) {
digest_mem = (uint8_t *)rte_pktmbuf_append(ut_params->ibuf,
+ tdata->auth_tag.len);
- digest_phys = rte_pktmbuf_
mtophys
_offset(ut_params->ibuf,
+ digest_phys = rte_pktmbuf_
iova
_offset(ut_params->ibuf,
tdata->plaintext.len);
}
tdata->plaintext.len);
}
@@
-9370,6
+9373,12
@@
static struct unit_test_suite cryptodev_dpaa_sec_testsuite = {
TEST_CASE_ST(ut_setup, ut_teardown,
test_AES_GCM_auth_decryption_test_case_256_7),
TEST_CASE_ST(ut_setup, ut_teardown,
test_AES_GCM_auth_decryption_test_case_256_7),
+ /** Out of place tests */
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_AES_GCM_authenticated_encryption_oop_test_case_1),
+ TEST_CASE_ST(ut_setup, ut_teardown,
+ test_AES_GCM_authenticated_decryption_oop_test_case_1),
+
TEST_CASES_END() /**< NULL terminate unit test array */
}
};
TEST_CASES_END() /**< NULL terminate unit test array */
}
};