W_SPEED_DOWNGRADE cannot fire when only one end is speed-limited #1523

Closed
opened 2026-11-15 18:01:12 +00:00 by jaylouisw · 0 comments
Owner

validation.js:806 raises W_SPEED_DOWNGRADE only when the negotiated rate is below both ends' maximum.

Measured: a 10G RJ45 port meeting a 1G RJ45 port negotiates 1000 and emits no code at all - which is the common real case, and precisely the case a homelab cares about. Two 10G ports forced onto 1000BASE-T do warn, so the warning exists for the rarer situation and is silent for the common one.

Why it matters: "a 10G-capable link never negotiates 1G" is one of the intent checks, and it cannot be built on a predicate that is blind exactly where it is needed. Note also that canMate().speedMbps answers best-case socket speed while the link record answers actual cable speed - the two differ in the downgrade case, as recorded in docs/CONNECTORS.md.

Suggested fix: warn when the negotiated rate is below either end's capability, unless the link carries an explicit exemption (a deliberately 1G optic in a 10G cage is legitimate and common). Keep the existing both-ends code for the case where a downgrade is unambiguously a fault.

`validation.js:806` raises `W_SPEED_DOWNGRADE` only when the negotiated rate is below **both** ends' maximum. Measured: a 10G RJ45 port meeting a 1G RJ45 port negotiates 1000 and emits no code at all - which is the common real case, and precisely the case a homelab cares about. Two 10G ports forced onto 1000BASE-T do warn, so the warning exists for the rarer situation and is silent for the common one. **Why it matters:** "a 10G-capable link never negotiates 1G" is one of the intent checks, and it cannot be built on a predicate that is blind exactly where it is needed. Note also that `canMate().speedMbps` answers *best-case socket speed* while the link record answers *actual cable speed* - the two differ in the downgrade case, as recorded in `docs/CONNECTORS.md`. **Suggested fix:** warn when the negotiated rate is below **either** end's capability, unless the link carries an explicit exemption (a deliberately 1G optic in a 10G cage is legitimate and common). Keep the existing both-ends code for the case where a downgrade is unambiguously a fault.
Sign in to join this conversation.
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#1523
No description provided.