tun: implement API for disabling UDP GRO on Linux

Certain device drivers (e.g. vxlan, geneve) do not properly handle
coalesced UDP packets later in the stack, resulting in packet loss.

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2024-04-29 09:15:56 -07:00 committed by Jordan Whited
parent 64040e6646
commit 03c5a0ccf7
2 changed files with 18 additions and 2 deletions

View file

@ -51,3 +51,11 @@ type Device interface {
// lifetime of a Device.
BatchSize() int
}
type LinuxDevice interface {
Device
// DisableUDPGRO disables UDP GRO if it is enabled. Certain device drivers
// (e.g. vxlan, geneve) do not properly handle coalesced UDP packets later
// in the stack, resulting in packet loss.
DisableUDPGRO()
}