Feat/traffic manager voq - #25
Open
Vineet1101 wants to merge 1 commit into
Open
Conversation
…(P1-P2)
First stage of the high-fidelity Traffic Manager that will replace the
output-only NSQueueingLogicPriRL scheduler. This lands the standalone,
event-driven, thread-free core; it is not yet wired into P4CoreV1model.
P1 - Input-side VOQ + accounting:
* VOQ[in][out][priority], 8 priority levels (7 = highest), N*N*8 queues,
stored flat because TmItem is move-only.
* Finite-buffer accounting: global / per-input / per-VOQ byte counters
with configurable limits (0 = unlimited).
* Admission control with explicit drop reasons (global, input, VOQ full);
egress drop reasons defined for later phases.
* Modular packet-format boundary: carries an opaque move-only TmPayload,
never assumes ns3::Packet (bm::Packet wrapper comes with integration).
* TracedCallbacks (enqueue/dequeue/drop/delays) and cumulative TmStats.
P2 - Fabric scheduler:
* Priority-first maximal matching (one input and one output per round),
behind an overridable DoRunFabricScheduler() so iSLIP / round-robin can
drop in later.
Tests (test/p4-traffic-manager-test-suite.cc, 6 cases, all passing on
ns-3.39): enqueue/dequeue + accounting, priority scheduling, per-input VOQ
isolation, one-in/one-out matching, drop-reason correctness, and delay
measurement in simulated time.
Vineet1101
force-pushed
the
feat/traffic-manager-voq
branch
from
July 4, 2026 14:56
014bdd3 to
7f82135
Compare
Vineet1101
added a commit
to Vineet1101/P4Simulator
that referenced
this pull request
Aug 25, 2026
…ne events Address review feedback on the completion-driven egress path (HapCommSys#25-HapCommSys#28): - NotifyEgressTxComplete() now takes a TmTxOutcome instead of a hardcoded success=true. A frame the egress pipeline drop()s, or one that is recirculate()d, is no longer counted as transmitted: SendNs3Packet() and TransmitOn() report whether the frame actually reached the wire and hand back its serialisation time (so it is not recomputed independently and cannot drift). A new totalRecirculated counter and a new EGRESS_POST_DEQUEUE_DROP drop reason keep recirculated frames distinct from real drops, and post-dequeue drops now show up in the drop totals instead of being silently lost from the conservation counters. - P4CoreV1model records each pending TmNotifyTxDone EventId in m_pendingTxDone and cancels them in its destructor before disposing the Traffic Manager, closing the same mid-simulation teardown race the TM Dispose() change was meant to close. - Wire test/channel-state-test-suite.cc into TEST_SOURCES so its regression tests actually run, and fix the stale CheckPropagating assertion (IsBusy() is false while only PROPAGATING, matching the other cases). Signed-off-by: Vineet1101 <vineetgoel692@gmail.com>
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.
No description provided.