aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit41d6ddf5ba542a129d0ebc2bd19e1ae4b282b8e0 (patch)
tree4ebe9a3a8a7563c235daaa9efaa72a3ff5e5c2fb /src
parentratelimiter: use KMEM_CACHE macro (diff)
downloadwireguard-monolithic-historical-41d6ddf5ba542a129d0ebc2bd19e1ae4b282b8e0.tar.xz
wireguard-monolithic-historical-41d6ddf5ba542a129d0ebc2bd19e1ae4b282b8e0.zip
data: use KMEM_CACHE macro
Suggested-by: Samuel Holland <samuel@sholland.org>
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;