mirror of https://github.com/tailscale/tailscale/
net/netcheck,wgengine/magicsock: align DERP frame receive time heuristics
The netcheck package and the magicksock package coordinate via the health package, but both sides have time based heuristics through indirect dependencies. These were misaligned, so the implemented heuristic aimed at reducing DERP moves while there is active traffic were non-operational about 3/5ths of the time. It is problematic to setup a good test for this integration presently, so instead I added comment breadcrumbs along with the initial fix. Updates #8603 Signed-off-by: James Tucker <james@tailscale.com>pull/11644/head
parent
1fbaf26106
commit
6e334e64a1
@ -0,0 +1,16 @@
|
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
package magicsock
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"tailscale.com/net/netcheck"
|
||||||
|
)
|
||||||
|
|
||||||
|
func CheckDERPHeuristicTimes(t *testing.T) {
|
||||||
|
if netcheck.PreferredDERPFrameTime <= frameReceiveRecordRate {
|
||||||
|
t.Errorf("PreferredDERPFrameTime too low; should be at least frameReceiveRecordRate")
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue