diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-12 18:51:12 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-09-15 01:50:11 +0200 |
commit | c2cb0a2013a338200b6aeda719bd01f1d89209e2 (patch) | |
tree | da958ec8bd9083a455a467aeb8f287c80ff349db /src/device.h | |
parent | compat: add READ_ONCE/WRITE_ONCE for old kernels (diff) | |
download | wireguard-monolithic-historical-c2cb0a2013a338200b6aeda719bd01f1d89209e2.tar.xz wireguard-monolithic-historical-c2cb0a2013a338200b6aeda719bd01f1d89209e2.zip |
data: reorganize and edit new queuing code
This involves many changes of Samuel's new system, in addition
to some TODOs for things that are not yet ideal.
Diffstat (limited to 'src/device.h')
-rw-r--r-- | src/device.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/device.h b/src/device.h index 1a75261..047fdf5 100644 --- a/src/device.h +++ b/src/device.h @@ -15,6 +15,7 @@ #include <linux/net.h> struct wireguard_device; + struct handshake_worker { struct wireguard_device *wg; struct work_struct work; @@ -34,20 +35,17 @@ struct wireguard_device { u32 fwmark; struct net *creating_net; struct noise_static_identity static_identity; - struct workqueue_struct *incoming_handshake_wq, *peer_wq; + struct workqueue_struct *handshake_receive_wq, *handshake_send_wq, *packet_crypt_wq; struct sk_buff_head incoming_handshakes; - atomic_t incoming_handshake_seqnr; + struct crypt_queue __percpu *send_queue, *receive_queue; + int incoming_handshake_cpu, encrypt_cpu, decrypt_cpu; struct handshake_worker __percpu *incoming_handshakes_worker; struct cookie_checker cookie_checker; struct pubkey_hashtable peer_hashtable; struct index_hashtable index_hashtable; struct routing_table peer_routing_table; struct list_head peer_list; - struct mutex device_update_lock; - struct mutex socket_update_lock; - struct workqueue_struct *crypt_wq; - int encrypt_cpu, decrypt_cpu; - struct crypt_queue __percpu *encrypt_queue, *decrypt_queue; + struct mutex device_update_lock, socket_update_lock; }; int device_init(void); |