Skip to content

Feat/traffic manager voq - #25

Open
Vineet1101 wants to merge 1 commit into
HapCommSys:switch_channelfrom
Vineet1101:feat/traffic-manager-voq
Open

Feat/traffic manager voq#25
Vineet1101 wants to merge 1 commit into
HapCommSys:switch_channelfrom
Vineet1101:feat/traffic-manager-voq

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.
@Vineet1101
Vineet1101 force-pushed the feat/traffic-manager-voq branch from 014bdd3 to 7f82135 Compare July 4, 2026 14:56
@Mingyumaz
Mingyumaz requested a balanced review from Copilot August 10, 2026 22:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Mingyumaz Mingyumaz mentioned this pull request Aug 24, 2026
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>
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.

2 participants