summaryrefslogtreecommitdiffhomepage
path: root/src/device.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-05-23 14:14:21 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-05-30 18:07:28 +0200
commit6a10ce00780c3060e55b5f8029f28b0619a69b9c (patch)
treeb8a323ff3cad1fcf839518527b6c0907b34249b3 /src/device.h
parent46b544083fec9b0a76dd15a5e0c685e935ef2ce5 (diff)
handshake: process in parallel
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/device.h')
-rw-r--r--src/device.h11
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;