This repository provides the code of SP-PIFO and my implementation of SP-PIFO on BMv2.
Authors' github: https://github.com/nsg-ethz/SP-PIFO/tree/master
Official document of SP-PIFO: https://www.usenix.org/conference/nsdi20/presentation/alcoz
About the simulation environment, I use the latest Development VM which has necessary P4 developement tools provided here: https://github.com/jafingerhut/p4-guide/blob/master/bin/README-install-troubleshooting.md
I clone p4-learning repository (https://github.com/nsg-ethz/p4-learning/tree/master) to the VM and using that repo to run exercises.
The sp-pifo folder in this repository includes:
Topology To run the code, go to the terminal and enter the command:
sudo python3 network.py
This will compile the p4 code and also generate the topology in Mininet:
SP-PIFO uses ranking mechanism to select a priority queue for each packet. According to the authors, the rank can be computed in the switch or in the end-host and read it from the switch. The current code in the authors' github is for the case in which you compute the rank at the end host, tag it into the ToS field of IP packets, and read it for the switch.
In my case, I write a function in
send.py
to randomly set the packet size for each packet before sending it and use the packet size for ranking mechanism where smaller sizes have higher priority. In addition, I tag the standard_metatata.qid
to ToS fields of IP packets to distinguish different priority queues.
Sending packets between two hosts using
xterm
commands in Mininet.
For example, I send 10 packets from h1 to h3: The result of the ranking mechanism can be checked by using CLI of simple_switch to read the register used to capture queue bound values: Or using .log files in the log folder generated after compiling the code
If you want to delete log and pcap folder, hit
Ctrl+D
to exit Mininet and enter the command:
sudo make clean