aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-04 05:05:51 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-05 15:27:29 +0200
commitaa4d07187b66bf83bfddfa6d964f7c141518ba7b (patch)
treedd5d948dce7251d25079bea81ae103d7a0ae9bc8 /src/device.h
parentreceive: we're not planning on turning that into a while loop now (diff)
downloadwireguard-monolithic-historical-aa4d07187b66bf83bfddfa6d964f7c141518ba7b.tar.xz
wireguard-monolithic-historical-aa4d07187b66bf83bfddfa6d964f7c141518ba7b.zip
queueing: use ptr_ring instead of linked lists
Diffstat (limited to 'src/device.h')
-rw-r--r--src/device.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/device.h b/src/device.h
index 538a14e..4932477 100644
--- a/src/device.h
+++ b/src/device.h
@@ -13,6 +13,7 @@
#include <linux/workqueue.h>
#include <linux/mutex.h>
#include <linux/net.h>
+#include <linux/ptr_ring.h>
struct wireguard_device;
@@ -22,9 +23,7 @@ struct multicore_worker {
};
struct crypt_queue {
- spinlock_t lock;
- int len;
- struct list_head queue;
+ struct ptr_ring ring;
union {
struct {
struct multicore_worker __percpu *worker;