linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] cryptd: Add cryptd_max_cpu_qlen module parameter
@ 2017-11-22  5:08 Jon Maxwell
  2017-11-29  6:39 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Jon Maxwell @ 2017-11-22  5:08 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-crypto, linux-kernel, jmaxwell, Jon Maxwell

Make the cryptd queue length configurable. We recently had customer where this 
needed to be tuned to accommodate the aesni_intel module and prevent packet 
drop.

Signed-off-by: Jon Maxwell <jmaxwell37@gmail.com>
---
 crypto/cryptd.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index bd43cf5be14c..b1eb131c0f10 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -32,7 +32,9 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 
-#define CRYPTD_MAX_CPU_QLEN 1000
+unsigned int cryptd_max_cpu_qlen = 1000;
+module_param(cryptd_max_cpu_qlen, uint, 0);
+MODULE_PARM_DESC(cryptd_max_cpu_qlen, "Set cryptd Max queue depth");
 
 struct cryptd_cpu_queue {
 	struct crypto_queue queue;
@@ -116,6 +118,7 @@ static int cryptd_init_queue(struct cryptd_queue *queue,
 		crypto_init_queue(&cpu_queue->queue, max_cpu_qlen);
 		INIT_WORK(&cpu_queue->work, cryptd_queue_worker);
 	}
+	pr_info("cryptd: max_cpu_qlen set to %d\n", max_cpu_qlen);
 	return 0;
 }
 
@@ -1372,7 +1375,7 @@ static int __init cryptd_init(void)
 {
 	int err;
 
-	err = cryptd_init_queue(&queue, CRYPTD_MAX_CPU_QLEN);
+	err = cryptd_init_queue(&queue, cryptd_max_cpu_qlen);
 	if (err)
 		return err;
 
-- 
2.13.6

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

* Re: [PATCH net-next] cryptd: Add cryptd_max_cpu_qlen module parameter
  2017-11-22  5:08 [PATCH net-next] cryptd: Add cryptd_max_cpu_qlen module parameter Jon Maxwell
@ 2017-11-29  6:39 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2017-11-29  6:39 UTC (permalink / raw)
  To: Jon Maxwell; +Cc: davem, linux-crypto, linux-kernel, jmaxwell

On Wed, Nov 22, 2017 at 04:08:17PM +1100, Jon Maxwell wrote:
> Make the cryptd queue length configurable. We recently had customer where this 
> needed to be tuned to accommodate the aesni_intel module and prevent packet 
> drop.
> 
> Signed-off-by: Jon Maxwell <jmaxwell37@gmail.com>

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2017-11-29  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22  5:08 [PATCH net-next] cryptd: Add cryptd_max_cpu_qlen module parameter Jon Maxwell
2017-11-29  6:39 ` Herbert Xu

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