Hello everyone,
I have interest in the progammable packet scheduler on TM of the P4 targets. And, I have started testing in Python/Simpy an abstract achitectural model that allows programming of the TM packets scheduling mechanism. In my simulation environment, I able to program a hierachical packet scheduling algoritms. As example, SP-FIFO, SP-FIFO-DRR, SP-FIFO-WRR, and SP-FIFO-PFABRIC packet scheduling algorithms were successful programmed for TM.
I am looking how to implement the same abstract programmable packet scheduler architecture on bmv2 or tofino2.
Can you share any work related to the programmable packet scheduler on bmv2 or tofino2?
How can I use the Python codes from my simulation as extern functions for bmv2/tofino TM?
The traffic manager of low-(cost,power)-per-Tbps devices like Tofino and other data center switch ASICs are typically quite configurable, e.g. up to a certain number of class-of-service queues per output port, with configurable scheduling policies like strict priority, weighted fair queueing, etc.
However, the scheduling algorithms must be able to make a scheduling decision at billions of packets per second, which is typically implemented in configurable ASIC logic, which is not programmable via P4 or any other programming language.
It is likely possible to make such scheduling algorithms more programmable, but with the tradeoff of making such an ASIC significantly more expensive and/or power-consuming per Tbps of throughput.
BMv2 and P4-DPDK are software switches that run on general purpose CPUs like x86 and ARM CPUs, and can thus run whatever software. you program on them, with the tradeoff that the more computation you do per packet, the lower the packet forwarding rate will be. BMv2 is written in C++, so if you can figure out a way to have that C++ code call out to your Python code, it would be possible to do what you are asking, but likely the packet processing rate would be reduced not only by the C++/Python calling overhead, but also by the fact that Python is typically an interpreted language. As long as you are not concerned with very high packet processing rates, it is definitely achievable.
Hello Andy,
Thank you for your response. Really appreciated!
I will be looking at BMv2 C++ code calling out to my Python code. In that perspective, I will like to have v1model architecture in P4studio. But my sde 9.7.0 does not have v1model package.
Do you know how to install v1model architecture package in sde 9.7.0?