app/crypto-perf: add check for out-of-place case
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 27 Sep 2019 08:03:15 +0000 (13:33 +0530)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 9 Oct 2019 09:50:12 +0000 (11:50 +0200)
Segmented frames not supported for out-of-place case.
This patch returns err if such config is requested.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
app/test-crypto-perf/cperf_options_parsing.c

index 7a5aa06..eba4cf7 100644 (file)
@@ -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