[1/2] test/crypto-perf: fix number of sessions for cores

Message ID 20221114165748.307086-1-ciara.power@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series [1/2] test/crypto-perf: fix number of sessions for cores |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Power, Ciara Nov. 14, 2022, 4:57 p.m. UTC
  Currently the performance application creates a device session per lcore.
This was not reflected in how many session objects were available
in the mempool, when using a scheduler device.

The number of lcores is now taken into consideration when calculating
how many sessions are needed for the scheduler.

Fixes: 09fcf99dcad2 ("test/crypto-perf: fix number of scheduler sessions")

Reported-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Akhil Goyal Nov. 15, 2022, 9:30 a.m. UTC | #1
> Currently the performance application creates a device session per lcore.
> This was not reflected in how many session objects were available
> in the mempool, when using a scheduler device.
> 
> The number of lcores is now taken into consideration when calculating
> how many sessions are needed for the scheduler.
> 
> Fixes: 09fcf99dcad2 ("test/crypto-perf: fix number of scheduler sessions")
> 
> Reported-by: Kevin O'Sullivan <kevin.osullivan@intel.com>
> Signed-off-by: Ciara Power <ciara.power@intel.com>
Series applied to dpdk-next-crypto

Thanks.
  

Patch

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 0fe47c6caa..22f6b2b3ba 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -269,8 +269,8 @@  cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
 			uint32_t nb_slaves =
 				rte_cryptodev_scheduler_workers_get(cdev_id,
 								NULL);
-			/* scheduler session header + 1 session per worker qp */
-			sessions_needed = 1 + enabled_cdev_count *
+			/* scheduler session header per lcore + 1 session per worker qp */
+			sessions_needed = nb_lcores + enabled_cdev_count *
 				opts->nb_qps * nb_slaves;
 #endif
 		} else