A 10G port facing a 1G port is a downgrade whether or not both ends are fast (#1523) #1566

Merged
jaylouisw merged 1 commit from fix/1115-2336 into main 2026-11-16 01:30:07 +00:00
Owner

Fixes #1523

W_SPEED_DOWNGRADE fired only when the negotiated rate was below both ends maxima, so the case that actually happens emitted nothing:

C9300-24UX/Gi1/0/1 (10G rj45) <-> generic-switch/Fa0/1 (1G rj45)
  ok, 1000 Mbps, warnings: (none)

Two 10G cages forced onto a 1G module did warn, so the warning existed for the rarer shape and was silent for the common one - which made "a 10G-capable link never negotiates 1G" impossible to build a check on.

What changed

  • The rule fires when the rate is below either end maximum, and names the port whose capability is being lost and the peer that sets the ceiling:

    Link Catalyst 9300-24UX/Gi1/0/1 <-> Switch (L2)/Fa0/1 runs at 1G: Catalyst 9300-24UX/Gi1/0/1 is a 10G port and Switch (L2)/Fa0/1 tops out at 1G, so this cable cannot carry more than 1G.

  • The both-ends case keeps its code and its exact wording.

  • The single-ended warning is withheld when the negotiated rate is the chosen medium own rate and that medium is a pluggable: a 1G optic or 1G copper module in a 10G cage is a part somebody fitted. A 10G SFP+ cabled to a 1G SFP, and the 100G module in a 200G QSFP-DD cage, stay quiet exactly as before.

  • RULES description updated; docs/CONNECTORS.md, docs/PHYSICAL_LAYER.md and docs/SIMULATION.md no longer claim the warning needs both ports to be faster.

Tests

test/speed-downgrade-one-end.test.js (new, 7 assertions): the reported 10G/1G lab through Topology.validateLink, order-independence, the untouched both-ends wording, the module exemption, 2.5G-into-1G and 1G-into-100M, and that every port the message names is a real interface on that device.

  • node scripts/syntax-check.js - 328 files, all OK
  • full npm test - 258 suites, 9377 assertions passed, 1 failed: test/spec-vs-description.test.js (Edgecore AS4610 claims 2x 20G QSFP+ with no port that can do it). That failure is pre-existing on origin/main from #1555 and reproduces with this branch stashed.
Fixes #1523 `W_SPEED_DOWNGRADE` fired only when the negotiated rate was below **both** ends maxima, so the case that actually happens emitted nothing: ``` C9300-24UX/Gi1/0/1 (10G rj45) <-> generic-switch/Fa0/1 (1G rj45) ok, 1000 Mbps, warnings: (none) ``` Two 10G cages forced onto a 1G module did warn, so the warning existed for the rarer shape and was silent for the common one - which made "a 10G-capable link never negotiates 1G" impossible to build a check on. ## What changed - The rule fires when the rate is below **either** end maximum, and names the port whose capability is being lost and the peer that sets the ceiling: `Link Catalyst 9300-24UX/Gi1/0/1 <-> Switch (L2)/Fa0/1 runs at 1G: Catalyst 9300-24UX/Gi1/0/1 is a 10G port and Switch (L2)/Fa0/1 tops out at 1G, so this cable cannot carry more than 1G.` - The both-ends case keeps its code and its exact wording. - The single-ended warning is withheld when the negotiated rate is the chosen medium own rate and that medium is a pluggable: a 1G optic or 1G copper module in a 10G cage is a part somebody fitted. A 10G SFP+ cabled to a 1G SFP, and the 100G module in a 200G QSFP-DD cage, stay quiet exactly as before. - `RULES` description updated; `docs/CONNECTORS.md`, `docs/PHYSICAL_LAYER.md` and `docs/SIMULATION.md` no longer claim the warning needs both ports to be faster. ## Tests `test/speed-downgrade-one-end.test.js` (new, 7 assertions): the reported 10G/1G lab through `Topology.validateLink`, order-independence, the untouched both-ends wording, the module exemption, 2.5G-into-1G and 1G-into-100M, and that every port the message names is a real interface on that device. - `node scripts/syntax-check.js` - 328 files, all OK - full `npm test` - 258 suites, 9377 assertions passed, 1 failed: `test/spec-vs-description.test.js` (Edgecore AS4610 claims 2x 20G QSFP+ with no port that can do it). That failure is pre-existing on `origin/main` from #1555 and reproduces with this branch stashed.
A 10G port facing a 1G port is a downgrade whether or not both ends are fast (#1523)
Some checks failed
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 20s
CI / Test (Node 18) (pull_request) Failing after 3m30s
CI / Test (Node 20) (pull_request) Failing after 3m10s
CI / Server smoke test (pull_request) Successful in 29s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 22) (pull_request) Failing after 3m13s
8ce597288d
`W_SPEED_DOWNGRADE` fired only when the negotiated rate was below BOTH ends'
maxima, so the case that actually happens emitted nothing:

  C9300-24UX/Gi1/0/1 (10G rj45) <-> generic-switch/Fa0/1 (1G rj45)
    ok, 1000 Mbps, warnings: (none)

Two 10G cages forced onto a 1G module did warn, so the warning existed for the
rarer shape and was silent for the common one - which made "a 10G-capable link
never negotiates 1G" impossible to build a check on, because the predicate a
check would be written against was blind exactly where an operator cares.

The rule now fires when the rate is below *either* end's maximum, and names the
port whose capability is being lost and the peer that sets the ceiling:

  Link Catalyst 9300-24UX/Gi1/0/1 <-> Switch (L2)/Fa0/1 runs at 1G:
  Catalyst 9300-24UX/Gi1/0/1 is a 10G port and Switch (L2)/Fa0/1 tops out at
  1G, so this cable cannot carry more than 1G.

The both-ends case keeps its code and its exact wording, because nothing in that
link can go faster. The single-ended warning is withheld when the negotiated
rate is the chosen medium's own rate and that medium is a pluggable: a 1G optic
or 1G copper module in a 10G cage is a part somebody fitted, and the rate is a
decision rather than a fault - a 10G SFP+ cabled to a 1G SFP, and the 100G
module in a 200G QSFP-DD cage, stay quiet as they did before.

docs/CONNECTORS.md, docs/PHYSICAL_LAYER.md and docs/SIMULATION.md said the
warning needs both ports to be faster; they now describe the two shapes and the
module exemption.

test/speed-downgrade-one-end.test.js locks all of it: the reported 10G/1G lab,
order-independence, the untouched both-ends wording, the module exemption, the
2.5G and 100M cases, and that every port the message names is a real port.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 01:29:56 +00:00
jaylouisw force-pushed fix/1115-2336 from 8ce597288d
Some checks failed
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 20s
CI / Test (Node 18) (pull_request) Failing after 3m30s
CI / Test (Node 20) (pull_request) Failing after 3m10s
CI / Server smoke test (pull_request) Successful in 29s
CI / Docker build (pull_request) Successful in 24s
CI / Test (Node 22) (pull_request) Failing after 3m13s
to ec16665c3d
Some checks failed
CI / Classify the change (pull_request) Successful in 16s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 20s
CI / Docker build (pull_request) Failing after 14m12s
CI / Server smoke test (pull_request) Failing after 14m17s
CI / Test (Node 22) (pull_request) Failing after 14m22s
CI / Test (Node 20) (pull_request) Failing after 14m33s
CI / Test (Node 18) (pull_request) Failing after 14m42s
2026-11-16 01:30:00 +00:00
Compare
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!1566
No description provided.