DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] app/test-crypto-perf: fix number of scheduler sessions
@ 2022-10-25 14:14 Ciara Power
  2022-10-25 14:14 ` [PATCH 2/2] crypto/scheduler: fix op session in pkt size distr mode Ciara Power
  2022-10-25 15:10 ` [EXT] [PATCH 1/2] app/test-crypto-perf: fix number of scheduler sessions Akhil Goyal
  0 siblings, 2 replies; 4+ messages in thread
From: Ciara Power @ 2022-10-25 14:14 UTC (permalink / raw)
  To: Ciara Power; +Cc: dev, kai.ji, gakhil

The scheduler PMD needs 1 session header,
along with a session per worker.

After the session rework, this change was made to other apps,
for example l2fwd-crypto, but was missed in test-crypto-perf.

Fixes: bdce2564dbf7 ("cryptodev: rework session framework")
Cc: gakhil@marvell.com

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test-crypto-perf/main.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 420acc3c6d..0fe47c6caa 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -263,18 +263,14 @@ cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
 		opts->segment_sz += (opts->headroom_sz + opts->tailroom_sz);
 
 		uint32_t dev_max_nb_sess = cdev_info.sym.max_nb_sessions;
-		/*
-		 * Two sessions objects are required for each session
-		 * (one for the header, one for the private data)
-		 */
 		if (!strcmp((const char *)opts->device_type,
 					"crypto_scheduler")) {
 #ifdef RTE_CRYPTO_SCHEDULER
 			uint32_t nb_slaves =
 				rte_cryptodev_scheduler_workers_get(cdev_id,
 								NULL);
-
-			sessions_needed = enabled_cdev_count *
+			/* scheduler session header + 1 session per worker qp */
+			sessions_needed = 1 + enabled_cdev_count *
 				opts->nb_qps * nb_slaves;
 #endif
 		} else
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-27 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 14:14 [PATCH 1/2] app/test-crypto-perf: fix number of scheduler sessions Ciara Power
2022-10-25 14:14 ` [PATCH 2/2] crypto/scheduler: fix op session in pkt size distr mode Ciara Power
2022-10-25 15:10 ` [EXT] [PATCH 1/2] app/test-crypto-perf: fix number of scheduler sessions Akhil Goyal
2022-10-27  9:59   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).