Priority queueing

Hello everyone,

I’m using the latest Development VM released in April and working on p4-learning repo.
I’ve read the BMv2 Simple Switch article and also looked into the multiqueuing.p4 example. They all said that if I want to use multiple priority queues, I have to uncomment the line:
#define SSWITCH_PRIORITY_QUEUEING_ON

But when I go to the simple_switch.h file at the directory /home/vagrant/behavioral-model/targets/simple_switch, I can’t find the above line, what I saw is in the following image:


So my question is do I need to type the line #define SSWITCH_PRIORITY_QUEUEING_ON like you see in the image, then compile and install bmv2 again to use the feature?

Also when I scroll down, I see this:
image
Am I supposed to changes the default_nb_queues_per_port = 1 to another value? Does changing this value has the same effect as I use multiple priority queues?

So far I’ve added the line mentioned above and also compiled and installed bmv2 again but when I test the multiqueuing.p4 example, just only 1 flow can send to h3, the other flow has no information on the iperf server on h3. Do you have any solution?

Thanks!

As of about 2022-Apr some time, there was a change made to the behavioral-model code [1] such that by default there is 1 queue per output port, but you can change this by a command line option --priority-queues 8 to change it to 8 queues per output port (replace the example 8 with any other number you prefer). It is not necessary to change the source code and recompile in order for this to work.

When you run simple_switch_grpc --help to see the command line options, it should appear in the output of that command. Note that --priority-queues is in a list of “target-specific” options, and somewhere on the command line before --priority-queues 8 you must have -- as an option by itself, to separate earlier not-target-specific options from later target-specific options.

[1] simple_switch: make the number of queues a command line option (#1101) · p4lang/behavioral-model@adff022 (github.com)