summaryrefslogtreecommitdiffstats
path: root/src/mpq.h
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@mail.noconroy.net>2019-09-24 07:16:12 +0100
committerMatt Dunwoodie <ncon@mail.noconroy.net>2019-09-24 07:16:12 +0100
commitb8381403f63c65d6e7e8936cf52d4c18efb5e07a (patch)
tree4b7ee63e197f693c57ad8018ac910a28eded3c85 /src/mpq.h
parentFix two bugs (diff)
downloadwireguard-openbsd-b8381403f63c65d6e7e8936cf52d4c18efb5e07a.tar.xz
wireguard-openbsd-b8381403f63c65d6e7e8936cf52d4c18efb5e07a.zip
Add max queue length of 1024 packets
Diffstat (limited to 'src/mpq.h')
-rw-r--r--src/mpq.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mpq.h b/src/mpq.h
index 146dedade5b..eda5cfa0954 100644
--- a/src/mpq.h
+++ b/src/mpq.h
@@ -31,12 +31,13 @@ struct mpq {
void mpq_init(struct mpq *, int);
int mpq_serialize_try_enter(struct mpq *);
void mpq_serialize_leave(struct mpq *);
-void mpq_enqueue(struct mpq *, struct mbuf *);
+int mpq_enqueue(struct mpq *, struct mbuf *);
void mpq_enlist(struct mpq *, struct mbuf_list *);
struct mbuf *mpq_dethread(struct mpq *);
struct mbuf *mpq_dequeue(struct mpq *);
void mpq_done(struct mbuf *m);
+#define MPQ_LEN 1024
#define MPQ_WORKER(fn_name, parallel_fn, serial_fn) \
void fn_name(void *_mpq) { \
struct mbuf *m; \