mirror of
https://github.com/tailscale/tailscale.git
synced 2026-11-26 03:26:26 -08:00
Add a GokrazyBuggyLinux70 VM image that boots the Linux 7.0 kernel package from github.com/tailscale/gokrazy-kernel-buggy-linux-7_0 under QEMU q35 with the emulated igb NIC. The image lets vmtest exercise the UDP GSO regression independently of the host kernel version. Add TTA helpers to report ethtool netdev features and to run a TCP bulk-send probe between VMs. The diagnostic test verifies that QEMU's igb path exposes tx-udp-segmentation and tx-gso-partial. The mitigation test boots a buggy gokrazy node and a regular gokrazy node, demonstrates that a TCP transfer stalls without never-gso-equal-tail, then applies the node attribute and verifies the same transfer succeeds. Updates #19777 Change-Id: I21f1e5dc85d556eb514ffa361ee39aad142b7f2b Signed-off-by: Brad Fitzpatrick <[email protected]>
61 lines
1.4 KiB
Go
61 lines
1.4 KiB
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build linux
|
|
|
|
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net"
|
|
"net/http"
|
|
|
|
"github.com/safchain/ethtool"
|
|
)
|
|
|
|
type netdevFeatureReport struct {
|
|
Name string `json:"name"`
|
|
Flags net.Flags `json:"flags"`
|
|
Driver string `json:"driver,omitempty"`
|
|
BusInfo string `json:"busInfo,omitempty"`
|
|
Features map[string]bool `json:"features,omitempty"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
|
|
func handleNetdevFeatures(w http.ResponseWriter, r *http.Request) {
|
|
eth, err := ethtool.NewEthtool()
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
return
|
|
}
|
|
defer eth.Close()
|
|
|
|
ifaces, err := net.Interfaces()
|
|
if err != nil {
|
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
return
|
|
}
|
|
var out []netdevFeatureReport
|
|
for _, iface := range ifaces {
|
|
if iface.Flags&net.FlagLoopback != 0 {
|
|
continue
|
|
}
|
|
rep := netdevFeatureReport{
|
|
Name: iface.Name,
|
|
Flags: iface.Flags,
|
|
}
|
|
if di, err := eth.DriverInfo(iface.Name); err == nil {
|
|
rep.Driver = di.Driver
|
|
rep.BusInfo = di.BusInfo
|
|
}
|
|
if features, err := eth.Features(iface.Name); err == nil {
|
|
rep.Features = features
|
|
} else {
|
|
rep.Error = err.Error()
|
|
}
|
|
out = append(out, rep)
|
|
}
|
|
w.Header().Set("Content-Type", "application/json")
|
|
json.NewEncoder(w).Encode(out)
|
|
}
|