diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-06-07 01:39:08 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-18 17:38:16 +0200 |
commit | 0d341761c44739f9c53128fd3e101f83fe60b969 (patch) | |
tree | 1ce7852d663aa916295c4b1b369f3c1ee8bca1f1 /src/main.c | |
parent | 9ffe12e8d9742baf02b08236ed5c4b0de807434a (diff) |
queue: entirely rework parallel system
This removes our dependency on padata and moves to a different mode of
multiprocessing that is more efficient.
This began as Samuel Holland's GSoC project and was gradually
reworked/redesigned/rebased into this present commit, which is a
combination of his initial contribution and my subsequent rewriting and
redesigning.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -3,7 +3,7 @@ #include "version.h" #include "device.h" #include "noise.h" -#include "packets.h" +#include "queueing.h" #include "ratelimiter.h" #include "crypto/chacha20poly1305.h" #include "crypto/blake2s.h" @@ -27,11 +27,9 @@ static int __init mod_init(void) #endif noise_init(); -#ifdef CONFIG_WIREGUARD_PARALLEL - ret = packet_init_data_caches(); + ret = init_crypt_ctx_cache(); if (ret < 0) goto err_packet; -#endif ret = device_init(); if (ret < 0) @@ -43,19 +41,15 @@ static int __init mod_init(void) return 0; err_device: -#ifdef CONFIG_WIREGUARD_PARALLEL - packet_deinit_data_caches(); + deinit_crypt_ctx_cache(); err_packet: -#endif return ret; } static void __exit mod_exit(void) { device_uninit(); -#ifdef CONFIG_WIREGUARD_PARALLEL - packet_deinit_data_caches(); -#endif + deinit_crypt_ctx_cache(); pr_debug("WireGuard unloaded\n"); } |