summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorJon Maxwell <jmaxwell37@gmail.com>2017-11-22 16:08:17 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-11-29 17:33:31 +1100
commit8733a5f8aa2031841b3b82246db980a952c3a7c8 (patch)
tree9dc2ef4fdf3d97f0b8c8a95be6a9c43a196cd5b4 /crypto
parentfb5a74bc3110de22a09b6a2c9220006d71bcd60a (diff)
downloadlinux-crypto-8733a5f8aa2031841b3b82246db980a952c3a7c8.tar.gz
linux-crypto-8733a5f8aa2031841b3b82246db980a952c3a7c8.zip
crypto: 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 <jmaxwell37@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/cryptd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index bd43cf5b..b1eb131c 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;