From: Pablo de Lara Date: Wed, 9 May 2018 09:44:21 +0000 (+0100) Subject: app/crypto-perf: check minimum lcore number X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0bb32d94973987c82351edd6e6e1a4e53dfd83a6;p=dpdk.git app/crypto-perf: check minimum lcore number 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 Acked-by: Fiona Trahe --- diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c index d905e13a11..26e78ff43a 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.