Skip to content

Feat/traffic manager egress#26

Open
Vineet1101 wants to merge 3 commits into
HapCommSys:switch_channelfrom
Vineet1101:feat/traffic-manager-egress
Open

Feat/traffic manager egress#26
Vineet1101 wants to merge 3 commits into
HapCommSys:switch_channelfrom
Vineet1101:feat/traffic-manager-egress

Conversation

@Vineet1101

Copy link
Copy Markdown
Collaborator

No description provided.

…(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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant