Adding starter code and solution for p4runtime exercise (#81)

Summary of changes:
- Adding the p4runtime starter code and solution.
- Adding NO_P4, BMV2_SWITCH_EXE and P4C_ARGS to utils/Makefile
- Updated p4runtime/Makefile to use variables
- Adding conversion functions for match and action param values
- Separating P4Info and P4Runtime libraries
- Updating global README and adding p4runtime/README.md
- Disabling screen saver on VM GUI
- Adding desktop icons for Terminal, Wireshare and Sublime Text
- Updating topo.pdf -> png for Markdown viewing in basic_tunnel and
  p4runtime READMEs
This commit is contained in:
Brian O'Connor
2017-11-07 07:54:59 -08:00
committed by Robert Soule
parent ce7c3c372b
commit 3d4a2f5748
19 changed files with 789 additions and 322 deletions

View File

@@ -7,24 +7,27 @@ Welcome to the P4 Tutorial!
We've prepared a set of exercises to help you get started with P4
programming, organized into four modules:
1. Introduction
1. Introduction and Language Basics
* [Basic Forwarding](./basic)
* [Basic Tunneling](./basic_tunnel)
2. Monitoring and Debugging
2. P4 Runtime and the Control Plane
* [P4 Runtime](./p4runtime)
3. Monitoring and Debugging
* [Explicit Congestion Notification](./ecn)
* [Multi-Hop Route Inspection](./mri)
3. Advanced Data Structures
4. Advanced Data Structures
* [Source Routing](./source_routing)
* [Calculator](./calc)
4. Dynamic Behavior
5. Dynamic Behavior
* [Load Balancing](./load_balance)
## Obtaining required software
If you are starting this tutorial at SIGCOMM 2017, then we've already
If you are starting this tutorial at the Fall 2017 P4 Developer Day, then we've already
provided you with a virtual machine that has all of the required
software installed.
@@ -36,25 +39,11 @@ To build the virtual machine:
- `cd vm`
- `vagrant up`
- Log in with username `p4` and password `p4` and issue the command `sudo shutdown -r now`
- When the machine reboots, you should have a graphical desktop machine with the required software pre-installed.
- When the machine reboots, you should have a graphical desktop machine with the required
software pre-installed.
To install dependences by hand:
- `git clone https://github.com/p4lang/behavioral-model.git`
- `git clone https://github.com/p4lang/p4c`
- `git clone https://github.com/p4lang/tutorials`
Then follow the instructions for how to build each package. Each of
these repositories come with dependencies, which can be installed
using the supplied instructions. The first repository
([behavioral-model](https://github.com/p4lang/behavioral-model))
contains the P4 behavioral model. It is a C++ software switch that
will implement the functionality specified in your P4 program. The
second repository ([p4c](https://github.com/p4lang/p4c-bm)) is the
compiler for the behavioral model. It takes P4 program and produces a
JSON file which can be loaded by the behavioral model. The third
repository ([tutorial](https://github.com/p4lang/tutorial)) is the P4
Tutorial itself. You will also need to install `mininet`. On Ubuntu,
it would look like this:
```
$ sudo apt-get install mininet
```
To install dependencies by hand, please reference the [vm](../vm) installation scripts.
They contain the dependencies, versions, and installation procedure.
You can run them directly on an Ubuntu 16.04 machine:
- `sudo ./root-bootstrap.sh`
- `sudo ./user-bootstrap.sh`