Judge loss by arrival order and a deadline, one tx ring per stream

This commit is contained in:
flamingcow
2026-08-31 14:33:09 -07:00
parent 06fa759b1a
commit 7fa48da73c
12 changed files with 220 additions and 254 deletions
+6 -2
View File
@@ -104,6 +104,10 @@ func totalRow(elapsed time.Duration, v view, target float64, phy phyDisplay) []s
}
}
// One dedicated cpu per tx feeder, spaced two apart so no two spinners share
// a hyperthread pair; xps maps each cpu to its stream's own ring.
func txCPU(iface, stream int) int { return (iface*numStreams + stream) * 2 }
const (
numStreams = 2
batchSize = 64
@@ -242,8 +246,8 @@ func run(aName, bName string) (err error) {
diag := newCableDiag(modules, cableInfo{})
var dirs []*direction
for _, p := range [][2]endpoint{{a, b}, {b, a}} {
d, err := buildDirection(p[0].name+"->"+p[1].name, p[0], p[1], &diag.masked)
for i, p := range [][2]endpoint{{a, b}, {b, a}} {
d, err := buildDirection(p[0].name+"->"+p[1].name, i, p[0], p[1], &diag.masked)
if err != nil {
return err
}