Skip to content

Feat/queue disc integration#22

Open
Vineet1101 wants to merge 3 commits into
HapCommSys:switch_channelfrom
Vineet1101:feat/queue-disc_integration
Open

Feat/queue disc integration#22
Vineet1101 wants to merge 3 commits into
HapCommSys:switch_channelfrom
Vineet1101:feat/queue-disc_integration

Conversation

@Vineet1101

Copy link
Copy Markdown
Collaborator

This pr adds support for queue-disc inside p4sim

Signed-off-by: Vineet1101 <vineetgoel692@gmail.com>
Signed-off-by: Vineet1101 <vineetgoel692@gmail.com>
…uler

Introduce P4SwitchQueueItem as a concrete QueueDiscItem subclass that
wraps post-pipeline Ethernet frames with egress port metadata.

Integrate ns-3 QueueDisc into EventDrivenEgressDequeue:
- If a QueueDisc is installed on a port, packets are buffered there
  after egress pipeline processing; TryTransmitFromQueueDisc() drains
  the QueueDisc onto the wire when the port is free.
- If no QueueDisc is installed, the direct transmit path is taken
  (backwards-compatible with existing behavior).

Fix critical control-flow bug: busy flag and PortTxComplete scheduling
were previously unconditional, causing the port to deadlock when the
QueueDisc path was taken.

Update PortTxComplete to drain QueueDisc (priority 1) before checking
the BMv2 egress_buffer (priority 2).

Add SetPortQueueDisc() public API with auto-initialization following
ns-3's TrafficControlLayer pattern.

Remove dead output_buffer member references.
@Mingyumaz

Copy link
Copy Markdown
Contributor

Overall, the changes look fine to me. I still need to run more detailed tests locally, so you may wait until I finish the testing, and then we can summarize and address all comments together.

I have two minor suggestions for now:

  1. Could we rename switched-ethernet-host-device.h to eth-net-device.h? I think this name is shorter and more consistent with the Ethernet-related device abstraction.
  2. Please add your name and email address to the header of the files you modified, so that you are listed as the author in code.

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