Split out of the taprio readback fix (489c834) so the decision is recorded rather than silently deferred.
extract_taprio_gcl in crates/spar-trace-topology/src/fixtures/transform.rs reads every entry of options.schedule as a gate-control-list entry, using only gatemask and interval. It never looks at cmd.
iproute2 emits cmd as one of three values (tc/q_taprio.c, entry_cmd_to_str):
S — SetGates, the entry carries a gate mask
H — Hold, for frame preemption
R — Release, likewise
Only S entries are gate entries in the 802.1Qbv sense. H/R belong to 802.1Qbu/802.3br preemption and their gate mask is not a schedule state the Qcc YANG gate-control-list should carry.
Why it has not bitten. bin/gen-fixtures.rs installs only sched-entry S entries, so every entry read back is an S. The distinction is unobservable on the current fixture topology, which is exactly why it should be written down instead of trusted to stay that way — a future fixture that exercises preemption would silently get H/R masks folded into its GCL.
Not fixed in 489c834 deliberately: that commit corrects the JSON key names, and changing which entries are accepted is a semantic change to the emitted Qcc YANG. Bundling them would have made the mutation-test evidence for the shape fix ambiguous.
Proposed: filter to cmd == "S", and decide explicitly what a non-S entry means — skipped, or an error naming the unsupported command. An entry with no cmd at all should probably be an error rather than assumed to be S, on the same principle as the rest of that function: absence should not read as the expected case.
Blocked on nothing; wants a fixture with a preemption entry to be a real test rather than an assertion about code that cannot run.
Refs #362, #365
Split out of the taprio readback fix (489c834) so the decision is recorded rather than silently deferred.
extract_taprio_gclincrates/spar-trace-topology/src/fixtures/transform.rsreads every entry ofoptions.scheduleas a gate-control-list entry, using onlygatemaskandinterval. It never looks atcmd.iproute2 emits
cmdas one of three values (tc/q_taprio.c,entry_cmd_to_str):S— SetGates, the entry carries a gate maskH— Hold, for frame preemptionR— Release, likewiseOnly
Sentries are gate entries in the 802.1Qbv sense.H/Rbelong to 802.1Qbu/802.3br preemption and their gate mask is not a schedule state the Qcc YANGgate-control-listshould carry.Why it has not bitten.
bin/gen-fixtures.rsinstalls onlysched-entry Sentries, so every entry read back is anS. The distinction is unobservable on the current fixture topology, which is exactly why it should be written down instead of trusted to stay that way — a future fixture that exercises preemption would silently getH/Rmasks folded into its GCL.Not fixed in 489c834 deliberately: that commit corrects the JSON key names, and changing which entries are accepted is a semantic change to the emitted Qcc YANG. Bundling them would have made the mutation-test evidence for the shape fix ambiguous.
Proposed: filter to
cmd == "S", and decide explicitly what a non-Sentry means — skipped, or an error naming the unsupported command. An entry with nocmdat all should probably be an error rather than assumed to beS, on the same principle as the rest of that function: absence should not read as the expected case.Blocked on nothing; wants a fixture with a preemption entry to be a real test rather than an assertion about code that cannot run.
Refs #362, #365