BMv2 Code for Purdue CS590 Final Project Demo:
Applying P4 switch as the cache of Key-Value Store
Presentation slides: link
This code can be compiled and loaded as a bmv2 application. Testing the code requires bmv2 installation and mininet environment.
Download the VM image with preinstalled p4c and bmv2 environment from here and boot the VM.
To change the network topology in mininet, edit the configuration file ./pod-topo/topology.json
.
To modify the match-action rule installed in bmv2 switch when creating the environment (only have one switch in default topology), edit the configuration file ./pod-topo/s1-runtime.json
.
After booting the VM, Move the folders into ~/tutorials/exercises
.
Under ~/tutorials/exercises/<folder name>
, prompt
make run
then basic.p4
will be compiled and the mininet environment will be set up.
In the mininet CLI, prompt
xterm h1
xterm h2
to open virtual host h1
and h2
's CLI window.
For the host acting as a KVStore server, prompt
./kVStore.py
and the Key-Value Store server will start and print the received packets.
For the host acting as a client, prompt
./send.py <destination IP> (read|write) <key> <value>
to send the packet.
To observe the packet sent and received by client, open the new xterm window and prompt
tcpdump udp --nnvvXSs 1514
to monitor all UDP packet traffics.
cache:
cache_demo.mp4
multi_cache:
(will be uploaded)