diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-12-16 16:53:23 +0100 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-12-16 16:53:23 +0100 |
commit | f8f404c8717fb23fec922f35163937ab01962396 (patch) | |
tree | dbeca8c0e0469859e6fd113fafeac6d1fa1f5059 /src/wireguard/router/device.rs | |
parent | Clean dead code (diff) | |
download | wireguard-rs-f8f404c8717fb23fec922f35163937ab01962396.tar.xz wireguard-rs-f8f404c8717fb23fec922f35163937ab01962396.zip |
Constant renamed to be consistent with kernel WG
Diffstat (limited to 'src/wireguard/router/device.rs')
-rw-r--r-- | src/wireguard/router/device.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wireguard/router/device.rs b/src/wireguard/router/device.rs index a12a657..f903a8e 100644 --- a/src/wireguard/router/device.rs +++ b/src/wireguard/router/device.rs @@ -12,6 +12,7 @@ use zerocopy::LayoutVerified; use super::anti_replay::AntiReplay; use super::pool::Job; +use super::constants::PARALLEL_QUEUE_SIZE; use super::inbound; use super::outbound; @@ -125,8 +126,8 @@ impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>> Drop impl<E: Endpoint, C: Callbacks, T: tun::Writer, B: udp::Writer<E>> DeviceHandle<E, C, T, B> { pub fn new(num_workers: usize, tun: T) -> DeviceHandle<E, C, T, B> { // allocate shared device state - let (queue_outbound, mut outrx) = ParallelQueue::new(num_workers, 128); - let (queue_inbound, mut inrx) = ParallelQueue::new(num_workers, 128); + let (queue_outbound, mut outrx) = ParallelQueue::new(num_workers, PARALLEL_QUEUE_SIZE); + let (queue_inbound, mut inrx) = ParallelQueue::new(num_workers, PARALLEL_QUEUE_SIZE); let device = Device { inner: Arc::new(DeviceInner { inbound: tun, |