diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-09-05 19:55:10 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-09-05 19:58:12 +0200 |
commit | 8551e03ee3a27492f8423db3eda7ddfd1135bd50 (patch) | |
tree | 1b73587437388d4084c98315d792e4b55da62650 /src/router/device.rs | |
parent | Output test number and parameters to debug (diff) | |
download | wireguard-rs-8551e03ee3a27492f8423db3eda7ddfd1135bd50.tar.xz wireguard-rs-8551e03ee3a27492f8423db3eda7ddfd1135bd50.zip |
Added outbound benchmark
Decent performance (~1.5Gb/s on old XPS laptop from 2014),
biggest bottleneck seems to be the heap allocator,
swapping with jemalloc yields 2x performance.
Diffstat (limited to 'src/router/device.rs')
-rw-r--r-- | src/router/device.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/router/device.rs b/src/router/device.rs index 57ab418..2196dd1 100644 --- a/src/router/device.rs +++ b/src/router/device.rs @@ -58,7 +58,7 @@ pub struct EncryptionState { pub struct DecryptionState<C: Callbacks, T: Tun, B: Bind> { pub key: [u8; 32], - pub keypair: Weak<KeyPair>, + pub keypair: Weak<KeyPair>, // only the key-wheel has a strong reference pub confirmed: AtomicBool, pub protector: spin::Mutex<AntiReplay>, pub peer: Weak<PeerInner<C, T, B>>, @@ -147,7 +147,7 @@ impl<C: Callbacks, T: Tun, B: Bind> Device<C, T, B> { /// /// # Arguments /// - /// - pt_msg: IP packet to cryptkey route + /// - msg: IP packet to crypt-key route /// pub fn send(&self, msg: Vec<u8>) -> Result<(), RouterError> { // ensure that the type field access is within bounds |