Skip to content

tuananh01/SP-PIFO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 

Repository files navigation

SP-PIFO

This repository provides the code of SP-PIFO and my implementation of SP-PIFO on BMv2.

Original work

Authors' github: https://github.com/nsg-ethz/SP-PIFO/tree/master
Official document of SP-PIFO: https://www.usenix.org/conference/nsdi20/presentation/alcoz

My implementation

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:

  • sp-pifo.p4: p4_16 code of SP-PIFO
  • network.py: Used to create network topology
  • send.py: Python code using Scapy library used to create and send packets
  • receive.py: Python code using Scapy library used to receive packets
  • sw_commands folder: Contain .txt files used to configure forwarding rules for switches


  • 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

    About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published