aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-09-15 15:25:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-09-15 15:34:54 +0200
commitca392c705e19977abaa280d309685a1c62c937d4 (patch)
tree82b1285a30a1fb55216a5134a7183c5bf7c68482 /src/device.c
parentdata: reorganize and edit new queuing code (diff)
downloadwireguard-monolithic-historical-jd/cpu-dql.tar.xz
wireguard-monolithic-historical-jd/cpu-dql.zip
DQL trial 1jd/cpu-dql
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 3615125..762110e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -315,6 +315,7 @@ static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *t
for_each_possible_cpu (cpu) {
INIT_LIST_HEAD(&per_cpu_ptr(wg->send_queue, cpu)->list);
INIT_WORK(&per_cpu_ptr(wg->send_queue, cpu)->work, packet_encrypt_worker);
+ dql_init(&per_cpu_ptr(wg->send_queue, cpu)->dql, HZ);
}
wg->receive_queue = alloc_percpu(struct crypt_queue);
@@ -323,6 +324,7 @@ static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *t
for_each_possible_cpu (cpu) {
INIT_LIST_HEAD(&per_cpu_ptr(wg->receive_queue, cpu)->list);
INIT_WORK(&per_cpu_ptr(wg->receive_queue, cpu)->work, packet_decrypt_worker);
+ dql_init(&per_cpu_ptr(wg->receive_queue, cpu)->dql, HZ);
}
ret = ratelimiter_init();