diff options
author | Samuel Holland <samuel@sholland.org> | 2017-06-07 01:39:08 -0500 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-15 01:16:50 +0200 |
commit | 7bfd756cb395307ee779e9382d4745691cd12a0c (patch) | |
tree | 45f48c86d6dde7fc92c9fdae03838e3d445becda /src/device.h | |
parent | timers: style (diff) | |
download | wireguard-monolithic-historical-7bfd756cb395307ee779e9382d4745691cd12a0c.tar.xz wireguard-monolithic-historical-7bfd756cb395307ee779e9382d4745691cd12a0c.zip |
queues: 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); |