diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-06-21 19:55:04 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-06-24 02:06:26 +0200 |
commit | 152f93e06d82a9c9d35ee74f216728bc10419415 (patch) | |
tree | 3316a8f3ff7b99bb869faa391e392a9b0618d485 /src/device.h | |
parent | device: netdevice destruction logic change for 4.12 (diff) | |
download | wireguard-monolithic-historical-152f93e06d82a9c9d35ee74f216728bc10419415.tar.xz wireguard-monolithic-historical-152f93e06d82a9c9d35ee74f216728bc10419415.zip |
device: only use one sleep notifier
This greatly improves performance when adding and removing interfaces,
since the power registration function does a linear search each time.
Diffstat (limited to 'src/device.h')
-rw-r--r-- | src/device.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/device.h b/src/device.h index f443191..5ba2c5d 100644 --- a/src/device.h +++ b/src/device.h @@ -14,7 +14,6 @@ #include <linux/mutex.h> #include <linux/net.h> #include <linux/padata.h> -#include <linux/notifier.h> struct wireguard_device; struct handshake_worker { @@ -23,6 +22,7 @@ struct handshake_worker { }; struct wireguard_device { + struct list_head device_list; struct sock __rcu *sock4, *sock6; u16 incoming_port; u32 fwmark; @@ -39,9 +39,6 @@ struct wireguard_device { struct list_head peer_list; struct mutex device_update_lock; struct mutex socket_update_lock; -#ifdef CONFIG_PM_SLEEP - struct notifier_block clear_peers_on_suspend; -#endif #ifdef CONFIG_WIREGUARD_PARALLEL struct workqueue_struct *crypt_wq; struct padata_instance *encrypt_pd, *decrypt_pd; |