I want to visualize the flow passing through the P4 switch. At first, I wanted to use the sflow tool, but it seems that the P4 switch is not yet supported.
I’d like to ask for help with a way to display the flow going through the switch in real time.
Thanks in advance!
I think it would make sense for you to better articulate what you are trying to achieve, because the word “visualize” is not very concrete. For example, blinking LEDs by the Ethernet ports are also a form a visualization, but I doubt that is what you are looking for.
sFlow is just a basic mechanism that allows one to randomly sample packets. It does not provide any specific information, e.g. with regards to how the packets pass through the switch or anything.
Implementing sFlow in P4 is pretty trivial, but that implementation needs to be integrated into the overall data plane algorithm by the designer of that algorithm – there is no generic “drop-in” solution. A number of network equipment designers who ship their products, based, say, on Intel Tofino™ have implemented sFlow as part of their offerings.