summaryrefslogtreecommitdiffstats
path: root/app/test/test_cryptodev_perf.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-08-30 15:07:26 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2017-08-30 15:08:21 +0100
commitfdd2322bb45e83d3fd96b06ea32a4afbb60bcb6f (patch)
treec28b354e5687537e9e5729c625a378b9f46cab37 /app/test/test_cryptodev_perf.c
parentaab0c291a90f701b60f8c9a88cbcc265cba0ec8b (diff)
New upstream version 16.11.3
Change-Id: Ieb0ca817d9390060d3f128db691dc76bc0494727 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'app/test/test_cryptodev_perf.c')
-rw-r--r--app/test/test_cryptodev_perf.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c
index 89a67952..2a313497 100644
--- a/app/test/test_cryptodev_perf.c
+++ b/app/test/test_cryptodev_perf.c
@@ -2475,6 +2475,11 @@ static uint8_t aes_key[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
+static uint8_t aes_gcm_aad[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
static uint8_t aes_iv[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -2687,7 +2692,7 @@ test_perf_create_openssl_session(uint8_t dev_id, enum chain_mode chain,
#define AES_BLOCK_SIZE 16
#define AES_CIPHER_IV_LENGTH 16
-
+#define AES_GCM_AAD_LENGTH 16
#define TRIPLE_DES_BLOCK_SIZE 8
#define TRIPLE_DES_CIPHER_IV_LENGTH 8
@@ -2722,8 +2727,6 @@ test_perf_set_crypto_op_aes(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->auth.digest.phys_addr = rte_pktmbuf_mtophys_offset(m,
AES_CIPHER_IV_LENGTH + data_len);
op->sym->auth.digest.length = digest_len;
- op->sym->auth.aad.data = aes_iv;
- op->sym->auth.aad.length = AES_CIPHER_IV_LENGTH;
/* Cipher Parameters */
op->sym->cipher.iv.data = rte_pktmbuf_mtod(m, uint8_t *);
@@ -2760,8 +2763,8 @@ test_perf_set_crypto_op_aes_gcm(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->auth.digest.phys_addr =
rte_pktmbuf_mtophys_offset(m, data_len);
op->sym->auth.digest.length = digest_len;
- op->sym->auth.aad.data = aes_iv;
- op->sym->auth.aad.length = AES_CIPHER_IV_LENGTH;
+ op->sym->auth.aad.data = aes_gcm_aad;
+ op->sym->auth.aad.length = AES_GCM_AAD_LENGTH;
/* Cipher Parameters */
op->sym->cipher.iv.data = aes_iv;
@@ -2893,8 +2896,6 @@ test_perf_set_crypto_op_3des(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->auth.digest.phys_addr =
rte_pktmbuf_mtophys_offset(m, data_len);
op->sym->auth.digest.length = digest_len;
- op->sym->auth.aad.data = triple_des_iv;
- op->sym->auth.aad.length = TRIPLE_DES_CIPHER_IV_LENGTH;
/* Cipher Parameters */
op->sym->cipher.iv.data = triple_des_iv;