DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: akhil.goyal@nxp.com, dev@dpdk.org
Cc: Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [dpdk-dev] [PATCH 3/3] app/crypto-perf: add check for out-of-place case
Date: Fri, 27 Sep 2019 13:33:15 +0530	[thread overview]
Message-ID: <20190927080315.21981-1-hemant.agrawal@nxp.com> (raw)

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>
---
 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
-- 
2.17.1


             reply	other threads:[~2019-09-27  8:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27  8:03 Hemant Agrawal [this message]
2019-10-04  7:03 ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190927080315.21981-1-hemant.agrawal@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).