Repository navigation
feat(network): Bandwidth Management and QoS — v1.8.0 Issue #190 - #4273
Merged
Merged
Conversation
…190) - Add LeakyBucket class: constant-rate traffic shaper with overflow detection - Add CongestionController class: AIMD (slow-start + additive-increase/multiplicative-decrease) - Extend QoSManager::Config: max_bandwidth_mbps, per_connection_limit_mbps, enable_priority_queuing, starvation_guard_threshold - Add snake_case API: set_priority(), set_bandwidth_limit(), set_token_bucket() - Add leaky bucket integration: setLeakyBucket() / clearLeakyBucket() - Add priority queue scheduling: enqueueSend() / dequeueForSend() / getPendingQueueDepth() - Add fair-queuing starvation guard in dequeueForSend() - Add congestion control: recordAck() / recordLoss() / getCongestionWindow() - Add Linux tc integration: configureTc(TcConfig) with interface name injection prevention - allowSend() now also checks leaky bucket conformance - Add 37 focused tests in test_bandwidth_management_qos.cpp - Add CI workflow: bandwidth-management-qos-ci.yml Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] Implement bandwidth management and QoS features
feat(network): Bandwidth Management and QoS (v1.8.0, Issue #190)
Mar 15, 2026
…nStats CC fields, ROADMAP updates, tc argument injection prevention - allowSend() now gates sends on CongestionController cwnd (congestion control integration) - ConnectionStats: add congestion_window, congestion_ssthresh_bytes, smoothed_rtt_us fields - getConnectionStats() populates new CC fields - configureTc(): reject interface names starting with '-' to prevent tc argument injection - 3 new tests: AllowSendBlockedByCongestionWindow, AllowSendAfterWindowDrainedIsPermitted, ConnectionStatsExposesCC - LinuxTcTest: add dash-prefix injection test cases - src/network/ROADMAP.md: mark Bandwidth Management and QoS done with full detail - src/ROADMAP.md: row #190 marked ✅ - src/network/FUTURE_ENHANCEMENTS.md: section updated with implementation status Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
feat(network): Bandwidth Management and QoS (v1.8.0, Issue #190)
feat(network): Bandwidth Management and QoS — v1.8.0 Issue #190
Mar 15, 2026
makr-code
marked this pull request as ready for review
March 15, 2026 19:26
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.
Implements all Bandwidth Management and QoS acceptance criteria (Issue #190, v1.8.0) in
src/network/. Includes a post-implementation audit that caught and fixed a critical integration gap: the congestion controller existed but never gated sends.Core additions (
include/network/qos_manager.h+src/network/qos_manager.cpp)LeakyBucket— constant-rate shaper (strict drain, no burst accumulation); complementsTokenBucketCongestionController— AIMD: slow-start untilssthresh, then additive-increase;recordLoss()halves cwnd; Jacobson/Karels SRTT; cwnd cap at 64 MBQoSManager::Configextended:max_bandwidth_mbps,per_connection_limit_mbps,enable_priority_queuing,starvation_guard_thresholdset_priority(),set_bandwidth_limit(),set_token_bucket()enqueueSend()/dequeueForSend()— strict CRITICAL→HIGH→MEDIUM→LOW with starvation guard that forces a lower-priority dequeue afterstarvation_guard_thresholdconsecutive high-priority servesallowSend()hot path now enforces three shaping stages in order: token bucket → leaky bucket → congestion windowconfigureTc(TcConfig)— issuestc qdisc/tc classHTB commands; interface name validated against[a-zA-Z0-9._-]and rejected if leading-(prevents argument injection into tc)Audit fixes (post-implementation)
CongestionControllerwas tracking cwnd butallowSend()never checked it. Fixed:allowSend()now rejects sends wherequeue_depth + bytes > cwnd.ConnectionStatslacked CC observability: Addedcongestion_window,congestion_ssthresh_bytes,smoothed_rtt_usfields populated bygetConnectionStats().configureTc()now also rejects interface names beginning with-to prevent tc flag injection (e.g.-h,--help).ROADMAP updates
src/network/ROADMAP.md— completion entry with file references and test countsrc/ROADMAP.md— row Add comprehensive RAID cluster documentation for setup, monitoring, and troubleshooting #190 marked ✅src/network/FUTURE_ENHANCEMENTS.md— section updated with implementation statusType of Change
Testing
tests/test_bandwidth_management_qos.cpp(40 tests across 8 suites:LeakyBucketTest,PriorityQueueTest,FairQueueStarvationTest,CongestionControllerTest,BandwidthMbpsConfigTest,LinuxTcTest,PriorityLevelsTest,BandwidthQoSTest); all 40 pre-existingQoSManagerFocusedTestscontinue to pass📚 Research & Knowledge (wenn applicable)
/docs/research/angelegt?/docs/research/implementation_influence/eingetragen?Relevante Quellen:
Checklist
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.