nx_fabric_fair_gate.nx
buildroot/runtime/nx_fabric_fair_gate.nx
about
nx_fabric_fair_gate.nx -- R2.5 of the SkyHammer fabric exceed ladder: MULTI-FLOW
FAIRNESS, closing the disclosed single-flow caveat on R2 (nx_fabric_cc) / the L4S
controller (nx_room_l4s). N flows with UNEQUAL starting windows share ONE bottleneck;
the DCTCP/ECN controller must drive them to FAIR shares (Jain's index ~ 1) AND keep the
queue bounded near the ECN setpoint. Load-bearing neg-control: with the reaction REMOVED
(frozen windows), the initial imbalance PERSISTS -> unfair -> proves the controller (not
the FIFO drain) is what creates fairness. Integer-only fixed-point (no float). Same
discrete-event link shape as nx_fabric_cc, extended to N independent flows.
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const FAIR_DCTCP: i64 = 0 // ECN-adaptive (AI + proportional cut on marks) |
| 13 | const FAIR_OPEN: i64 = 1 // reaction REMOVED: windows frozen at init -> imbalance persists |
| 14 | const FSCALE: i64 = 1024 |
functions
| 18 | func fair_run(mode: i64, NF: i64, D: i64, RTT: i64, BUFCAP: i64, K: i64, |
| 138 | func jain_x1000(d: *i64, NF: i64) -> i64 called by 1: main |
| 147 | func gp(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 148 | func fw(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 149 | func gn(v: i64) -> i64 |
| 159 | func chk(name: *u8, ok: i64) -> i64 |
| 163 | func show_flows(tag: *u8, d: *i64, NF: i64) -> i64 |
| 169 | func main() -> i64 |