Skip to content
Commit 886fcee9 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Jakub Kicinski
Browse files

wireguard: receive: use ring buffer for incoming handshakes



Apparently the spinlock on incoming_handshake's skb_queue is highly
contended, and a torrent of handshake or cookie packets can bring the
data plane to its knees, simply by virtue of enqueueing the handshake
packets to be processed asynchronously. So, we try switching this to a
ring buffer to hopefully have less lock contention. This alleviates the
problem somewhat, though it still isn't perfect, so future patches will
have to improve this further. However, it at least doesn't completely
diminish the data plane.

Reported-by: default avatarStreun Fabio <fstreun@student.ethz.ch>
Reported-by: default avatarJoel Wanner <joel.wanner@inf.ethz.ch>
Fixes: e7096c13

 ("net: WireGuard secure network tunnel")
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 20ae1d6a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment