diff options
author | 2017-06-07 01:39:08 -0500 | |
---|---|---|
committer | 2017-09-15 22:00:49 +0200 | |
commit | e1fead9769303cf160addfb9f16f8f9fda1ff617 (patch) | |
tree | 9c6243ccb33866c9d068dca827ac403b67bbc361 /src/device.h | |
parent | qemu: enable debug info for debug qemu (diff) | |
download | wireguard-monolithic-historical-e1fead9769303cf160addfb9f16f8f9fda1ff617.tar.xz wireguard-monolithic-historical-e1fead9769303cf160addfb9f16f8f9fda1ff617.zip |
data: entirely rework parallel system
This removes our dependency on padata.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'src/device.h')
-rw-r--r-- | src/device.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/device.h b/src/device.h index 77f1b2e..1a75261 100644 --- a/src/device.h +++ b/src/device.h @@ -13,7 +13,6 @@ #include <linux/workqueue.h> #include <linux/mutex.h> #include <linux/net.h> -#include <linux/padata.h> struct wireguard_device; struct handshake_worker { @@ -21,6 +20,12 @@ struct handshake_worker { struct work_struct work; }; +struct crypt_queue { + struct list_head list; + struct work_struct work; + atomic_t qlen; +}; + struct wireguard_device { struct net_device *dev; struct list_head device_list; @@ -40,10 +45,9 @@ struct wireguard_device { struct list_head peer_list; struct mutex device_update_lock; struct mutex socket_update_lock; -#ifdef CONFIG_WIREGUARD_PARALLEL struct workqueue_struct *crypt_wq; - struct padata_instance *encrypt_pd, *decrypt_pd; -#endif + int encrypt_cpu, decrypt_cpu; + struct crypt_queue __percpu *encrypt_queue, *decrypt_queue; }; int device_init(void); |