[dpdk-stable] patch 'app/crypto-perf: fix packet length check' has been queued to stable release 17.08.1
Yuanhan Liu
yliu at fridaylinux.org
Tue Nov 21 14:17:36 CET 2017
Hi,
FYI, your patch has been queued to stable release 17.08.1
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/24/17. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 4aabfc44fee23980745f805cfdc736a2ee0461fc Mon Sep 17 00:00:00 2001
From: Pablo de Lara <pablo.de.lara.guarch at intel.com>
Date: Thu, 5 Oct 2017 06:28:00 +0100
Subject: [PATCH] app/crypto-perf: fix packet length check
[ upstream commit 0c2173c166da8abba93ed4a2f602ad523ee7a59a ]
When using DES-CBC, packet size has to be multiple
of 8 bytes, but if a list of packets is provided.
the check was not correct.
Fixes: fc4600fb2520 ("app/crypto-perf: add extra option checks")
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
---
app/test-crypto-perf/cperf_options_parsing.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index 663f53f..3f933bc 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -832,14 +832,26 @@ check_cipher_buffer_length(struct cperf_options *options)
if (options->cipher_algo == RTE_CRYPTO_CIPHER_DES_CBC ||
options->cipher_algo == RTE_CRYPTO_CIPHER_3DES_CBC ||
options->cipher_algo == RTE_CRYPTO_CIPHER_3DES_ECB) {
- for (buffer_size = options->min_buffer_size;
- buffer_size < options->max_buffer_size;
- buffer_size += options->inc_buffer_size) {
+ if (options->inc_buffer_size != 0)
+ buffer_size = options->min_buffer_size;
+ else
+ buffer_size = options->buffer_size_list[0];
+
+ while (buffer_size <= options->max_buffer_size) {
if ((buffer_size % DES_BLOCK_SIZE) != 0) {
RTE_LOG(ERR, USER1, "Some of the buffer sizes are "
"not suitable for the algorithm selected\n");
return -EINVAL;
}
+
+ if (options->inc_buffer_size != 0)
+ buffer_size += options->inc_buffer_size;
+ else {
+ if (++buffer_size_idx == options->buffer_size_count)
+ break;
+ buffer_size = options->buffer_size_list[buffer_size_idx];
+ }
+
}
}
--
2.7.4
More information about the stable
mailing list