Feat/traffic manager egress#26
Open
Vineet1101 wants to merge 3 commits 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.
Builds on the standalone VOQ + fabric core (P1-P2). Adds the ns-3
event-driven timing model and the egress side, all thread-free.
P3 - Event-driven fabric loop (opt-in via the "EventDriven" attribute;
default off preserves the manual RunFabricScheduler()/DequeueFromVoq()
API used by the low-level unit tests):
* EnqueueToVoq arms a self-clocking fabric round (Simulator::Schedule).
* Each round applies the scheduler's grants (VOQ -> egress) and re-arms
while demand remains; the fabric is busy for the arbitration delay plus
the transfer time of the largest granted packet (FabricRate).
P4 - Egress side:
* Per-output-port strict-priority queues (8 levels, 7 = highest).
* Serialising egress scheduler: non-preemptive, one packet in service per
port, next packet chosen by strict priority, serialised at PortRate.
* Egress finite-buffer accounting (per-port + per-queue) with
EGRESS_PORT_BUFFER_FULL / EGRESS_QUEUE_FULL drop reasons.
* Byte-neutral VOQ->egress hand-off keeps the global counter consistent
(a packet is counted in global for its whole residence).
* TransmitCallback delivery hook (move-only payload) for wiring to an
ns-3 NetDevice at integration time; egress/total delay traces + stats.
DoDispose cancels pending fabric/egress events.
Adds 3 cases exercising the event-driven path under Simulator::Run,
bringing the suite to 9 (all passing on ns-3.39):
* end-to-end drain: a permutation demand is arbitrated, moved to egress
and serialised to the wire; buffers empty and every packet delivered
via TransmitCallback.
* egress strict priority: a packet in service is not preempted, but the
highest-priority waiting packet goes next (order 2, 7, 5).
* egress overflow: a full egress queue drops with EGRESS_QUEUE_FULL while
the granted-from-VOQ count still advances.
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.