From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: declan.doherty@intel.com
Cc: dev@dpdk.org, Pablo de Lara <pablo.de.lara.guarch@intel.com>,
stable@dpdk.org
Subject: [dpdk-dev] [PATCH] app/crypto-perf: check minimum lcore number
Date: Wed, 9 May 2018 10:44:21 +0100 [thread overview]
Message-ID: <20180509094421.15924-1-pablo.de.lara.guarch@intel.com> (raw)
The crypto performance application requires at least
two cores: one master core that launches the other slaves
and one core acting as slave running the crypto device.
Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test-crypto-perf/main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index d905e13a1..26e78ff43 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -80,6 +80,12 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs,
nb_lcores = rte_lcore_count() - 1;
+ if (nb_lcores < 1) {
+ RTE_LOG(ERR, USER1,
+ "Number of enabled cores need to be higher than 1\n");
+ return -EINVAL;
+ }
+
/*
* Use less number of devices,
* if there are more available than cores.
--
2.17.0
next reply other threads:[~2018-05-09 9:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 9:44 Pablo de Lara [this message]
2018-05-09 11:27 ` Trahe, Fiona
2018-05-09 11:32 ` De Lara Guarch, Pablo
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=20180509094421.15924-1-pablo.de.lara.guarch@intel.com \
--to=pablo.de.lara.guarch@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=stable@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).