From 0d341761c44739f9c53128fd3e101f83fe60b969 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 7 Jun 2017 01:39:08 -0500 Subject: 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 --- src/main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 0697741..e2686a2 100644 --- a/src/main.c +++ b/src/main.c @@ -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"); } -- cgit v1.2.3