/NetVRM

interesting apps

Primary LanguageC++Apache License 2.0Apache-2.0

0. Introduction

This repository contains one version of the source code for our NSDI'22 paper "NetVRM: Virtual Register Memory for Programmable Networks".

1. Content

  • switch_code/
    • p4/: p4 code for NetVRM in the Wide Area Network (WAN) scenario.
      • includes/: packet header and parser.
      • netvrm_wan.p4: the main ingress and egress pipeline.
      • utils.p4: the page table and counter record.
      • shared_ht.p4: the virtualized register memory of the first four stages.
      • shared_ht_ext1.p4: the virtualized register memory of the last four stages.
    • netvrm_c/
      • src/
        • application.hpp describes the class Application, which represents an app instance. The class also contains a method to generate the application workload given the corresponding parameters.
        • options.hpp describes all the runtime arguments.
        • switch.hpp describes the class Switch.
      • tests/
        • test.hpp is the parent class Test and contains methods to commit updates to the data plane.
        • equal-active-test.hpp is the class EqualActiveTest inheriting from Test, and realizes the Equal-Active approach.
        • equal-all-test.hpp is the class EqualAllTest inheriting from Test, and realizes the Equal-All approach.
        • netvrm-test.hpp is the class NetVRMTest inheriting from Test, and realizes the NetVRM approach.
  • config.py: some parameters to configure.
  • console.py: the python script to help run the experiments.
  • README.md: This file.

2. Environment requirement

  • Hardware
    • Intel Tofino switch
    • Servers with a DPDK-compatible NIC (we used an Intel XL710 for 40GbE QSFP+)
  • Software
    • Intel P4 Studio (8.9.1)
  • Datasets

3. How to run

  • Configure the parameters in the files based on your environment
    • config.py: provide the information of your servers (passwd, dir, etc.).
  • Environment setup
    • Setup the switch
      • Copy the files to the switch with python console.py sync_switch
      • Setup the necessary environment variables to point to the appropriate locations.
      • Compile netvrm_wan.p4 in your P4 Studio.
    • Setup the clients
  • Compile and run the switch program
    • python console.py run_switch
  • Other commands
    • python console.py replay_caida: replay the CAIDA traces on the end-hosts.
    • python console.py kill_replay: terminate the CAIDA trace replay.
  • Reproduce the results
    • python console.py run_hh: run heavy hitter detection apps in WAN scenario.
    • python console.py run_opentcp: run newly opened TCP connection detection apps in WAN scenario.
    • python console.py run_ss: run superspreader detection apps in WAN scenario.
    • python console.py run_slo: study the impact of the utility target.
    • python console.py run_ar: study the impact of the number of application instances.
    • python console.py run_alloc_epoch: study the impact of the allocation epoch.

5. Contact

For any question, please contact hzhu at jhu dot edu.