cryptd: Add cryptd_max_cpu_qlen module parameter
PATCH 1/1 cryptd: Add cryptd_max_cpu_qlen module parameter
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 <[email protected]>
--- crypto/cryptd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
crypto/cryptd.c +5 -2
@@ -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;
Signature · 1 line
2.13.6
Herbert Xu
maintainerQuoted 5 lines · Jon Maxwell
Make the cryptd queue length configurable. We recently had customer where this needed to be tuned to accommodate the
aesni_intelmodule and prevent packet drop.Signed-off-by Jon Maxwell <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt