* [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup
@ 2017-06-21 6:41 Pablo de Lara
2017-06-21 6:41 ` [dpdk-dev] [PATCH 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
` (9 more replies)
0 siblings, 10 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
Prior to new crypto patches for this release,
there were some fixes and some cleanup to do in
some crypto drivers, tests, sample apps and documents.
Pablo de Lara (9):
crypto/aesni_mb: remove assert check
test/crypto: fix wrong AAD setting
test/crypto: remove unnecessary offset
test/crypto: remove offsets in wireless algorithm vectors
test/crypto: use existing algorithm strings
examples/l2fwd-crypto: fix application help
examples/l2fwd-crypto: fix auth info display
app/crypto-perf: fix error message
doc: fix typo in l2fwd-crypto usage
app/test-crypto-perf/cperf_options_parsing.c | 2 +-
doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 -
examples/l2fwd-crypto/main.c | 5 +-
test/test/test_cryptodev.c | 59 ++++++-----
.../test/test_cryptodev_kasumi_hash_test_vectors.h | 25 -----
test/test/test_cryptodev_kasumi_test_vectors.h | 36 +------
test/test/test_cryptodev_perf.c | 110 ++++++---------------
.../test/test_cryptodev_snow3g_hash_test_vectors.h | 22 -----
test/test/test_cryptodev_snow3g_test_vectors.h | 32 ------
test/test/test_cryptodev_zuc_test_vectors.h | 61 +-----------
11 files changed, 67 insertions(+), 291 deletions(-)
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 1/9] crypto/aesni_mb: remove assert check
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 6:41 ` [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
` (8 subsequent siblings)
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara, stable
Some assert checks in the driver were
incorrect, but they are not necessary anyway,
as application will panic in any case.
Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 45b25c9..43e4865 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -494,8 +494,6 @@ static inline void
verify_digest(JOB_AES_HMAC *job, struct rte_crypto_op *op) {
struct rte_mbuf *m_dst = (struct rte_mbuf *)job->user_data2;
- RTE_ASSERT(m_dst == NULL);
-
/* Verify digest if required */
if (memcmp(job->auth_tag_output, op->sym->auth.digest.data,
job->auth_tag_output_len_in_bytes) != 0)
@@ -522,8 +520,6 @@ post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
struct aesni_mb_session *sess;
- RTE_ASSERT(op == NULL);
-
if (unlikely(op->status == RTE_CRYPTO_OP_STATUS_ENQUEUED)) {
switch (job->status) {
case STS_COMPLETED:
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
2017-06-21 6:41 ` [dpdk-dev] [PATCH 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 17:39 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset Pablo de Lara
` (7 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara, stable
AAD should not point at IV for AES algorithms.
For AES-GCM, AAD will point at additional data in the mbuf.
For the other algorithms (such as AES CBC), AAD is not used.
Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
test/test/test_cryptodev_perf.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index d60028d..3568b01 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -2634,6 +2634,11 @@ static uint8_t aes_iv[] = {
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 triple_des_key[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2895,7 +2900,7 @@ test_perf_create_armv8_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
@@ -2939,8 +2944,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;
op->sym->auth.data.offset = AES_CIPHER_IV_LENGTH;
op->sym->auth.data.length = data_len;
}
@@ -2977,8 +2980,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;
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
2017-06-21 6:41 ` [dpdk-dev] [PATCH 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
2017-06-21 6:41 ` [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 16:38 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 4/9] test/crypto: remove offsets in wireless algorithm vectors Pablo de Lara
` (6 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
For AES/DES tests, there is no need to leave out
the first block from the crypto operation.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
test/test/test_cryptodev_perf.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index 3568b01..dd4fa35 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -2898,10 +2898,8 @@ test_perf_create_armv8_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
static struct rte_mbuf *
@@ -2988,11 +2986,11 @@ test_perf_set_crypto_op_aes_gcm(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->cipher.iv.length = AES_CIPHER_IV_LENGTH;
/* Data lengths/offsets Parameters */
- op->sym->auth.data.offset = AES_BLOCK_SIZE;
- op->sym->auth.data.length = data_len - AES_BLOCK_SIZE;
+ op->sym->auth.data.offset = 0;
+ op->sym->auth.data.length = data_len;
- op->sym->cipher.data.offset = AES_BLOCK_SIZE;
- op->sym->cipher.data.length = data_len - AES_BLOCK_SIZE;
+ op->sym->cipher.data.offset = 0;
+ op->sym->cipher.data.length = data_len;
op->sym->m_src = m;
@@ -3124,8 +3122,8 @@ test_perf_set_crypto_op_3des(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->auth.data.offset = 0;
op->sym->auth.data.length = data_len;
- op->sym->cipher.data.offset = TRIPLE_DES_BLOCK_SIZE;
- op->sym->cipher.data.length = data_len - TRIPLE_DES_BLOCK_SIZE;
+ op->sym->cipher.data.offset = 0;
+ op->sym->cipher.data.length = data_len;
op->sym->m_src = m;
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 4/9] test/crypto: remove offsets in wireless algorithm vectors
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
` (2 preceding siblings ...)
2017-06-21 6:41 ` [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 17:07 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 5/9] test/crypto: use existing algorithm strings Pablo de Lara
` (5 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
Instead of passing the authentication and cipher offset
from the test vectors, just get them from the IV and AAD lengths.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
test/test/test_cryptodev.c | 59 ++++++++++-----------
.../test/test_cryptodev_kasumi_hash_test_vectors.h | 25 ---------
test/test/test_cryptodev_kasumi_test_vectors.h | 36 +------------
.../test/test_cryptodev_snow3g_hash_test_vectors.h | 22 --------
test/test/test_cryptodev_snow3g_test_vectors.h | 32 ------------
test/test/test_cryptodev_zuc_test_vectors.h | 61 +---------------------
6 files changed, 32 insertions(+), 203 deletions(-)
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 029ce8a..eed7385 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -2180,10 +2180,9 @@ create_wireless_cipher_hash_operation(const struct wireless_test_data *tdata,
const uint8_t *iv = tdata->iv.data;
const uint8_t iv_len = tdata->iv.len;
const unsigned int cipher_len = tdata->validCipherLenInBits.len;
- const unsigned int cipher_offset =
- tdata->validCipherOffsetLenInBits.len;
+ const unsigned int cipher_offset = tdata->iv.len << 3;
const unsigned int auth_len = tdata->validAuthLenInBits.len;
- const unsigned int auth_offset = tdata->validAuthOffsetLenInBits.len;
+ const unsigned int auth_offset = tdata->aad.len << 3;
unsigned int iv_pad_len = 0;
unsigned int aad_buffer_len;
@@ -2506,7 +2505,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata)
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2568,7 +2567,7 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata)
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2628,7 +2627,7 @@ test_kasumi_authentication(const struct kasumi_hash_test_data *tdata)
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_KASUMI_F9,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2690,7 +2689,7 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata)
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_KASUMI_F9,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2887,7 +2886,7 @@ test_kasumi_encryption(const struct kasumi_test_data *tdata)
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -2961,7 +2960,7 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation(tdata->iv.data,
tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3032,7 +3031,7 @@ test_kasumi_encryption_oop(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3107,7 +3106,7 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3175,7 +3174,7 @@ test_kasumi_decryption_oop(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->ciphertext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3241,7 +3240,7 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation(tdata->iv.data,
tdata->iv.len,
tdata->ciphertext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3306,7 +3305,7 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3380,7 +3379,7 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3457,7 +3456,7 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3560,7 +3559,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len +
+ (tdata->iv.len << 3) +
extra_offset,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
@@ -3639,7 +3638,7 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3713,7 +3712,7 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3872,9 +3871,9 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len
+ (tdata->aad.len << 3)
);
if (retval < 0)
return retval;
@@ -3954,9 +3953,9 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
tdata->aad.data, tdata->aad.len,
plaintext_pad_len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len,
+ (tdata->aad.len << 3),
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2
);
@@ -4039,9 +4038,9 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
tdata->aad.data, tdata->aad.len,
plaintext_pad_len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len,
+ (tdata->aad.len << 3),
RTE_CRYPTO_AUTH_KASUMI_F9,
RTE_CRYPTO_CIPHER_KASUMI_F8
);
@@ -4126,9 +4125,9 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len
+ (tdata->aad.len << 3)
);
if (retval < 0)
return retval;
@@ -4210,7 +4209,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
/* Create ZUC operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_ZUC_EEA3);
if (retval < 0)
return retval;
@@ -4295,7 +4294,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
/* Create ZUC operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data,
tdata->iv.len, tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_ZUC_EEA3);
if (retval < 0)
return retval;
@@ -4375,7 +4374,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_ZUC_EIA3,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
diff --git a/test/test/test_cryptodev_kasumi_hash_test_vectors.h b/test/test/test_cryptodev_kasumi_hash_test_vectors.h
index 69742fa..63db9c4 100644
--- a/test/test/test_cryptodev_kasumi_hash_test_vectors.h
+++ b/test/test/test_cryptodev_kasumi_hash_test_vectors.h
@@ -58,10 +58,6 @@ struct kasumi_hash_test_data {
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} digest;
@@ -92,9 +88,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_1 = {
.validAuthLenInBits = {
.len = 189
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xF6, 0x3B, 0xD7, 0x2C},
.len = 4
@@ -127,9 +120,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_2 = {
.validAuthLenInBits = {
.len = 254
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xA9, 0xDA, 0xF1, 0xFF},
.len = 4
@@ -164,9 +154,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_3 = {
.validAuthLenInBits = {
.len = 319
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x15, 0x37, 0xD3, 0x16},
.len = 4
@@ -202,9 +189,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_4 = {
.validAuthLenInBits = {
.len = 384
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xDD, 0x7D, 0xFA, 0xDD },
.len = 4
@@ -249,9 +233,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_5 = {
.validAuthLenInBits = {
.len = 1000
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xC3, 0x83, 0x83, 0x9D},
.len = 4
@@ -293,9 +274,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_6 = {
.validAuthLenInBits = {
.len = 768
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x95, 0xAE, 0x41, 0xBA},
.len = 4
@@ -326,9 +304,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_7 = {
.validAuthLenInBits = {
.len = 120
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x87, 0x5F, 0xE4, 0x89},
.len = 4
diff --git a/test/test/test_cryptodev_kasumi_test_vectors.h b/test/test/test_cryptodev_kasumi_test_vectors.h
index ef1dc6f..6a7efb8 100644
--- a/test/test/test_cryptodev_kasumi_test_vectors.h
+++ b/test/test/test_cryptodev_kasumi_test_vectors.h
@@ -68,20 +68,12 @@ struct kasumi_test_data {
unsigned len;
} validCipherLenInBits;
- struct {
- unsigned len;
- } validCipherOffsetLenInBits;
-
/* Actual length of data to be hashed */
struct {
unsigned len;
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} digest;
@@ -140,10 +132,7 @@ struct kasumi_test_data kasumi_test_case_1 = {
},
.validCipherLenInBits = {
.len = 798
- },
- .validCipherOffsetLenInBits = {
- .len = 64
- },
+ }
};
struct kasumi_test_data kasumi_test_case_2 = {
@@ -188,9 +177,6 @@ struct kasumi_test_data kasumi_test_case_2 = {
},
.validCipherLenInBits = {
.len = 510
- },
- .validCipherOffsetLenInBits = {
- .len = 64
}
};
@@ -234,15 +220,9 @@ struct kasumi_test_data kasumi_test_case_3 = {
.validCipherLenInBits = {
.len = 120
},
- .validCipherOffsetLenInBits = {
- .len = 64
- },
.validAuthLenInBits = {
.len = 120
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x87, 0x5F, 0xE4, 0x89},
.len = 4
@@ -283,9 +263,6 @@ struct kasumi_test_data kasumi_test_case_4 = {
},
.validCipherLenInBits = {
.len = 253
- },
- .validCipherOffsetLenInBits = {
- .len = 64
}
};
@@ -343,10 +320,7 @@ struct kasumi_test_data kasumi_test_case_5 = {
},
.validCipherLenInBits = {
.len = 837
- },
- .validCipherOffsetLenInBits = {
- .len = 64
- },
+ }
};
struct kasumi_test_data kasumi_test_case_6 = {
@@ -389,15 +363,9 @@ struct kasumi_test_data kasumi_test_case_6 = {
.validCipherLenInBits = {
.len = 120
},
- .validCipherOffsetLenInBits = {
- .len = 64
- },
.validAuthLenInBits = {
.len = 120
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x0F, 0xD2, 0xAA, 0xB5},
.len = 4
diff --git a/test/test/test_cryptodev_snow3g_hash_test_vectors.h b/test/test/test_cryptodev_snow3g_hash_test_vectors.h
index a8a47db..e88e7ab 100644
--- a/test/test/test_cryptodev_snow3g_hash_test_vectors.h
+++ b/test/test/test_cryptodev_snow3g_hash_test_vectors.h
@@ -54,10 +54,6 @@ struct snow3g_hash_test_data {
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} digest;
@@ -92,9 +88,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_1 = {
.validAuthLenInBits = {
.len = 384
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x38, 0xB5, 0x54, 0xC0 },
.len = 4
@@ -140,9 +133,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_2 = {
.validAuthLenInBits = {
.len = 1000
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x06, 0x17, 0x45, 0xAE},
.len = 4
@@ -429,9 +419,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_3 = {
.validAuthLenInBits = {
.len = 16448
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x17, 0x9F, 0x2F, 0xA6},
.len = 4
@@ -464,9 +451,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_4 = {
.validAuthLenInBits = {
.len = 189
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x2B, 0xCE, 0x18, 0x20},
.len = 4
@@ -500,9 +484,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_5 = {
.validAuthLenInBits = {
.len = 254
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xFC, 0x7B, 0x18, 0xBD},
.len = 4
@@ -537,9 +518,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_6 = {
.validAuthLenInBits = {
.len = 319
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x02, 0xF1, 0xFA, 0xAF},
.len = 4
diff --git a/test/test/test_cryptodev_snow3g_test_vectors.h b/test/test/test_cryptodev_snow3g_test_vectors.h
index 51917c1..0c8ad1c 100644
--- a/test/test/test_cryptodev_snow3g_test_vectors.h
+++ b/test/test/test_cryptodev_snow3g_test_vectors.h
@@ -64,17 +64,9 @@ struct snow3g_test_data {
struct {
unsigned len;
- } validCipherOffsetLenInBits;
-
- struct {
- unsigned len;
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} aad;
@@ -141,9 +133,6 @@ struct snow3g_test_data snow3g_test_case_1 = {
.validCipherLenInBits = {
.len = 800
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00,
@@ -200,9 +189,6 @@ struct snow3g_test_data snow3g_test_case_2 = {
.validCipherLenInBits = {
.len = 512
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
@@ -247,9 +233,6 @@ struct snow3g_test_data snow3g_test_case_3 = {
.validCipherLenInBits = {
.len = 120
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
@@ -263,9 +246,6 @@ struct snow3g_test_data snow3g_test_case_3 = {
},
.validAuthLenInBits = {
.len = 120
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
@@ -307,9 +287,6 @@ struct snow3g_test_data snow3g_test_case_4 = {
},
.validCipherLenInBits = {
.len = 256
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -371,9 +348,6 @@ struct snow3g_test_data snow3g_test_case_5 = {
.validCipherLenInBits = {
.len = 840
},
- .validCipherOffsetLenInBits = {
- .len = 128
- }
};
struct snow3g_test_data snow3g_test_case_6 = {
.key = {
@@ -429,15 +403,9 @@ struct snow3g_test_data snow3g_test_case_6 = {
.validCipherLenInBits = {
.len = 384
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.validAuthLenInBits = {
.len = 384
},
- .validAuthOffsetLenInBits = {
- .len = 128
- }
};
#endif /* TEST_CRYPTODEV_SNOW3G_TEST_VECTORS_H_ */
diff --git a/test/test/test_cryptodev_zuc_test_vectors.h b/test/test/test_cryptodev_zuc_test_vectors.h
index a900e91..50fb538 100644
--- a/test/test/test_cryptodev_zuc_test_vectors.h
+++ b/test/test/test_cryptodev_zuc_test_vectors.h
@@ -64,17 +64,9 @@ struct wireless_test_data {
struct {
unsigned len;
- } validCipherOffsetLenInBits;
-
- struct {
- unsigned len;
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} aad;
@@ -122,9 +114,6 @@ static struct wireless_test_data zuc_test_case_cipher_193b = {
},
.validCipherLenInBits = {
.len = 193
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -184,9 +173,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b = {
},
.validCipherLenInBits = {
.len = 800
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -270,10 +256,7 @@ static struct wireless_test_data zuc_test_case_cipher_1570b = {
},
.validCipherLenInBits = {
.len = 1570
- },
- .validCipherOffsetLenInBits = {
- .len = 128
- },
+ }
};
static struct wireless_test_data zuc_test_case_cipher_2798b = {
@@ -394,9 +377,6 @@ static struct wireless_test_data zuc_test_case_cipher_2798b = {
},
.validCipherLenInBits = {
.len = 2798
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -556,9 +536,6 @@ static struct wireless_test_data zuc_test_case_cipher_4019b = {
},
.validCipherLenInBits = {
.len = 4019
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -601,9 +578,6 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
.validCipherLenInBits = {
.len = 200
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
@@ -617,9 +591,6 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
},
.validAuthLenInBits = {
.len = 200
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
@@ -680,9 +651,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
.validCipherLenInBits = {
.len = 800
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
@@ -696,9 +664,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
},
.validAuthLenInBits = {
.len = 120
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
@@ -724,9 +689,6 @@ struct wireless_test_data zuc_test_case_auth_1b = {
.validAuthLenInBits = {
.len = 1
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xC8, 0xA9, 0x59, 0x5E},
.len = 4
@@ -758,9 +720,6 @@ struct wireless_test_data zuc_test_case_auth_90b = {
.validAuthLenInBits = {
.len = 90
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x67, 0x19, 0xA0, 0x88},
.len = 4
@@ -800,9 +759,6 @@ struct wireless_test_data zuc_test_case_auth_577b = {
.validAuthLenInBits = {
.len = 577
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xFA, 0xE8, 0xFF, 0x0B},
.len = 4
@@ -865,9 +821,6 @@ struct wireless_test_data zuc_test_case_auth_2079b = {
.validAuthLenInBits = {
.len = 2079
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x00, 0x4A, 0xC4, 0xD6},
.len = 4
@@ -986,9 +939,6 @@ struct wireless_test_data zuc_test_auth_5670b = {
.validAuthLenInBits = {
.len = 5670
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x0C, 0xA1, 0x27, 0x92},
.len = 4
@@ -1011,9 +961,6 @@ static struct wireless_test_data zuc_test_case_auth_128b = {
.validAuthLenInBits = {
.len = 8
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = { 0x39, 0x0a, 0x91, 0xb7 },
.len = 4
@@ -1076,9 +1023,6 @@ static struct wireless_test_data zuc_test_case_auth_2080b = {
.validAuthLenInBits = {
.len = 2080
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x03, 0x95, 0x32, 0xe1},
.len = 4
@@ -1118,9 +1062,6 @@ static struct wireless_test_data zuc_test_case_auth_584b = {
.validAuthLenInBits = {
.len = 584
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x24, 0xa8, 0x42, 0xb3},
.len = 4
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 5/9] test/crypto: use existing algorithm strings
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
` (3 preceding siblings ...)
2017-06-21 6:41 ` [dpdk-dev] [PATCH 4/9] test/crypto: remove offsets in wireless algorithm vectors Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 16:42 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 6/9] examples/l2fwd-crypto: fix application help Pablo de Lara
` (4 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara
Instead of using duplicated functions to get the algorithm
strings, use the functions from the cryptodev library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
test/test/test_cryptodev_perf.c | 83 ++++++++---------------------------------
1 file changed, 16 insertions(+), 67 deletions(-)
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index dd4fa35..a6b29aa 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -214,57 +214,6 @@ static const char *pmd_name(enum rte_cryptodev_type pmd)
}
}
-static const char *cipher_algo_name(enum rte_crypto_cipher_algorithm cipher_algo)
-{
- switch (cipher_algo) {
- case RTE_CRYPTO_CIPHER_NULL: return "NULL";
- case RTE_CRYPTO_CIPHER_3DES_CBC: return "3DES_CBC";
- case RTE_CRYPTO_CIPHER_3DES_CTR: return "3DES_CTR";
- case RTE_CRYPTO_CIPHER_3DES_ECB: return "3DES_ECB";
- case RTE_CRYPTO_CIPHER_AES_CBC: return "AES_CBC";
- case RTE_CRYPTO_CIPHER_AES_CCM: return "AES_CCM";
- case RTE_CRYPTO_CIPHER_AES_CTR: return "AES_CTR";
- case RTE_CRYPTO_CIPHER_AES_ECB: return "AES_ECB";
- case RTE_CRYPTO_CIPHER_AES_F8: return "AES_F8";
- case RTE_CRYPTO_CIPHER_AES_GCM: return "AES_GCM";
- case RTE_CRYPTO_CIPHER_AES_XTS: return "AES_XTS";
- case RTE_CRYPTO_CIPHER_ARC4: return "ARC4";
- case RTE_CRYPTO_CIPHER_KASUMI_F8: return "KASUMI_F8";
- case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: return "SNOW3G_UEA2";
- case RTE_CRYPTO_CIPHER_ZUC_EEA3: return "ZUC_EEA3";
- default: return "Another cipher algo";
- }
-}
-
-static const char *auth_algo_name(enum rte_crypto_auth_algorithm auth_algo)
-{
- switch (auth_algo) {
- case RTE_CRYPTO_AUTH_NULL: return "NULL"; break;
- case RTE_CRYPTO_AUTH_AES_CBC_MAC: return "AES_CBC_MAC"; break;
- case RTE_CRYPTO_AUTH_AES_CCM: return "AES_CCM"; break;
- case RTE_CRYPTO_AUTH_AES_CMAC: return "AES_CMAC,"; break;
- case RTE_CRYPTO_AUTH_AES_GCM: return "AES_GCM"; break;
- case RTE_CRYPTO_AUTH_AES_GMAC: return "AES_GMAC"; break;
- case RTE_CRYPTO_AUTH_AES_XCBC_MAC: return "AES_XCBC_MAC"; break;
- case RTE_CRYPTO_AUTH_KASUMI_F9: return "KASUMI_F9"; break;
- case RTE_CRYPTO_AUTH_MD5: return "MD5"; break;
- case RTE_CRYPTO_AUTH_MD5_HMAC: return "MD5_HMAC,"; break;
- case RTE_CRYPTO_AUTH_SHA1: return "SHA1"; break;
- case RTE_CRYPTO_AUTH_SHA1_HMAC: return "SHA1_HMAC"; break;
- case RTE_CRYPTO_AUTH_SHA224: return "SHA224"; break;
- case RTE_CRYPTO_AUTH_SHA224_HMAC: return "SHA224_HMAC"; break;
- case RTE_CRYPTO_AUTH_SHA256: return "SHA256"; break;
- case RTE_CRYPTO_AUTH_SHA256_HMAC: return "SHA256_HMAC"; break;
- case RTE_CRYPTO_AUTH_SHA384: return "SHA384,"; break;
- case RTE_CRYPTO_AUTH_SHA384_HMAC: return "SHA384_HMAC,"; break;
- case RTE_CRYPTO_AUTH_SHA512: return "SHA512,"; break;
- case RTE_CRYPTO_AUTH_SHA512_HMAC: return "SHA512_HMAC,"; break;
- case RTE_CRYPTO_AUTH_SNOW3G_UIA2: return "SNOW3G_UIA2"; break;
- case RTE_CRYPTO_AUTH_ZUC_EIA3: return "RTE_CRYPTO_AUTH_ZUC_EIA3"; break;
- default: return "Another auth algo"; break;
- };
-}
-
static struct rte_mbuf *
setup_test_string(struct rte_mempool *mpool,
const uint8_t *data, size_t len, uint8_t blocksize)
@@ -2168,8 +2117,8 @@ test_perf_snow3G_optimise_cyclecount(struct perf_test_params *pparams)
pmd_name(gbl_cryptodev_perftest_devtype),
ts_params->dev_id, 0,
chain_mode_name(pparams->chain),
- cipher_algo_name(pparams->cipher_algo),
- auth_algo_name(pparams->auth_algo),
+ rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
+ rte_crypto_auth_algorithm_strings[pparams->auth_algo],
pparams->buf_size);
printf("\nOps Tx\tOps Rx\tOps/burst ");
printf("Retries EmptyPolls\tIACycles/CyOp\tIACycles/Burst\tIACycles/Byte");
@@ -2363,9 +2312,9 @@ test_perf_openssl_optimise_cyclecount(struct perf_test_params *pparams)
pmd_name(gbl_cryptodev_perftest_devtype),
ts_params->dev_id, 0,
chain_mode_name(pparams->chain),
- cipher_algo_name(pparams->cipher_algo),
+ rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
pparams->cipher_key_length,
- auth_algo_name(pparams->auth_algo),
+ rte_crypto_auth_algorithm_strings[pparams->auth_algo],
pparams->buf_size);
printf("\nOps Tx\tOps Rx\tOps/burst ");
printf("Retries EmptyPolls\tIACycles/CyOp\tIACycles/Burst\t"
@@ -2498,9 +2447,9 @@ test_perf_armv8_optimise_cyclecount(struct perf_test_params *pparams)
pmd_name(gbl_cryptodev_perftest_devtype),
ts_params->dev_id, 0,
chain_mode_name(pparams->chain),
- cipher_algo_name(pparams->cipher_algo),
+ rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
pparams->cipher_key_length,
- auth_algo_name(pparams->auth_algo),
+ rte_crypto_auth_algorithm_strings[pparams->auth_algo],
pparams->buf_size);
printf("\nOps Tx\tOps Rx\tOps/burst ");
printf("Retries "
@@ -3796,8 +3745,8 @@ test_perf_aes_cbc_encrypt_digest_vary_pkt_size(void)
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
" burst_size: %d ops\n",
chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
+ rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
params_set[i].cipher_key_length,
burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\t"
@@ -3849,8 +3798,8 @@ test_perf_snow3G_vary_pkt_size(void)
pmd_name(gbl_cryptodev_perftest_devtype),
testsuite_params.dev_id, 0,
chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
+ rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
burst_sizes[k]);
params_set[i].burst_size = burst_sizes[k];
@@ -3935,8 +3884,8 @@ test_perf_openssl_vary_pkt_size(void)
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
" burst_size: %d ops\n",
chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
+ rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
params_set[i].cipher_key_length,
burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\tRetries\t"
@@ -4075,8 +4024,8 @@ test_perf_armv8_vary_pkt_size(void)
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
" burst_size: %d ops\n",
chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
+ rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
params_set[i].cipher_key_length,
burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\tRetries\t"
@@ -4611,8 +4560,8 @@ test_perf_continual_performance_test(void)
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
" burst_size: %d ops\n",
chain_mode_name(params_set.chain),
- cipher_algo_name(params_set.cipher_algo),
- auth_algo_name(params_set.auth_algo),
+ rte_crypto_cipher_algorithm_strings[params_set.cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set.auth_algo],
params_set.cipher_key_length,
burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\t"
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 6/9] examples/l2fwd-crypto: fix application help
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
` (4 preceding siblings ...)
2017-06-21 6:41 ` [dpdk-dev] [PATCH 5/9] test/crypto: use existing algorithm strings Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 16:43 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 7/9] examples/l2fwd-crypto: fix auth info display Pablo de Lara
` (3 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara, stable
Chain parameter can be CIPHER_HASH, HASH_CIPHER,
CIPHER_ONLY or HASH_ONLY, but only the first two
were shown in the application help.
Fixes: 1a75e9f3fadb ("examples/l2fwd-crypto: add cipher/hash only cases")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/l2fwd-crypto/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 66b4af3..841ec6e 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -842,7 +842,8 @@ l2fwd_crypto_usage(const char *prgname)
" (0 to disable, 10 default, 86400 maximum)\n"
" --cdev_type HW / SW / ANY\n"
- " --chain HASH_CIPHER / CIPHER_HASH\n"
+ " --chain HASH_CIPHER / CIPHER_HASH / CIPHER_ONLY /"
+ " HASH_ONLY\n"
" --cipher_algo ALGO\n"
" --cipher_op ENCRYPT / DECRYPT\n"
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 7/9] examples/l2fwd-crypto: fix auth info display
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
` (5 preceding siblings ...)
2017-06-21 6:41 ` [dpdk-dev] [PATCH 6/9] examples/l2fwd-crypto: fix application help Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 16:44 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 8/9] app/crypto-perf: fix error message Pablo de Lara
` (2 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara, stable
Fixes: 4790f99d2d31 ("examples/l2fwd-crypto: use cryptodev algorithm parser")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
examples/l2fwd-crypto/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 841ec6e..779b4fb 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1263,7 +1263,7 @@ display_auth_info(struct l2fwd_crypto_options *options)
{
printf("\n---- Authentication information ---\n");
printf("Algorithm: %s\n",
- rte_crypto_auth_algorithm_strings[options->auth_xform.cipher.algo]);
+ rte_crypto_auth_algorithm_strings[options->auth_xform.auth.algo]);
rte_hexdump(stdout, "Auth key:",
options->auth_xform.auth.key.data,
options->auth_xform.auth.key.length);
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 8/9] app/crypto-perf: fix error message
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
` (6 preceding siblings ...)
2017-06-21 6:41 ` [dpdk-dev] [PATCH 7/9] examples/l2fwd-crypto: fix auth info display Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 16:39 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 9/9] doc: fix typo in l2fwd-crypto usage Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara, stable
Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/cperf_options_parsing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index d172671..63ba37c 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -312,7 +312,7 @@ parse_buffer_sz(struct cperf_options *opts, const char *arg)
&opts->min_buffer_size,
&opts->max_buffer_size);
if (ret < 0) {
- RTE_LOG(ERR, USER1, "failed to parse burst size/s\n");
+ RTE_LOG(ERR, USER1, "failed to parse buffer size/s\n");
return -1;
}
opts->buffer_size_count = ret;
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH 9/9] doc: fix typo in l2fwd-crypto usage
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
` (7 preceding siblings ...)
2017-06-21 6:41 ` [dpdk-dev] [PATCH 8/9] app/crypto-perf: fix error message Pablo de Lara
@ 2017-06-21 6:41 ` Pablo de Lara
2017-06-21 17:44 ` Trahe, Fiona
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-21 6:41 UTC (permalink / raw)
To: declan.doherty; +Cc: dev, Pablo de Lara, stable
Fixes: ba7b86b1419b ("doc: add l2fwd-crypto sample app guide")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index d6df36b..45d8a12 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -135,7 +135,7 @@ where,
* auth_algo: select the authentication algorithm (default is sha1-hmac)
-* cipher_op: select the authentication operation to perform: GENERATE or VERIFY
+* auth_op: select the authentication operation to perform: GENERATE or VERIFY
(default is GENERATE)
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset
2017-06-21 6:41 ` [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset Pablo de Lara
@ 2017-06-21 16:38 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 16:38 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset
>
> For AES/DES tests, there is no need to leave out
> the first block from the crypto operation.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 8/9] app/crypto-perf: fix error message
2017-06-21 6:41 ` [dpdk-dev] [PATCH 8/9] app/crypto-perf: fix error message Pablo de Lara
@ 2017-06-21 16:39 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 16:39 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 8/9] app/crypto-perf: fix error message
>
> Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
> CC: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 5/9] test/crypto: use existing algorithm strings
2017-06-21 6:41 ` [dpdk-dev] [PATCH 5/9] test/crypto: use existing algorithm strings Pablo de Lara
@ 2017-06-21 16:42 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 16:42 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH 5/9] test/crypto: use existing algorithm strings
>
> Instead of using duplicated functions to get the algorithm
> strings, use the functions from the cryptodev library.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 6/9] examples/l2fwd-crypto: fix application help
2017-06-21 6:41 ` [dpdk-dev] [PATCH 6/9] examples/l2fwd-crypto: fix application help Pablo de Lara
@ 2017-06-21 16:43 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 16:43 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 6/9] examples/l2fwd-crypto: fix application help
>
> Chain parameter can be CIPHER_HASH, HASH_CIPHER,
> CIPHER_ONLY or HASH_ONLY, but only the first two
> were shown in the application help.
>
> Fixes: 1a75e9f3fadb ("examples/l2fwd-crypto: add cipher/hash only cases")
> CC: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 7/9] examples/l2fwd-crypto: fix auth info display
2017-06-21 6:41 ` [dpdk-dev] [PATCH 7/9] examples/l2fwd-crypto: fix auth info display Pablo de Lara
@ 2017-06-21 16:44 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 16:44 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 7/9] examples/l2fwd-crypto: fix auth info display
>
> Fixes: 4790f99d2d31 ("examples/l2fwd-crypto: use cryptodev algorithm parser")
> CC: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 4/9] test/crypto: remove offsets in wireless algorithm vectors
2017-06-21 6:41 ` [dpdk-dev] [PATCH 4/9] test/crypto: remove offsets in wireless algorithm vectors Pablo de Lara
@ 2017-06-21 17:07 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 17:07 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH 4/9] test/crypto: remove offsets in wireless algorithm vectors
>
> Instead of passing the authentication and cipher offset
> from the test vectors, just get them from the IV and AAD lengths.
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting
2017-06-21 6:41 ` [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
@ 2017-06-21 17:39 ` Trahe, Fiona
2017-06-22 10:40 ` De Lara Guarch, Pablo
0 siblings, 1 reply; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 17:39 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan
Cc: dev, De Lara Guarch, Pablo, stable, Trahe, Fiona
Hi Pablo,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting
>
> AAD should not point at IV for AES algorithms.
> For AES-GCM, AAD will point at additional data in the mbuf.
> For the other algorithms (such as AES CBC), AAD is not used.
>
> Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
> CC: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> test/test/test_cryptodev_perf.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
> index d60028d..3568b01 100644
> --- a/test/test/test_cryptodev_perf.c
> +++ b/test/test/test_cryptodev_perf.c
> @@ -2634,6 +2634,11 @@ static uint8_t aes_iv[] = {
> 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 triple_des_key[] = {
> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> @@ -2895,7 +2900,7 @@ test_perf_create_armv8_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
>
> @@ -2939,8 +2944,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;
Same change should be made for triple_des case
> op->sym->auth.data.offset = AES_CIPHER_IV_LENGTH;
> op->sym->auth.data.length = data_len;
> }
> @@ -2977,8 +2980,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;
> --
> 2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 9/9] doc: fix typo in l2fwd-crypto usage
2017-06-21 6:41 ` [dpdk-dev] [PATCH 9/9] doc: fix typo in l2fwd-crypto usage Pablo de Lara
@ 2017-06-21 17:44 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-21 17:44 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, De Lara Guarch, Pablo, stable
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, June 21, 2017 7:42 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH 9/9] doc: fix typo in l2fwd-crypto usage
>
> Fixes: ba7b86b1419b ("doc: add l2fwd-crypto sample app guide")
> CC: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting
2017-06-21 17:39 ` Trahe, Fiona
@ 2017-06-22 10:40 ` De Lara Guarch, Pablo
0 siblings, 0 replies; 32+ messages in thread
From: De Lara Guarch, Pablo @ 2017-06-22 10:40 UTC (permalink / raw)
To: Trahe, Fiona, Doherty, Declan; +Cc: dev, stable
> -----Original Message-----
> From: Trahe, Fiona
> Sent: Wednesday, June 21, 2017 6:40 PM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> stable@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>
> Subject: RE: [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting
>
> Hi Pablo,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > Sent: Wednesday, June 21, 2017 7:42 AM
> > To: Doherty, Declan <declan.doherty@intel.com>
> > Cc: dev@dpdk.org; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting
> >
> > AAD should not point at IV for AES algorithms.
> > For AES-GCM, AAD will point at additional data in the mbuf.
> > For the other algorithms (such as AES CBC), AAD is not used.
> >
> > Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
> > CC: stable@dpdk.org
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> > ---
> > test/test/test_cryptodev_perf.c | 13 ++++++++-----
> > 1 file changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/test/test/test_cryptodev_perf.c
> > b/test/test/test_cryptodev_perf.c index d60028d..3568b01 100644
> > --- a/test/test/test_cryptodev_perf.c
> > +++ b/test/test/test_cryptodev_perf.c
> > @@ -2634,6 +2634,11 @@ static uint8_t aes_iv[] = {
> > 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 triple_des_key[] = {
> > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> > 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -2895,7
> +2900,7
> > @@ test_perf_create_armv8_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
> >
> > @@ -2939,8 +2944,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;
> Same change should be made for triple_des case
Good catch. Will fix in v2.
>
> > op->sym->auth.data.offset = AES_CIPHER_IV_LENGTH;
> > op->sym->auth.data.length = data_len;
> > }
> > @@ -2977,8 +2980,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;
> > --
> > 2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
` (8 preceding siblings ...)
2017-06-21 6:41 ` [dpdk-dev] [PATCH 9/9] doc: fix typo in l2fwd-crypto usage Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
` (9 more replies)
9 siblings, 10 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara
Prior to new crypto patches for this release,
there were some fixes and some cleanup to do in
some crypto drivers, tests, sample apps and documents.
Changes in v2:
- Fixed too long lines
- Removed unnecessary AAD setting for 3DES/SHA1 test
Pablo de Lara (9):
crypto/aesni_mb: remove assert check
test/crypto: fix wrong AAD setting
test/crypto: remove unnecessary offset
test/crypto: remove offsets in wireless algorithm vectors
test/crypto: use existing algorithm strings
examples/l2fwd-crypto: fix application help
examples/l2fwd-crypto: fix auth info display
app/crypto-perf: fix error message
doc: fix typo in l2fwd-crypto usage
app/test-crypto-perf/cperf_options_parsing.c | 2 +-
doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 -
examples/l2fwd-crypto/main.c | 5 +-
test/test/test_cryptodev.c | 59 ++++----
.../test/test_cryptodev_kasumi_hash_test_vectors.h | 25 ----
test/test/test_cryptodev_kasumi_test_vectors.h | 36 +----
test/test/test_cryptodev_perf.c | 148 +++++++--------------
.../test/test_cryptodev_snow3g_hash_test_vectors.h | 22 ---
test/test/test_cryptodev_snow3g_test_vectors.h | 32 -----
test/test/test_cryptodev_zuc_test_vectors.h | 61 +--------
11 files changed, 87 insertions(+), 309 deletions(-)
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 1/9] crypto/aesni_mb: remove assert check
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-23 12:50 ` Declan Doherty
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
` (8 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara, stable
Some assert checks in the driver were
incorrect, but they are not necessary anyway,
as application will panic in any case.
Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 45b25c9..43e4865 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -494,8 +494,6 @@ static inline void
verify_digest(JOB_AES_HMAC *job, struct rte_crypto_op *op) {
struct rte_mbuf *m_dst = (struct rte_mbuf *)job->user_data2;
- RTE_ASSERT(m_dst == NULL);
-
/* Verify digest if required */
if (memcmp(job->auth_tag_output, op->sym->auth.digest.data,
job->auth_tag_output_len_in_bytes) != 0)
@@ -522,8 +520,6 @@ post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
struct aesni_mb_session *sess;
- RTE_ASSERT(op == NULL);
-
if (unlikely(op->status == RTE_CRYPTO_OP_STATUS_ENQUEUED)) {
switch (job->status) {
case STS_COMPLETED:
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 2/9] test/crypto: fix wrong AAD setting
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-23 9:56 ` Trahe, Fiona
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 3/9] test/crypto: remove unnecessary offset Pablo de Lara
` (7 subsequent siblings)
9 siblings, 1 reply; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara, stable
AAD should not point at IV for AES algorithms.
For AES-GCM, AAD will point at additional data in the mbuf.
For the other algorithms (such as 3DES CBC), AAD is not used.
Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
test/test/test_cryptodev_perf.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index d60028d..894b2dd 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -2634,6 +2634,11 @@ static uint8_t aes_iv[] = {
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 triple_des_key[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2895,7 +2900,7 @@ test_perf_create_armv8_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
@@ -2939,8 +2944,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;
op->sym->auth.data.offset = AES_CIPHER_IV_LENGTH;
op->sym->auth.data.length = data_len;
}
@@ -2977,8 +2980,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;
@@ -3110,8 +3113,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;
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 3/9] test/crypto: remove unnecessary offset
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 4/9] test/crypto: remove offsets in wireless algorithm vectors Pablo de Lara
` (6 subsequent siblings)
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara
For AES/DES tests, there is no need to leave out
the first block from the crypto operation.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
test/test/test_cryptodev_perf.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index 894b2dd..6be7012 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -2898,10 +2898,8 @@ test_perf_create_armv8_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
static struct rte_mbuf *
@@ -2988,11 +2986,11 @@ test_perf_set_crypto_op_aes_gcm(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->cipher.iv.length = AES_CIPHER_IV_LENGTH;
/* Data lengths/offsets Parameters */
- op->sym->auth.data.offset = AES_BLOCK_SIZE;
- op->sym->auth.data.length = data_len - AES_BLOCK_SIZE;
+ op->sym->auth.data.offset = 0;
+ op->sym->auth.data.length = data_len;
- op->sym->cipher.data.offset = AES_BLOCK_SIZE;
- op->sym->cipher.data.length = data_len - AES_BLOCK_SIZE;
+ op->sym->cipher.data.offset = 0;
+ op->sym->cipher.data.length = data_len;
op->sym->m_src = m;
@@ -3122,8 +3120,8 @@ test_perf_set_crypto_op_3des(struct rte_crypto_op *op, struct rte_mbuf *m,
op->sym->auth.data.offset = 0;
op->sym->auth.data.length = data_len;
- op->sym->cipher.data.offset = TRIPLE_DES_BLOCK_SIZE;
- op->sym->cipher.data.length = data_len - TRIPLE_DES_BLOCK_SIZE;
+ op->sym->cipher.data.offset = 0;
+ op->sym->cipher.data.length = data_len;
op->sym->m_src = m;
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 4/9] test/crypto: remove offsets in wireless algorithm vectors
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
` (2 preceding siblings ...)
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 3/9] test/crypto: remove unnecessary offset Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 5/9] test/crypto: use existing algorithm strings Pablo de Lara
` (5 subsequent siblings)
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara
Instead of passing the authentication and cipher offset
from the test vectors, just get them from the IV and AAD lengths.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
test/test/test_cryptodev.c | 59 ++++++++++-----------
.../test/test_cryptodev_kasumi_hash_test_vectors.h | 25 ---------
test/test/test_cryptodev_kasumi_test_vectors.h | 36 +------------
.../test/test_cryptodev_snow3g_hash_test_vectors.h | 22 --------
test/test/test_cryptodev_snow3g_test_vectors.h | 32 ------------
test/test/test_cryptodev_zuc_test_vectors.h | 61 +---------------------
6 files changed, 32 insertions(+), 203 deletions(-)
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 029ce8a..eed7385 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -2180,10 +2180,9 @@ create_wireless_cipher_hash_operation(const struct wireless_test_data *tdata,
const uint8_t *iv = tdata->iv.data;
const uint8_t iv_len = tdata->iv.len;
const unsigned int cipher_len = tdata->validCipherLenInBits.len;
- const unsigned int cipher_offset =
- tdata->validCipherOffsetLenInBits.len;
+ const unsigned int cipher_offset = tdata->iv.len << 3;
const unsigned int auth_len = tdata->validAuthLenInBits.len;
- const unsigned int auth_offset = tdata->validAuthOffsetLenInBits.len;
+ const unsigned int auth_offset = tdata->aad.len << 3;
unsigned int iv_pad_len = 0;
unsigned int aad_buffer_len;
@@ -2506,7 +2505,7 @@ test_snow3g_authentication(const struct snow3g_hash_test_data *tdata)
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2568,7 +2567,7 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata)
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2628,7 +2627,7 @@ test_kasumi_authentication(const struct kasumi_hash_test_data *tdata)
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_KASUMI_F9,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2690,7 +2689,7 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata)
RTE_CRYPTO_AUTH_OP_VERIFY,
RTE_CRYPTO_AUTH_KASUMI_F9,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
@@ -2887,7 +2886,7 @@ test_kasumi_encryption(const struct kasumi_test_data *tdata)
/* Create KASUMI operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -2961,7 +2960,7 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation(tdata->iv.data,
tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3032,7 +3031,7 @@ test_kasumi_encryption_oop(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3107,7 +3106,7 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3175,7 +3174,7 @@ test_kasumi_decryption_oop(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->ciphertext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3241,7 +3240,7 @@ test_kasumi_decryption(const struct kasumi_test_data *tdata)
retval = create_wireless_algo_cipher_operation(tdata->iv.data,
tdata->iv.len,
tdata->ciphertext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_KASUMI_F8);
if (retval < 0)
return retval;
@@ -3306,7 +3305,7 @@ test_snow3g_encryption(const struct snow3g_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3380,7 +3379,7 @@ test_snow3g_encryption_oop(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3457,7 +3456,7 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3560,7 +3559,7 @@ test_snow3g_encryption_offset_oop(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len +
+ (tdata->iv.len << 3) +
extra_offset,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
@@ -3639,7 +3638,7 @@ static int test_snow3g_decryption(const struct snow3g_test_data *tdata)
/* Create SNOW 3G operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3713,7 +3712,7 @@ static int test_snow3g_decryption_oop(const struct snow3g_test_data *tdata)
retval = create_wireless_algo_cipher_operation_oop(tdata->iv.data,
tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_SNOW3G_UEA2);
if (retval < 0)
return retval;
@@ -3872,9 +3871,9 @@ test_snow3g_cipher_auth(const struct snow3g_test_data *tdata)
RTE_CRYPTO_CIPHER_SNOW3G_UEA2,
tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len
+ (tdata->aad.len << 3)
);
if (retval < 0)
return retval;
@@ -3954,9 +3953,9 @@ test_snow3g_auth_cipher(const struct snow3g_test_data *tdata)
tdata->aad.data, tdata->aad.len,
plaintext_pad_len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len,
+ (tdata->aad.len << 3),
RTE_CRYPTO_AUTH_SNOW3G_UIA2,
RTE_CRYPTO_CIPHER_SNOW3G_UEA2
);
@@ -4039,9 +4038,9 @@ test_kasumi_auth_cipher(const struct kasumi_test_data *tdata)
tdata->aad.data, tdata->aad.len,
plaintext_pad_len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len,
+ (tdata->aad.len << 3),
RTE_CRYPTO_AUTH_KASUMI_F9,
RTE_CRYPTO_CIPHER_KASUMI_F8
);
@@ -4126,9 +4125,9 @@ test_kasumi_cipher_auth(const struct kasumi_test_data *tdata)
RTE_CRYPTO_CIPHER_KASUMI_F8,
tdata->iv.data, tdata->iv.len,
tdata->validCipherLenInBits.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len
+ (tdata->aad.len << 3)
);
if (retval < 0)
return retval;
@@ -4210,7 +4209,7 @@ test_zuc_encryption(const struct wireless_test_data *tdata)
/* Create ZUC operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data, tdata->iv.len,
tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_ZUC_EEA3);
if (retval < 0)
return retval;
@@ -4295,7 +4294,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
/* Create ZUC operation */
retval = create_wireless_algo_cipher_operation(tdata->iv.data,
tdata->iv.len, tdata->plaintext.len,
- tdata->validCipherOffsetLenInBits.len,
+ (tdata->iv.len << 3),
RTE_CRYPTO_CIPHER_ZUC_EEA3);
if (retval < 0)
return retval;
@@ -4375,7 +4374,7 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
plaintext_pad_len, RTE_CRYPTO_AUTH_OP_GENERATE,
RTE_CRYPTO_AUTH_ZUC_EIA3,
tdata->validAuthLenInBits.len,
- tdata->validAuthOffsetLenInBits.len);
+ (tdata->aad.len << 3));
if (retval < 0)
return retval;
diff --git a/test/test/test_cryptodev_kasumi_hash_test_vectors.h b/test/test/test_cryptodev_kasumi_hash_test_vectors.h
index 69742fa..63db9c4 100644
--- a/test/test/test_cryptodev_kasumi_hash_test_vectors.h
+++ b/test/test/test_cryptodev_kasumi_hash_test_vectors.h
@@ -58,10 +58,6 @@ struct kasumi_hash_test_data {
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} digest;
@@ -92,9 +88,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_1 = {
.validAuthLenInBits = {
.len = 189
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xF6, 0x3B, 0xD7, 0x2C},
.len = 4
@@ -127,9 +120,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_2 = {
.validAuthLenInBits = {
.len = 254
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xA9, 0xDA, 0xF1, 0xFF},
.len = 4
@@ -164,9 +154,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_3 = {
.validAuthLenInBits = {
.len = 319
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x15, 0x37, 0xD3, 0x16},
.len = 4
@@ -202,9 +189,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_4 = {
.validAuthLenInBits = {
.len = 384
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xDD, 0x7D, 0xFA, 0xDD },
.len = 4
@@ -249,9 +233,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_5 = {
.validAuthLenInBits = {
.len = 1000
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0xC3, 0x83, 0x83, 0x9D},
.len = 4
@@ -293,9 +274,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_6 = {
.validAuthLenInBits = {
.len = 768
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x95, 0xAE, 0x41, 0xBA},
.len = 4
@@ -326,9 +304,6 @@ struct kasumi_hash_test_data kasumi_hash_test_case_7 = {
.validAuthLenInBits = {
.len = 120
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x87, 0x5F, 0xE4, 0x89},
.len = 4
diff --git a/test/test/test_cryptodev_kasumi_test_vectors.h b/test/test/test_cryptodev_kasumi_test_vectors.h
index ef1dc6f..6a7efb8 100644
--- a/test/test/test_cryptodev_kasumi_test_vectors.h
+++ b/test/test/test_cryptodev_kasumi_test_vectors.h
@@ -68,20 +68,12 @@ struct kasumi_test_data {
unsigned len;
} validCipherLenInBits;
- struct {
- unsigned len;
- } validCipherOffsetLenInBits;
-
/* Actual length of data to be hashed */
struct {
unsigned len;
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} digest;
@@ -140,10 +132,7 @@ struct kasumi_test_data kasumi_test_case_1 = {
},
.validCipherLenInBits = {
.len = 798
- },
- .validCipherOffsetLenInBits = {
- .len = 64
- },
+ }
};
struct kasumi_test_data kasumi_test_case_2 = {
@@ -188,9 +177,6 @@ struct kasumi_test_data kasumi_test_case_2 = {
},
.validCipherLenInBits = {
.len = 510
- },
- .validCipherOffsetLenInBits = {
- .len = 64
}
};
@@ -234,15 +220,9 @@ struct kasumi_test_data kasumi_test_case_3 = {
.validCipherLenInBits = {
.len = 120
},
- .validCipherOffsetLenInBits = {
- .len = 64
- },
.validAuthLenInBits = {
.len = 120
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x87, 0x5F, 0xE4, 0x89},
.len = 4
@@ -283,9 +263,6 @@ struct kasumi_test_data kasumi_test_case_4 = {
},
.validCipherLenInBits = {
.len = 253
- },
- .validCipherOffsetLenInBits = {
- .len = 64
}
};
@@ -343,10 +320,7 @@ struct kasumi_test_data kasumi_test_case_5 = {
},
.validCipherLenInBits = {
.len = 837
- },
- .validCipherOffsetLenInBits = {
- .len = 64
- },
+ }
};
struct kasumi_test_data kasumi_test_case_6 = {
@@ -389,15 +363,9 @@ struct kasumi_test_data kasumi_test_case_6 = {
.validCipherLenInBits = {
.len = 120
},
- .validCipherOffsetLenInBits = {
- .len = 64
- },
.validAuthLenInBits = {
.len = 120
},
- .validAuthOffsetLenInBits = {
- .len = 64
- },
.digest = {
.data = {0x0F, 0xD2, 0xAA, 0xB5},
.len = 4
diff --git a/test/test/test_cryptodev_snow3g_hash_test_vectors.h b/test/test/test_cryptodev_snow3g_hash_test_vectors.h
index a8a47db..e88e7ab 100644
--- a/test/test/test_cryptodev_snow3g_hash_test_vectors.h
+++ b/test/test/test_cryptodev_snow3g_hash_test_vectors.h
@@ -54,10 +54,6 @@ struct snow3g_hash_test_data {
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} digest;
@@ -92,9 +88,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_1 = {
.validAuthLenInBits = {
.len = 384
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x38, 0xB5, 0x54, 0xC0 },
.len = 4
@@ -140,9 +133,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_2 = {
.validAuthLenInBits = {
.len = 1000
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x06, 0x17, 0x45, 0xAE},
.len = 4
@@ -429,9 +419,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_3 = {
.validAuthLenInBits = {
.len = 16448
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x17, 0x9F, 0x2F, 0xA6},
.len = 4
@@ -464,9 +451,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_4 = {
.validAuthLenInBits = {
.len = 189
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x2B, 0xCE, 0x18, 0x20},
.len = 4
@@ -500,9 +484,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_5 = {
.validAuthLenInBits = {
.len = 254
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xFC, 0x7B, 0x18, 0xBD},
.len = 4
@@ -537,9 +518,6 @@ struct snow3g_hash_test_data snow3g_hash_test_case_6 = {
.validAuthLenInBits = {
.len = 319
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x02, 0xF1, 0xFA, 0xAF},
.len = 4
diff --git a/test/test/test_cryptodev_snow3g_test_vectors.h b/test/test/test_cryptodev_snow3g_test_vectors.h
index 51917c1..0c8ad1c 100644
--- a/test/test/test_cryptodev_snow3g_test_vectors.h
+++ b/test/test/test_cryptodev_snow3g_test_vectors.h
@@ -64,17 +64,9 @@ struct snow3g_test_data {
struct {
unsigned len;
- } validCipherOffsetLenInBits;
-
- struct {
- unsigned len;
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} aad;
@@ -141,9 +133,6 @@ struct snow3g_test_data snow3g_test_case_1 = {
.validCipherLenInBits = {
.len = 800
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0x72, 0xA4, 0xF2, 0x0F, 0x64, 0x00, 0x00, 0x00,
@@ -200,9 +189,6 @@ struct snow3g_test_data snow3g_test_case_2 = {
.validCipherLenInBits = {
.len = 512
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xE2, 0x8B, 0xCF, 0x7B, 0xC0, 0x00, 0x00, 0x00,
@@ -247,9 +233,6 @@ struct snow3g_test_data snow3g_test_case_3 = {
.validCipherLenInBits = {
.len = 120
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
@@ -263,9 +246,6 @@ struct snow3g_test_data snow3g_test_case_3 = {
},
.validAuthLenInBits = {
.len = 120
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
@@ -307,9 +287,6 @@ struct snow3g_test_data snow3g_test_case_4 = {
},
.validCipherLenInBits = {
.len = 256
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -371,9 +348,6 @@ struct snow3g_test_data snow3g_test_case_5 = {
.validCipherLenInBits = {
.len = 840
},
- .validCipherOffsetLenInBits = {
- .len = 128
- }
};
struct snow3g_test_data snow3g_test_case_6 = {
.key = {
@@ -429,15 +403,9 @@ struct snow3g_test_data snow3g_test_case_6 = {
.validCipherLenInBits = {
.len = 384
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.validAuthLenInBits = {
.len = 384
},
- .validAuthOffsetLenInBits = {
- .len = 128
- }
};
#endif /* TEST_CRYPTODEV_SNOW3G_TEST_VECTORS_H_ */
diff --git a/test/test/test_cryptodev_zuc_test_vectors.h b/test/test/test_cryptodev_zuc_test_vectors.h
index a900e91..50fb538 100644
--- a/test/test/test_cryptodev_zuc_test_vectors.h
+++ b/test/test/test_cryptodev_zuc_test_vectors.h
@@ -64,17 +64,9 @@ struct wireless_test_data {
struct {
unsigned len;
- } validCipherOffsetLenInBits;
-
- struct {
- unsigned len;
} validAuthLenInBits;
struct {
- unsigned len;
- } validAuthOffsetLenInBits;
-
- struct {
uint8_t data[64];
unsigned len;
} aad;
@@ -122,9 +114,6 @@ static struct wireless_test_data zuc_test_case_cipher_193b = {
},
.validCipherLenInBits = {
.len = 193
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -184,9 +173,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b = {
},
.validCipherLenInBits = {
.len = 800
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -270,10 +256,7 @@ static struct wireless_test_data zuc_test_case_cipher_1570b = {
},
.validCipherLenInBits = {
.len = 1570
- },
- .validCipherOffsetLenInBits = {
- .len = 128
- },
+ }
};
static struct wireless_test_data zuc_test_case_cipher_2798b = {
@@ -394,9 +377,6 @@ static struct wireless_test_data zuc_test_case_cipher_2798b = {
},
.validCipherLenInBits = {
.len = 2798
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -556,9 +536,6 @@ static struct wireless_test_data zuc_test_case_cipher_4019b = {
},
.validCipherLenInBits = {
.len = 4019
- },
- .validCipherOffsetLenInBits = {
- .len = 128
}
};
@@ -601,9 +578,6 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
.validCipherLenInBits = {
.len = 200
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
@@ -617,9 +591,6 @@ static struct wireless_test_data zuc_test_case_cipher_200b_auth_200b = {
},
.validAuthLenInBits = {
.len = 200
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
@@ -680,9 +651,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
.validCipherLenInBits = {
.len = 800
},
- .validCipherOffsetLenInBits = {
- .len = 128
- },
.aad = {
.data = {
0xFA, 0x55, 0x6B, 0x26, 0x1C, 0x00, 0x00, 0x00,
@@ -696,9 +664,6 @@ static struct wireless_test_data zuc_test_case_cipher_800b_auth_120b = {
},
.validAuthLenInBits = {
.len = 120
- },
- .validAuthOffsetLenInBits = {
- .len = 128
}
};
@@ -724,9 +689,6 @@ struct wireless_test_data zuc_test_case_auth_1b = {
.validAuthLenInBits = {
.len = 1
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xC8, 0xA9, 0x59, 0x5E},
.len = 4
@@ -758,9 +720,6 @@ struct wireless_test_data zuc_test_case_auth_90b = {
.validAuthLenInBits = {
.len = 90
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x67, 0x19, 0xA0, 0x88},
.len = 4
@@ -800,9 +759,6 @@ struct wireless_test_data zuc_test_case_auth_577b = {
.validAuthLenInBits = {
.len = 577
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0xFA, 0xE8, 0xFF, 0x0B},
.len = 4
@@ -865,9 +821,6 @@ struct wireless_test_data zuc_test_case_auth_2079b = {
.validAuthLenInBits = {
.len = 2079
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x00, 0x4A, 0xC4, 0xD6},
.len = 4
@@ -986,9 +939,6 @@ struct wireless_test_data zuc_test_auth_5670b = {
.validAuthLenInBits = {
.len = 5670
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x0C, 0xA1, 0x27, 0x92},
.len = 4
@@ -1011,9 +961,6 @@ static struct wireless_test_data zuc_test_case_auth_128b = {
.validAuthLenInBits = {
.len = 8
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = { 0x39, 0x0a, 0x91, 0xb7 },
.len = 4
@@ -1076,9 +1023,6 @@ static struct wireless_test_data zuc_test_case_auth_2080b = {
.validAuthLenInBits = {
.len = 2080
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x03, 0x95, 0x32, 0xe1},
.len = 4
@@ -1118,9 +1062,6 @@ static struct wireless_test_data zuc_test_case_auth_584b = {
.validAuthLenInBits = {
.len = 584
},
- .validAuthOffsetLenInBits = {
- .len = 128
- },
.digest = {
.data = {0x24, 0xa8, 0x42, 0xb3},
.len = 4
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 5/9] test/crypto: use existing algorithm strings
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
` (3 preceding siblings ...)
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 4/9] test/crypto: remove offsets in wireless algorithm vectors Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 6/9] examples/l2fwd-crypto: fix application help Pablo de Lara
` (4 subsequent siblings)
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara
Instead of using duplicated functions to get the algorithm
strings, use the functions from the cryptodev library.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
test/test/test_cryptodev_perf.c | 119 ++++++++++++----------------------------
1 file changed, 36 insertions(+), 83 deletions(-)
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index 6be7012..7a90667 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -214,57 +214,6 @@ static const char *pmd_name(enum rte_cryptodev_type pmd)
}
}
-static const char *cipher_algo_name(enum rte_crypto_cipher_algorithm cipher_algo)
-{
- switch (cipher_algo) {
- case RTE_CRYPTO_CIPHER_NULL: return "NULL";
- case RTE_CRYPTO_CIPHER_3DES_CBC: return "3DES_CBC";
- case RTE_CRYPTO_CIPHER_3DES_CTR: return "3DES_CTR";
- case RTE_CRYPTO_CIPHER_3DES_ECB: return "3DES_ECB";
- case RTE_CRYPTO_CIPHER_AES_CBC: return "AES_CBC";
- case RTE_CRYPTO_CIPHER_AES_CCM: return "AES_CCM";
- case RTE_CRYPTO_CIPHER_AES_CTR: return "AES_CTR";
- case RTE_CRYPTO_CIPHER_AES_ECB: return "AES_ECB";
- case RTE_CRYPTO_CIPHER_AES_F8: return "AES_F8";
- case RTE_CRYPTO_CIPHER_AES_GCM: return "AES_GCM";
- case RTE_CRYPTO_CIPHER_AES_XTS: return "AES_XTS";
- case RTE_CRYPTO_CIPHER_ARC4: return "ARC4";
- case RTE_CRYPTO_CIPHER_KASUMI_F8: return "KASUMI_F8";
- case RTE_CRYPTO_CIPHER_SNOW3G_UEA2: return "SNOW3G_UEA2";
- case RTE_CRYPTO_CIPHER_ZUC_EEA3: return "ZUC_EEA3";
- default: return "Another cipher algo";
- }
-}
-
-static const char *auth_algo_name(enum rte_crypto_auth_algorithm auth_algo)
-{
- switch (auth_algo) {
- case RTE_CRYPTO_AUTH_NULL: return "NULL"; break;
- case RTE_CRYPTO_AUTH_AES_CBC_MAC: return "AES_CBC_MAC"; break;
- case RTE_CRYPTO_AUTH_AES_CCM: return "AES_CCM"; break;
- case RTE_CRYPTO_AUTH_AES_CMAC: return "AES_CMAC,"; break;
- case RTE_CRYPTO_AUTH_AES_GCM: return "AES_GCM"; break;
- case RTE_CRYPTO_AUTH_AES_GMAC: return "AES_GMAC"; break;
- case RTE_CRYPTO_AUTH_AES_XCBC_MAC: return "AES_XCBC_MAC"; break;
- case RTE_CRYPTO_AUTH_KASUMI_F9: return "KASUMI_F9"; break;
- case RTE_CRYPTO_AUTH_MD5: return "MD5"; break;
- case RTE_CRYPTO_AUTH_MD5_HMAC: return "MD5_HMAC,"; break;
- case RTE_CRYPTO_AUTH_SHA1: return "SHA1"; break;
- case RTE_CRYPTO_AUTH_SHA1_HMAC: return "SHA1_HMAC"; break;
- case RTE_CRYPTO_AUTH_SHA224: return "SHA224"; break;
- case RTE_CRYPTO_AUTH_SHA224_HMAC: return "SHA224_HMAC"; break;
- case RTE_CRYPTO_AUTH_SHA256: return "SHA256"; break;
- case RTE_CRYPTO_AUTH_SHA256_HMAC: return "SHA256_HMAC"; break;
- case RTE_CRYPTO_AUTH_SHA384: return "SHA384,"; break;
- case RTE_CRYPTO_AUTH_SHA384_HMAC: return "SHA384_HMAC,"; break;
- case RTE_CRYPTO_AUTH_SHA512: return "SHA512,"; break;
- case RTE_CRYPTO_AUTH_SHA512_HMAC: return "SHA512_HMAC,"; break;
- case RTE_CRYPTO_AUTH_SNOW3G_UIA2: return "SNOW3G_UIA2"; break;
- case RTE_CRYPTO_AUTH_ZUC_EIA3: return "RTE_CRYPTO_AUTH_ZUC_EIA3"; break;
- default: return "Another auth algo"; break;
- };
-}
-
static struct rte_mbuf *
setup_test_string(struct rte_mempool *mpool,
const uint8_t *data, size_t len, uint8_t blocksize)
@@ -2168,8 +2117,8 @@ test_perf_snow3G_optimise_cyclecount(struct perf_test_params *pparams)
pmd_name(gbl_cryptodev_perftest_devtype),
ts_params->dev_id, 0,
chain_mode_name(pparams->chain),
- cipher_algo_name(pparams->cipher_algo),
- auth_algo_name(pparams->auth_algo),
+ rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
+ rte_crypto_auth_algorithm_strings[pparams->auth_algo],
pparams->buf_size);
printf("\nOps Tx\tOps Rx\tOps/burst ");
printf("Retries EmptyPolls\tIACycles/CyOp\tIACycles/Burst\tIACycles/Byte");
@@ -2363,9 +2312,9 @@ test_perf_openssl_optimise_cyclecount(struct perf_test_params *pparams)
pmd_name(gbl_cryptodev_perftest_devtype),
ts_params->dev_id, 0,
chain_mode_name(pparams->chain),
- cipher_algo_name(pparams->cipher_algo),
+ rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
pparams->cipher_key_length,
- auth_algo_name(pparams->auth_algo),
+ rte_crypto_auth_algorithm_strings[pparams->auth_algo],
pparams->buf_size);
printf("\nOps Tx\tOps Rx\tOps/burst ");
printf("Retries EmptyPolls\tIACycles/CyOp\tIACycles/Burst\t"
@@ -2498,9 +2447,9 @@ test_perf_armv8_optimise_cyclecount(struct perf_test_params *pparams)
pmd_name(gbl_cryptodev_perftest_devtype),
ts_params->dev_id, 0,
chain_mode_name(pparams->chain),
- cipher_algo_name(pparams->cipher_algo),
+ rte_crypto_cipher_algorithm_strings[pparams->cipher_algo],
pparams->cipher_key_length,
- auth_algo_name(pparams->auth_algo),
+ rte_crypto_auth_algorithm_strings[pparams->auth_algo],
pparams->buf_size);
printf("\nOps Tx\tOps Rx\tOps/burst ");
printf("Retries "
@@ -3792,12 +3741,12 @@ test_perf_aes_cbc_encrypt_digest_vary_pkt_size(void)
params_set[i].total_operations = total_operations;
params_set[i].burst_size = burst_size;
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
- " burst_size: %d ops\n",
- chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
- params_set[i].cipher_key_length,
- burst_size);
+ " burst_size: %d ops\n",
+ chain_mode_name(params_set[i].chain),
+ rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
+ params_set[i].cipher_key_length,
+ burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\t"
"Retries\tEmptyPolls\n");
for (j = 0; j < RTE_DIM(buf_lengths); j++) {
@@ -3842,13 +3791,17 @@ test_perf_snow3G_vary_pkt_size(void)
printf("\n\n");
params_set[i].total_operations = total_operations;
for (k = 0; k < RTE_DIM(burst_sizes); k++) {
+ enum rte_crypto_cipher_algorithm cipher_algo =
+ params_set[i].cipher_algo;
+ enum rte_crypto_auth_algorithm auth_algo =
+ params_set[i].auth_algo;
printf("\nOn %s dev%u qp%u, %s, "
"cipher algo:%s, auth algo:%s, burst_size: %d ops",
pmd_name(gbl_cryptodev_perftest_devtype),
testsuite_params.dev_id, 0,
chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
+ rte_crypto_cipher_algorithm_strings[cipher_algo],
+ rte_crypto_auth_algorithm_strings[auth_algo],
burst_sizes[k]);
params_set[i].burst_size = burst_sizes[k];
@@ -3931,12 +3884,12 @@ test_perf_openssl_vary_pkt_size(void)
params_set[i].total_operations = total_operations;
params_set[i].burst_size = burst_size;
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
- " burst_size: %d ops\n",
- chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
- params_set[i].cipher_key_length,
- burst_size);
+ " burst_size: %d ops\n",
+ chain_mode_name(params_set[i].chain),
+ rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
+ params_set[i].cipher_key_length,
+ burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\tRetries\t"
"EmptyPolls\n");
for (j = 0; j < RTE_DIM(buf_lengths); j++) {
@@ -4071,12 +4024,12 @@ test_perf_armv8_vary_pkt_size(void)
params_set[i].total_operations = total_operations;
params_set[i].burst_size = burst_size;
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
- " burst_size: %d ops\n",
- chain_mode_name(params_set[i].chain),
- cipher_algo_name(params_set[i].cipher_algo),
- auth_algo_name(params_set[i].auth_algo),
- params_set[i].cipher_key_length,
- burst_size);
+ " burst_size: %d ops\n",
+ chain_mode_name(params_set[i].chain),
+ rte_crypto_cipher_algorithm_strings[params_set[i].cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set[i].auth_algo],
+ params_set[i].cipher_key_length,
+ burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\tRetries\t"
"EmptyPolls\n");
for (j = 0; j < RTE_DIM(buf_lengths); j++) {
@@ -4607,12 +4560,12 @@ test_perf_continual_performance_test(void)
for (i = 1; i <= total_loops; ++i) {
printf("\n%s. cipher algo: %s auth algo: %s cipher key size=%u."
- " burst_size: %d ops\n",
- chain_mode_name(params_set.chain),
- cipher_algo_name(params_set.cipher_algo),
- auth_algo_name(params_set.auth_algo),
- params_set.cipher_key_length,
- burst_size);
+ " burst_size: %d ops\n",
+ chain_mode_name(params_set.chain),
+ rte_crypto_cipher_algorithm_strings[params_set.cipher_algo],
+ rte_crypto_auth_algorithm_strings[params_set.auth_algo],
+ params_set.cipher_key_length,
+ burst_size);
printf("\nBuffer Size(B)\tOPS(M)\tThroughput(Gbps)\t"
"Retries\tEmptyPolls\n");
test_perf_aes_sha(testsuite_params.dev_id, 0,
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 6/9] examples/l2fwd-crypto: fix application help
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
` (4 preceding siblings ...)
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 5/9] test/crypto: use existing algorithm strings Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 7/9] examples/l2fwd-crypto: fix auth info display Pablo de Lara
` (3 subsequent siblings)
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara, stable
Chain parameter can be CIPHER_HASH, HASH_CIPHER,
CIPHER_ONLY or HASH_ONLY, but only the first two
were shown in the application help.
Fixes: 1a75e9f3fadb ("examples/l2fwd-crypto: add cipher/hash only cases")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
examples/l2fwd-crypto/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 66b4af3..841ec6e 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -842,7 +842,8 @@ l2fwd_crypto_usage(const char *prgname)
" (0 to disable, 10 default, 86400 maximum)\n"
" --cdev_type HW / SW / ANY\n"
- " --chain HASH_CIPHER / CIPHER_HASH\n"
+ " --chain HASH_CIPHER / CIPHER_HASH / CIPHER_ONLY /"
+ " HASH_ONLY\n"
" --cipher_algo ALGO\n"
" --cipher_op ENCRYPT / DECRYPT\n"
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 7/9] examples/l2fwd-crypto: fix auth info display
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
` (5 preceding siblings ...)
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 6/9] examples/l2fwd-crypto: fix application help Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 8/9] app/crypto-perf: fix error message Pablo de Lara
` (2 subsequent siblings)
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara, stable
Fixes: 4790f99d2d31 ("examples/l2fwd-crypto: use cryptodev algorithm parser")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
examples/l2fwd-crypto/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index 841ec6e..779b4fb 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -1263,7 +1263,7 @@ display_auth_info(struct l2fwd_crypto_options *options)
{
printf("\n---- Authentication information ---\n");
printf("Algorithm: %s\n",
- rte_crypto_auth_algorithm_strings[options->auth_xform.cipher.algo]);
+ rte_crypto_auth_algorithm_strings[options->auth_xform.auth.algo]);
rte_hexdump(stdout, "Auth key:",
options->auth_xform.auth.key.data,
options->auth_xform.auth.key.length);
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 8/9] app/crypto-perf: fix error message
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
` (6 preceding siblings ...)
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 7/9] examples/l2fwd-crypto: fix auth info display Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 9/9] doc: fix typo in l2fwd-crypto usage Pablo de Lara
2017-06-23 16:21 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup De Lara Guarch, Pablo
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara, stable
Fixes: f6cefe253cc8 ("app/crypto-perf: add range/list of sizes")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
app/test-crypto-perf/cperf_options_parsing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index d172671..63ba37c 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -312,7 +312,7 @@ parse_buffer_sz(struct cperf_options *opts, const char *arg)
&opts->min_buffer_size,
&opts->max_buffer_size);
if (ret < 0) {
- RTE_LOG(ERR, USER1, "failed to parse burst size/s\n");
+ RTE_LOG(ERR, USER1, "failed to parse buffer size/s\n");
return -1;
}
opts->buffer_size_count = ret;
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* [dpdk-dev] [PATCH v2 9/9] doc: fix typo in l2fwd-crypto usage
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
` (7 preceding siblings ...)
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 8/9] app/crypto-perf: fix error message Pablo de Lara
@ 2017-06-22 12:02 ` Pablo de Lara
2017-06-23 16:21 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup De Lara Guarch, Pablo
9 siblings, 0 replies; 32+ messages in thread
From: Pablo de Lara @ 2017-06-22 12:02 UTC (permalink / raw)
To: declan.doherty, fiona.trahe; +Cc: dev, Pablo de Lara, stable
Fixes: ba7b86b1419b ("doc: add l2fwd-crypto sample app guide")
CC: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/guides/sample_app_ug/l2_forward_crypto.rst b/doc/guides/sample_app_ug/l2_forward_crypto.rst
index d6df36b..45d8a12 100644
--- a/doc/guides/sample_app_ug/l2_forward_crypto.rst
+++ b/doc/guides/sample_app_ug/l2_forward_crypto.rst
@@ -135,7 +135,7 @@ where,
* auth_algo: select the authentication algorithm (default is sha1-hmac)
-* cipher_op: select the authentication operation to perform: GENERATE or VERIFY
+* auth_op: select the authentication operation to perform: GENERATE or VERIFY
(default is GENERATE)
--
2.9.4
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v2 2/9] test/crypto: fix wrong AAD setting
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
@ 2017-06-23 9:56 ` Trahe, Fiona
0 siblings, 0 replies; 32+ messages in thread
From: Trahe, Fiona @ 2017-06-23 9:56 UTC (permalink / raw)
To: De Lara Guarch, Pablo, Doherty, Declan; +Cc: dev, stable
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Thursday, June 22, 2017 1:02 PM
> To: Doherty, Declan <declan.doherty@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; stable@dpdk.org
> Subject: [PATCH v2 2/9] test/crypto: fix wrong AAD setting
>
> AAD should not point at IV for AES algorithms.
> For AES-GCM, AAD will point at additional data in the mbuf.
> For the other algorithms (such as 3DES CBC), AAD is not used.
>
> Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
> CC: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v2 1/9] crypto/aesni_mb: remove assert check
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
@ 2017-06-23 12:50 ` Declan Doherty
0 siblings, 0 replies; 32+ messages in thread
From: Declan Doherty @ 2017-06-23 12:50 UTC (permalink / raw)
To: Pablo de Lara, fiona.trahe; +Cc: dev, stable
On 22/06/2017 1:02 PM, Pablo de Lara wrote:
> Some assert checks in the driver were
> incorrect, but they are not necessary anyway,
> as application will panic in any case.
>
> Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue")
> CC: stable@dpdk.org
>
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
> drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
> index 45b25c9..43e4865 100644
> --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
...
>
Acked-by: Declan Doherty <declan.doherty@intel.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
` (8 preceding siblings ...)
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 9/9] doc: fix typo in l2fwd-crypto usage Pablo de Lara
@ 2017-06-23 16:21 ` De Lara Guarch, Pablo
9 siblings, 0 replies; 32+ messages in thread
From: De Lara Guarch, Pablo @ 2017-06-23 16:21 UTC (permalink / raw)
To: Doherty, Declan, Trahe, Fiona; +Cc: dev
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Thursday, June 22, 2017 1:02 PM
> To: Doherty, Declan <declan.doherty@intel.com>; Trahe, Fiona
> <fiona.trahe@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH v2 0/9] Crypto fixes/cleanup
>
> Prior to new crypto patches for this release, there were some fixes and some
> cleanup to do in some crypto drivers, tests, sample apps and documents.
>
> Changes in v2:
>
> - Fixed too long lines
> - Removed unnecessary AAD setting for 3DES/SHA1 test
>
> Pablo de Lara (9):
> crypto/aesni_mb: remove assert check
> test/crypto: fix wrong AAD setting
> test/crypto: remove unnecessary offset
> test/crypto: remove offsets in wireless algorithm vectors
> test/crypto: use existing algorithm strings
> examples/l2fwd-crypto: fix application help
> examples/l2fwd-crypto: fix auth info display
> app/crypto-perf: fix error message
> doc: fix typo in l2fwd-crypto usage
>
> app/test-crypto-perf/cperf_options_parsing.c | 2 +-
> doc/guides/sample_app_ug/l2_forward_crypto.rst | 2 +-
> drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 -
> examples/l2fwd-crypto/main.c | 5 +-
> test/test/test_cryptodev.c | 59 ++++----
> .../test/test_cryptodev_kasumi_hash_test_vectors.h | 25 ----
> test/test/test_cryptodev_kasumi_test_vectors.h | 36 +----
> test/test/test_cryptodev_perf.c | 148 +++++++--------------
> .../test/test_cryptodev_snow3g_hash_test_vectors.h | 22 ---
> test/test/test_cryptodev_snow3g_test_vectors.h | 32 -----
> test/test/test_cryptodev_zuc_test_vectors.h | 61 +--------
> 11 files changed, 87 insertions(+), 309 deletions(-)
>
> --
> 2.9.4
Applied to dpdk-next-crypto.
Pablo
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2017-06-23 16:21 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21 6:41 [dpdk-dev] [PATCH 0/9] Crypto fixes/cleanup Pablo de Lara
2017-06-21 6:41 ` [dpdk-dev] [PATCH 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
2017-06-21 6:41 ` [dpdk-dev] [PATCH 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
2017-06-21 17:39 ` Trahe, Fiona
2017-06-22 10:40 ` De Lara Guarch, Pablo
2017-06-21 6:41 ` [dpdk-dev] [PATCH 3/9] test/crypto: remove unnecessary offset Pablo de Lara
2017-06-21 16:38 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 4/9] test/crypto: remove offsets in wireless algorithm vectors Pablo de Lara
2017-06-21 17:07 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 5/9] test/crypto: use existing algorithm strings Pablo de Lara
2017-06-21 16:42 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 6/9] examples/l2fwd-crypto: fix application help Pablo de Lara
2017-06-21 16:43 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 7/9] examples/l2fwd-crypto: fix auth info display Pablo de Lara
2017-06-21 16:44 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 8/9] app/crypto-perf: fix error message Pablo de Lara
2017-06-21 16:39 ` Trahe, Fiona
2017-06-21 6:41 ` [dpdk-dev] [PATCH 9/9] doc: fix typo in l2fwd-crypto usage Pablo de Lara
2017-06-21 17:44 ` Trahe, Fiona
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 1/9] crypto/aesni_mb: remove assert check Pablo de Lara
2017-06-23 12:50 ` Declan Doherty
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 2/9] test/crypto: fix wrong AAD setting Pablo de Lara
2017-06-23 9:56 ` Trahe, Fiona
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 3/9] test/crypto: remove unnecessary offset Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 4/9] test/crypto: remove offsets in wireless algorithm vectors Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 5/9] test/crypto: use existing algorithm strings Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 6/9] examples/l2fwd-crypto: fix application help Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 7/9] examples/l2fwd-crypto: fix auth info display Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 8/9] app/crypto-perf: fix error message Pablo de Lara
2017-06-22 12:02 ` [dpdk-dev] [PATCH v2 9/9] doc: fix typo in l2fwd-crypto usage Pablo de Lara
2017-06-23 16:21 ` [dpdk-dev] [PATCH v2 0/9] Crypto fixes/cleanup De Lara Guarch, Pablo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).