Commit 8deb4c85 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Connor O'Brien
Browse files

UPSTREAM: 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>
(cherry picked from commit 886fcee9)
Bug: 187129171
Signed-off-by: default avatarConnor O'Brien <connoro@google.com>
Change-Id: I15f0bff96a710c80727b22c30eba4ac75db196ce
parent 64952923
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment