Cap Adaptive SQM rates at WAN link speed, editable baseline latency, cellular 7-day profile, and connection type auto-detect#368
Merged
tvancott42 merged 18 commits intomainfrom Feb 26, 2026
Conversation
Read link speed from WAN object (with port_table fallback via port_idx) and cap MaxSpeed/AbsoluteMax so SQM never shapes above what the port can carry. GRE tunnels and unknown links are left uncapped.
Also cap the speed floor so entering a nominal speed above link speed doesn't produce a min above what the port can carry. Fix the Smart Queue rate warning to use the already-capped AbsoluteMax instead of recomputing from an uncapped profile.
LoadSavedConfigsAsync runs before RefreshStatus fetches wanInterfaces, so WanLinkSpeedMbps was null on first render. Now updates link speeds on loaded configs after wanInterfaces arrives.
The deploy service was re-applying profile settings without link speed context, overwriting the caps set by the caller. The config arrives fully populated from CreateSqmConfiguration - validation still runs.
Previously only set name/ping conditionally and didn't reset connection type, nominal speeds, or speedtest server - leaving stale values from the previous WAN selection.
Replace the read-only display with an inline input so users can override the auto-calculated value. Nominal speed changes preserve the override; connection type changes reset it.
Add nullable BaselineLatencyMs column to SqmWanConfigurations. Existing rows default to null (use auto-calculated value). When the user edits the inline baseline latency field, the value is saved and restored on page reload.
Use ratio to baseline: >3x = danger (red), >1.5x = warning (yellow), otherwise no highlight. Applies per-WAN using each WAN's configured baseline latency.
- Add BaselineLatencyMs to upsert path in SaveSqmWanConfigAsync - Restore user's baseline latency after ApplyProfileSettings in deploy - Comment out auto speedtest scheduling (metered WAN testing)
…arch Replace uniform daily pattern with full 7x24 matrix reflecting real cellular tower congestion patterns: weekday commute/work ramps, Friday evening out, Saturday worst evening (people at restaurants/events on cellular not Wi-Fi), Sunday lightest day with early evening recovery.
- Add BaselineLatency to WanConfigSnapshot so changing it triggers the unsaved changes indicator. Uses epsilon comparison (0.01) for doubles. - Set WanLinkSpeedMbps in OnEnabledChanged when auto-selecting interface.
When WAN link speed is lower than both calculated Min and Max (e.g., 1.2 Gbps fiber on 1GbE port), both get capped to link speed making them equal. The >= validation blocked deployment in this common case. Changed to > to allow equality.
- Match LTE/5G/Cellular -> CellularHome, Fiber/FTTH/FTTP -> Fiber, DSL -> Dsl in ApplyConnectionDefaults - Allow Min == Max download speed when both capped at link speed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
dotnet buildwith zero warnings