[dpdk-dev] app/crypto-perf: fix wait for lcores

Message ID 1497429873-117730-1-git-send-email-kirill.rybalchenko@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Rybalchenko, Kirill June 14, 2017, 8:44 a.m. UTC
  After test is finished the main thread waits only for lcores
where runners were started, because it is responsibility of
multicore scheduler to stop and wait for workers lcores.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
CC: stable@dpdk.org

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
---
 app/test-crypto-perf/main.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
  

Comments

De Lara Guarch, Pablo July 6, 2017, 3:11 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kirill Rybalchenko
> Sent: Wednesday, June 14, 2017 9:45 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix wait for lcores
> 
> After test is finished the main thread waits only for lcores where runners
> were started, because it is responsibility of multicore scheduler to stop and
> wait for workers lcores.
> 
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> application")
> CC: stable@dpdk.org
> 
> Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> ---

Since this is needed due to the new multi-core scheduler,
I think it is not needed to be backported, as this is a new feature in this release.
Will modify it.

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  
De Lara Guarch, Pablo July 6, 2017, 3:14 p.m. UTC | #2
> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Thursday, July 6, 2017 4:12 PM
> To: 'Kirill Rybalchenko' <kirill.rybalchenko@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>
> Cc: dev@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>
> Subject: RE: [dpdk-dev] [PATCH] app/crypto-perf: fix wait for lcores
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kirill
> > Rybalchenko
> > Sent: Wednesday, June 14, 2017 9:45 AM
> > To: Doherty, Declan <declan.doherty@intel.com>
> > Cc: dev@dpdk.org; Rybalchenko, Kirill <kirill.rybalchenko@intel.com>;
> > stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix wait for lcores
> >
> > After test is finished the main thread waits only for lcores where
> > runners were started, because it is responsibility of multicore
> > scheduler to stop and wait for workers lcores.
> >
> > Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> > application")
> > CC: stable@dpdk.org
> >
> > Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
> > ---
> 
> Since this is needed due to the new multi-core scheduler, I think it is not
> needed to be backported, as this is a new feature in this release.
> Will modify it.
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo
  

Patch

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 9ec2a4b..d4bbbef 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -395,7 +395,14 @@  main(int argc, char **argv)
 				ctx[cdev_id], lcore_id);
 			i++;
 		}
-		rte_eal_mp_wait_lcore();
+		i = 0;
+		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+
+			if (i == nb_cryptodevs)
+				break;
+			rte_eal_wait_lcore(lcore_id);
+			i++;
+		}
 
 		/* Get next size from range or list */
 		if (opts.inc_buffer_size != 0)