diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-23 14:14:21 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-05-30 18:07:28 +0200 |
commit | 9fe1150c42988ff788e8a51425736b20d24833b9 (patch) | |
tree | 5b0919dc4f0660e5844b718cb06d3dd94e4fcbc9 /src/device.h | |
parent | compat: ship padata if kernel doesn't have it (diff) | |
download | wireguard-monolithic-historical-9fe1150c42988ff788e8a51425736b20d24833b9.tar.xz wireguard-monolithic-historical-9fe1150c42988ff788e8a51425736b20d24833b9.zip |
handshake: process in parallel
Diffstat (limited to 'src/device.h')
-rw-r--r-- | src/device.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/device.h b/src/device.h index cdfb5f7..f443191 100644 --- a/src/device.h +++ b/src/device.h @@ -16,15 +16,22 @@ #include <linux/padata.h> #include <linux/notifier.h> +struct wireguard_device; +struct handshake_worker { + struct wireguard_device *wg; + struct work_struct work; +}; + struct wireguard_device { struct sock __rcu *sock4, *sock6; u16 incoming_port; u32 fwmark; struct net *creating_net; - struct workqueue_struct *handshake_wq; struct noise_static_identity static_identity; + struct workqueue_struct *incoming_handshake_wq, *peer_wq; struct sk_buff_head incoming_handshakes; - struct work_struct incoming_handshakes_work; + atomic_t incoming_handshake_seqnr; + struct handshake_worker __percpu *incoming_handshakes_worker; struct cookie_checker cookie_checker; struct pubkey_hashtable peer_hashtable; struct index_hashtable index_hashtable; |