From 616853f9db827949848650e1bbd132d98c27a586 Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Fri, 27 Sep 2019 13:33:15 +0530 Subject: [PATCH] app/crypto-perf: add check for out-of-place case Segmented frames not supported for out-of-place case. This patch returns err if such config is requested. Signed-off-by: Hemant Agrawal Acked-by: Akhil Goyal --- app/test-crypto-perf/cperf_options_parsing.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c index 7a5aa06a67..eba4cf7a67 100644 --- a/app/test-crypto-perf/cperf_options_parsing.c +++ b/app/test-crypto-perf/cperf_options_parsing.c @@ -964,6 +964,13 @@ cperf_options_check(struct cperf_options *options) if (options->op_type == CPERF_CIPHER_ONLY) options->digest_sz = 0; + if (options->out_of_place && + options->segment_sz <= options->max_buffer_size) { + RTE_LOG(ERR, USER1, "Out of place mode can only work " + "with non segmented buffers\n"); + return -EINVAL; + } + /* * If segment size is not set, assume only one segment, * big enough to contain the largest buffer and the digest -- 2.20.1