How can I send packets to different priority queues and set the rates for different queues in the latest version of BMv2? I am currently using the following P4 code to set the priority:
Can anyone provide guidance on how to properly send packets to different priority queues and set the rates for those queues in the latest version of BMv2?
With today’s BMv2 source code, it requires modifying it and recompiling simple_switch and/or simple_switch_grpc in order to enable more than one FIFO queue per output port. Without changing the source code, there is only one FIFO queue per output port. See this Github issue for the (small) source code changes required: Does simple_switch_grpc support priority queue ? · Issue #877 · p4lang/behavioral-model · GitHub
There are real hardware devices, e.g. Xilinx FPGAs, Tofino switch ASICs, NICs from multiple vendors, etc.
There is a DPDK software switch, but its current implementation of PSA does not implement egress, nor the traffic manager, so if the reason you are looking for alternatives is to find one that implements multiple class of service FIFO queues per output port, then it will not help you with that, unless you implement them yourself or find someone willing to do it for you: p4c/backends/dpdk at main · p4lang/p4c (github.com)