This repository contains one version of the source code for our NSDI'22 paper "NetVRM: Virtual Register Memory for Programmable Networks".
- 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.hppdescribes the classApplication, which represents an app instance. The class also contains a method to generate the application workload given the corresponding parameters.options.hppdescribes all the runtime arguments.switch.hppdescribes the classSwitch.
- tests/
test.hppis the parent classTestand contains methods to commit updates to the data plane.equal-active-test.hppis the classEqualActiveTestinheriting fromTest, and realizes the Equal-Active approach.equal-all-test.hppis the classEqualAllTestinheriting fromTest, and realizes the Equal-All approach.netvrm-test.hppis the classNetVRMTestinheriting fromTest, and realizes the NetVRM approach.
- src/
- p4/: p4 code for NetVRM in the Wide Area Network (WAN) scenario.
config.py: some parameters to configure.console.py: the python script to help run the experiments.README.md: This file.
- Hardware
- Intel Tofino switch
- Servers with a DPDK-compatible NIC (we used an Intel XL710 for 40GbE QSFP+)
- Intel Tofino switch
- Software
- Intel P4 Studio (8.9.1)
- Intel P4 Studio (8.9.1)
- Datasets
- 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.p4in your P4 Studio.
- Copy the files to the switch with
- Setup the clients
- Please refer to MoonGen.
- Please refer to MoonGen.
- Setup the switch
- 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.
For any question, please contact hzhu at jhu dot edu.