Queue Depth Always 0 in My INT Implementation

I am working on an In-band Network Telemetry (INT) project using P4. However, I noticed that the queue depth in my INT metadata is always reported as 0, regardless of the network load. I have tried change the sleep from 1 to 0.000001, but the qdepth is still always 0.

Questions:

  • What could be the reason that queue depth is always 0?
  • Is there any specific configuration required in BMv2 (or hardware target) to enable queue depth measurement?
  • How can I debug queue occupancy in BMv2 to verify if packets are actually queued?

for bmv2 you need to set queue depth and queue rate from the simple_switch_CLI
please have a look at this page:

and look for set_queue_depth and set_queue_rate commands

after you do so, your packet rate should be higher than the value you set for set_queue_rate for packets to start queuing