plans: spanning-tree per-port tunables - cost, port-priority and portfast, measured on 76546d5b #1996

Merged
jaylouisw merged 1 commit from plan/1118-1511 into main 2026-11-18 15:24:25 +00:00
Owner

Plan only - no code, no engine/test/workflow edits in this PR.

docs/plans/stp-port-tunables.md, measured on 76546d5b:

  • engine/stp.js:144 (portCost()) already prefers port.cost, and the only production caller never sets it: engine/simulator.js:905 derives every port cost from the cable rate, so the override exists for test/stp-path-cost.test.js:66 and nothing else.
  • Port priority is a constant - engine/stp.js:104 says so, comparePortIds() (:120-142) compares names with no priority byte - and STP_UNMODELLED (engine/cli.js:642) refuses cost, portfast, edge and nine more at :1139-1144 / :1295-1300.
  • There is no interface-mode door at all: engine/cli.js:168 records that _ifaceMode() does not dispatch spanning-tree and an interface block falls through to _configMode (:1122).
  • PortFast has nothing to mark: stpTimers() (engine/convergence.js:54) gives every port 15 s listening + 15 s learning and stpPortStateAt() (:240) makes no exception.
  • The report prints Port/Role/State only (engine/cli.js:5775-5781) and refuses every tail at :5727; only the bridge priority round-trips (cli.js:6244, engine/device.js:1492 / :1555).

Six ordered steps, each one PR and one worker: the interface-mode door plus spanning-tree cost (acceptance and engine consumption in the same PR), port-priority with a real priority byte, portfast with the convergence shortcut, the Cost/Prio.Nbr/Type columns and show spanning-tree interface, the config round trip, then the prose that now contradicts the code. Step 7 is PVST/per-VLAN and is marked as needing Jay.

Closes no open issue - the queue is #130 and #803 (device requests) and #1980 (a changelog plan). It closes the gap #1493 documented only as far as the message.

Plan only - no code, no engine/test/workflow edits in this PR. `docs/plans/stp-port-tunables.md`, measured on `76546d5b`: - `engine/stp.js:144` (`portCost()`) already prefers `port.cost`, and the only production caller never sets it: `engine/simulator.js:905` derives every port cost from the cable rate, so the override exists for `test/stp-path-cost.test.js:66` and nothing else. - Port priority is a constant - `engine/stp.js:104` says so, `comparePortIds()` (`:120-142`) compares names with no priority byte - and `STP_UNMODELLED` (`engine/cli.js:642`) refuses `cost`, `portfast`, `edge` and nine more at `:1139-1144` / `:1295-1300`. - There is no interface-mode door at all: `engine/cli.js:168` records that `_ifaceMode()` does not dispatch `spanning-tree` and an interface block falls through to `_configMode` (`:1122`). - PortFast has nothing to mark: `stpTimers()` (`engine/convergence.js:54`) gives every port 15 s listening + 15 s learning and `stpPortStateAt()` (`:240`) makes no exception. - The report prints Port/Role/State only (`engine/cli.js:5775-5781`) and refuses every tail at `:5727`; only the bridge priority round-trips (`cli.js:6244`, `engine/device.js:1492` / `:1555`). Six ordered steps, each one PR and one worker: the interface-mode door plus `spanning-tree cost` (acceptance and engine consumption in the same PR), `port-priority` with a real priority byte, `portfast` with the convergence shortcut, the Cost/Prio.Nbr/Type columns and `show spanning-tree interface`, the config round trip, then the prose that now contradicts the code. Step 7 is PVST/per-VLAN and is marked as needing Jay. Closes no open issue - the queue is #130 and #803 (device requests) and #1980 (a changelog plan). It closes the gap #1493 documented only as far as the message.
plans: spanning-tree per-port tunables - the cost the election reads, the priority nothing sets, and portfast
All checks were successful
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 3s
CI / Classify the change (pull_request) Successful in 6s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 20s
CI / Test (Node 20) (pull_request) Successful in 49s
CI / Test (Node 22) (pull_request) Successful in 52s
CI / Test (Node 18) (pull_request) Successful in 57s
CI / Arm auto-merge (pull_request) Successful in 28s
3ceae796e6
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-18 15:20:17 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1996
No description provided.