How to manage set_queue_rate command?


I have a fattree topology in mininet and try to congest queues. So, I used the set_queue_rate command explained by @antonin here. Everything was fine, and I could see standard_metadata.enq_qdepth and standard_metadata.deq_qdepth; however, I found that only switch number 1 is affected by the set_queue_rate command. For example, when I try to produce congestion between two nodes that switch 1 is not included on their path, I see standard_metadata.enq_qdepth and standard_metadata.deq_qdepth are always zero. What is the explanation for this? Does the set_queue_rate command only affect one switch? (If yes, how can I manage the affected switch?)


From your link:

“I believe the default queue size in bmv2 is 64 packets. This can be changed using the runtime API. The simple_switch_CLI has a set_queue_depth command”

Have you pointed the CLI to all switches’ thrift port?

From: Control Plane · nsg-ethz/p4-learning Wiki · GitHub

To get the switch client simply run:

simple_switch_CLI --thrift-port <port>

The client connect to the Thrift server running in each switch process. 9090 is the default port number but of course if you are running several devices on your machine, you will need to provide a different port for each. One client instance can only connect to one switch device.

If I am not mistaken you get all ports for all switches when you run Mininet, right? :face_with_monocle:

I still think the ports increment by 1 per switch in your topology. I believe S1 will be 9090 but S2 should be 9091, S3 will be 9092 and so on. I believe there is also another CLI tool if you connect to 50051 (grpc for S1) but note sure if I tried it before.


1 Like

Thank you @ederollora.
I was assuming running simple_switch_CLI will affect all switches, but it seems that it is equivalent to running simple_switch_CLI --thrift-port 9090; so, I was managing only the first switch. Now, I should connect to all switches one by one and then run the set_queue_rate command for all of them.