Giter Site home page Giter Site logo

p4kvcache's Introduction

P4KVCache

BMv2 Code for Purdue CS590 Final Project Demo:

Applying P4 switch as the cache of Key-Value Store

Presentation slides: link

Get Started

This code can be compiled and loaded as a bmv2 application. Testing the code requires bmv2 installation and mininet environment.

Install Environment

Download the VM image with preinstalled p4c and bmv2 environment from here and boot the VM.

Config the Test Environment

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.

Test the code

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.

Test Demo

cache:

cache_demo.mp4

multi_cache:

(will be uploaded)

p4kvcache's People

Contributors

raymondhuang210129 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.