From patchwork Fri Sep 27 08:03:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 59971 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C54692C23; Fri, 27 Sep 2019 10:05:35 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 4279F11A2 for ; Fri, 27 Sep 2019 10:05:34 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1B11E200648; Fri, 27 Sep 2019 10:05:34 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 49709200658; Fri, 27 Sep 2019 10:05:32 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 99DF1402D5; Fri, 27 Sep 2019 16:05:29 +0800 (SGT) From: Hemant Agrawal To: akhil.goyal@nxp.com, dev@dpdk.org Cc: Hemant Agrawal Date: Fri, 27 Sep 2019 13:33:15 +0530 Message-Id: <20190927080315.21981-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 3/3] app/crypto-perf: add check for out-of-place case X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 7a5aa06a6..eba4cf7a6 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