From 6a10ce00780c3060e55b5f8029f28b0619a69b9c Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 23 May 2017 14:14:21 +0200 Subject: handshake: process in parallel Signed-off-by: Jason A. Donenfeld --- src/device.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/device.h') 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 #include +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; -- cgit v1.2.3