diff options
author | Jon Maxwell <jmaxwell37@gmail.com> | 2017-11-22 00:08:17 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-29 01:33:31 -0500 |
commit | c3a536056374ef8412c7ffa13790303ec02d8f46 (patch) | |
tree | c95ac71c85b529c36dad3c6ea82987b5de800009 /crypto | |
parent | 019cd46984d04703a39924178f503a98436ac0d7 (diff) |
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.c | 7 |
1 files 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 @@ | |||
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | 34 | ||
35 | #define CRYPTD_MAX_CPU_QLEN 1000 | 35 | unsigned int cryptd_max_cpu_qlen = 1000; |
36 | module_param(cryptd_max_cpu_qlen, uint, 0); | ||
37 | MODULE_PARM_DESC(cryptd_max_cpu_qlen, "Set cryptd Max queue depth"); | ||
36 | 38 | ||
37 | struct cryptd_cpu_queue { | 39 | struct cryptd_cpu_queue { |
38 | struct crypto_queue queue; | 40 | struct crypto_queue queue; |
@@ -116,6 +118,7 @@ static int cryptd_init_queue(struct cryptd_queue *queue, | |||
116 | crypto_init_queue(&cpu_queue->queue, max_cpu_qlen); | 118 | crypto_init_queue(&cpu_queue->queue, max_cpu_qlen); |
117 | INIT_WORK(&cpu_queue->work, cryptd_queue_worker); | 119 | INIT_WORK(&cpu_queue->work, cryptd_queue_worker); |
118 | } | 120 | } |
121 | pr_info("cryptd: max_cpu_qlen set to %d\n", max_cpu_qlen); | ||
119 | return 0; | 122 | return 0; |
120 | } | 123 | } |
121 | 124 | ||
@@ -1372,7 +1375,7 @@ static int __init cryptd_init(void) | |||
1372 | { | 1375 | { |
1373 | int err; | 1376 | int err; |
1374 | 1377 | ||
1375 | err = cryptd_init_queue(&queue, CRYPTD_MAX_CPU_QLEN); | 1378 | err = cryptd_init_queue(&queue, cryptd_max_cpu_qlen); |
1376 | if (err) | 1379 | if (err) |
1377 | return err; | 1380 | return err; |
1378 | 1381 | ||