From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo de Lara Subject: [PATCH] app/crypto-perf: check minimum lcore number Date: Wed, 9 May 2018 10:44:21 +0100 Message-ID: <20180509094421.15924-1-pablo.de.lara.guarch@intel.com> Cc: dev@dpdk.org, Pablo de Lara , stable@dpdk.org To: declan.doherty@intel.com Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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