DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/crypto-perf: display error message
@ 2017-07-28  2:15 Pablo de Lara
  2017-07-28 16:55 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo de Lara @ 2017-07-28  2:15 UTC (permalink / raw)
  To: declan.doherty; +Cc: dev, Pablo de Lara

If the crypto operation pool size is too small,
the pool might run out of operations, if all the crypto operations
are still being used and have not been freed.
To inform the user about this, the application should display
an error message, asking the user to increase the pool size
through the app parameters.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-crypto-perf/cperf_test_latency.c    | 8 +++++++-
 app/test-crypto-perf/cperf_test_throughput.c | 8 +++++++-
 app/test-crypto-perf/cperf_test_verify.c     | 8 +++++++-
 3 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 6b3a336..dfd60ed 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -391,8 +391,14 @@ cperf_latency_test_runner(void *arg)
 			if (burst_size != rte_crypto_op_bulk_alloc(
 					ctx->crypto_op_pool,
 					RTE_CRYPTO_OP_TYPE_SYMMETRIC,
-					ops, burst_size))
+					ops, burst_size)) {
+				RTE_LOG(ERR, USER1,
+					"Failed to allocate more crypto operations "
+					"from the the crypto operation pool.\n"
+					"Consider increasing the pool size "
+					"with --pool-sz\n");
 				return -1;
+			}
 
 			/* Setup crypto op, attach mbuf etc */
 			(ctx->populate_ops)(ops, &ctx->mbufs_in[m_idx],
diff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c
index 5ba75d0..85ed21a 100644
--- a/app/test-crypto-perf/cperf_test_throughput.c
+++ b/app/test-crypto-perf/cperf_test_throughput.c
@@ -353,8 +353,14 @@ cperf_throughput_test_runner(void *test_ctx)
 			if (ops_needed != rte_crypto_op_bulk_alloc(
 					ctx->crypto_op_pool,
 					RTE_CRYPTO_OP_TYPE_SYMMETRIC,
-					ops, ops_needed))
+					ops, ops_needed)) {
+				RTE_LOG(ERR, USER1,
+					"Failed to allocate more crypto operations "
+					"from the the crypto operation pool.\n"
+					"Consider increasing the pool size "
+					"with --pool-sz\n");
 				return -1;
+			}
 
 			/* Setup crypto op, attach mbuf etc */
 			(ctx->populate_ops)(ops, &ctx->mbufs_in[m_idx],
diff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c
index 7416ffb..1827e6f 100644
--- a/app/test-crypto-perf/cperf_test_verify.c
+++ b/app/test-crypto-perf/cperf_test_verify.c
@@ -444,8 +444,14 @@ cperf_verify_test_runner(void *test_ctx)
 		if (ops_needed != rte_crypto_op_bulk_alloc(
 				ctx->crypto_op_pool,
 				RTE_CRYPTO_OP_TYPE_SYMMETRIC,
-				ops, ops_needed))
+				ops, ops_needed)) {
+			RTE_LOG(ERR, USER1,
+				"Failed to allocate more crypto operations "
+				"from the the crypto operation pool.\n"
+				"Consider increasing the pool size "
+				"with --pool-sz\n");
 			return -1;
+		}
 
 		/* Setup crypto op, attach mbuf etc */
 		(ctx->populate_ops)(ops, &ctx->mbufs_in[m_idx],
-- 
2.9.4

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

* Re: [dpdk-dev] [PATCH] app/crypto-perf: display error message
  2017-07-28  2:15 [dpdk-dev] [PATCH] app/crypto-perf: display error message Pablo de Lara
@ 2017-07-28 16:55 ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 2+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-28 16:55 UTC (permalink / raw)
  To: Doherty, Declan; +Cc: dev



> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Friday, July 28, 2017 3:15 AM
> To: Doherty, Declan <declan.doherty@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [PATCH] app/crypto-perf: display error message
> 
> If the crypto operation pool size is too small, the pool might run out of
> operations, if all the crypto operations are still being used and have not
> been freed.
> To inform the user about this, the application should display an error
> message, asking the user to increase the pool size through the app
> parameters.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied to dpdk-next-crypto.

Pablo

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

end of thread, other threads:[~2017-07-28 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28  2:15 [dpdk-dev] [PATCH] app/crypto-perf: display error message Pablo de Lara
2017-07-28 16:55 ` De Lara Guarch, Pablo

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).