DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ciara Power <ciara.power@intel.com>
To: Ciara Power <ciara.power@intel.com>
Cc: dev@dpdk.org, kai.ji@intel.com, gakhil@marvell.com
Subject: [PATCH 1/2] app/test-crypto-perf: fix number of scheduler sessions
Date: Tue, 25 Oct 2022 14:14:28 +0000	[thread overview]
Message-ID: <20221025141429.3463350-1-ciara.power@intel.com> (raw)

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


             reply	other threads:[~2022-10-25 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 14:14 Ciara Power [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221025141429.3463350-1-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).