# What is the queue management approach in P4?

**URL:** https://forum.p4.org/t/what-is-the-queue-management-approach-in-p4/273
**Category:** Uncategorized
**Created:** [March 15, 2022, 9:31am UTC](https://forum.p4.org/t/what-is-the-queue-management-approach-in-p4/273 "2022-03-15T09:31:45Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![andyfingerhut](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.p4.org/andyfingerhut/32/17_2.png) [@andyfingerhut](https://forum.p4.org/u/andyfingerhut)
#### Post date: [December 12, 2022, 6:41am UTC](https://forum.p4.org/t/what-is-the-queue-management-approach-in-p4/273/10 "2022-12-12T06:41:03Z")

</div>

Q1: There is no direct way designed into the v1model architecture to read queue depths from ingress.

You could implement a way with some P4 code written by you, and probably a bit of control plane code as well, that would periodically send packets through ingress, then egress, where packet X would read queue depth X in egress, then recirculate, then write queue depth X in a P4 register in ingress. You would need different packets to update the P4 register for each different queue number X you wanted to be kept relatively up to date in ingress. Then your “normal” data packets could read that P4 register in ingress to get a relatively recent value of the queue depth. The more often the updater packets are sent through, the more up-to-date the queue depth values readable in ingress will be.

Q2: There is no direct way to dequeue a packet from one queue and then enqueue it into another queue. There is likely a way that you could, in egress, perform an egress-to-egress mirror/clone operation on the packet, to a clone session that will send the cloned copy to the desired output queue you want.

---

_[View the full topic](https://forum.p4.org/t/what-is-the-queue-management-approach-in-p4/273)._
