summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-07-11 04:27:35 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-07-20 03:37:39 +0200
commita3a3a553249f7d870ae625f3e66f4b93f7fa4c90 (patch)
tree2dd1401b1df039f632efebb69ac6ee8cc2774ca9 /src
parent52b3a7bc7cd8a74e273cb108042ea93f76d58468 (diff)
data: use KMEM_CACHE macro
Suggested-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c
index cab99ef..0ee5595 100644
--- a/src/data.c
+++ b/src/data.c
@@ -35,10 +35,10 @@ static struct kmem_cache *decryption_ctx_cache __read_mostly;
int __init packet_init_data_caches(void)
{
- encryption_ctx_cache = kmem_cache_create("wireguard_encryption_ctx", sizeof(struct encryption_ctx), 0, 0, NULL);
+ encryption_ctx_cache = KMEM_CACHE(encryption_ctx, 0);
if (!encryption_ctx_cache)
return -ENOMEM;
- decryption_ctx_cache = kmem_cache_create("wireguard_decryption_ctx", sizeof(struct decryption_ctx), 0, 0, NULL);
+ decryption_ctx_cache = KMEM_CACHE(decryption_ctx, 0);
if (!decryption_ctx_cache) {
kmem_cache_destroy(encryption_ctx_cache);
return -ENOMEM;