Always correct host settings instead of gating fixes behind flags

This commit is contained in:
flamingcow
2026-07-25 18:16:34 -07:00
parent 27f89d9916
commit 773724368e
2 changed files with 45 additions and 73 deletions
-4
View File
@@ -369,12 +369,10 @@ func main() {
rcvbuf = flag.Int("rcvbuf", 64<<20, "SO_RCVBUFFORCE per rx socket")
txCPUs = flag.String("txcpus", "", "comma-separated CPUs to pin tx workers to")
rxCPUs = flag.String("rxcpus", "", "comma-separated CPUs to pin rx workers to")
tune = flag.Bool("tune", true, "check host settings at startup and correct them; without this they are only reported")
governor = flag.String("governor", "performance", "required cpufreq governor")
coalesce = flag.Uint("coalesce-usecs", 25, "required fixed rx/tx coalesce usecs, with adaptive coalescing off")
rxRing = flag.Uint("rx-ring", 8160, "required rx ring size, clamped to hardware maximum")
txRing = flag.Uint("tx-ring", 4096, "required tx ring size, clamped to hardware maximum")
setRings = flag.Bool("set-rings", true, "allow ring resizing at startup, which resets the link")
color = flag.String("color", "auto", "colored output: auto, always, never")
)
flag.Parse()
@@ -385,13 +383,11 @@ func main() {
}
tcfg := tuneConfig{
enabled: *tune,
governor: *governor,
rxUsecs: uint32(*coalesce),
txUsecs: uint32(*coalesce),
rxRing: uint32(*rxRing),
txRing: uint32(*txRing),
setRings: *setRings,
}
if err := run(*aName, *bName, *sizesArg, *patArg, *fanout, *txCPUs, *rxCPUs,