[dpdk-dev] app/crypto-perf: fix wait for lcores
Checks
Commit Message
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
> -----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>
> -----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
@@ -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)