Nate Foster dc08948a34
P4 Developer Day 2018 Spring (#159)
* Repository reorganization for 2018 Spring P4 Developer Day.

* Port tutorial exercises to P4Runtime with static controller (#156)

* Switch VM to a minimal Ubuntu 16.04 desktop image

* Add commands to install Protobuf Python bindings to user_bootstrap.sh

* Implement P4Runtime static controller for use in exercises

From the exercise perspective, the main difference is that control plane
rules are now specified using JSON files instead of CLI commands. Such
JSON files define rules that use the same name for tables, keys, etc. as
in the P4Info file.

All P4Runtime requests generated as part of the make run process are
logged in the exercise's “logs” directory, making it easier for students
to see the actual P4Runtime messages sent to the switch.

Only the "basic" exercise has been ported to use P4Runtime.
The "p4runtime" exercise has been updated to work with P4Runtime
protocol changes.

Known issues:
- make run hangs in case of errors when running the P4Runtime controller
    (probably due to gRPC stream channel threads not terminated properly)
- missing support for inserting table entries with default action
    (can specify in P4 program as a workaround)

* Force install protobuf python module

* Fixing Ctrl-C hang by shutdown switches

* Moving gRPC error print to function for readability

Unforuntately, if this gets moved out of the file, the process hangs.
We'll need to figure out how why later.

* Renaming ShutdownAllSwitches -> ShutdownAllSwitchConnections

* Reverting counter index change

* Porting the ECN exercise to use P4 Runtime Static Controller

* updating the README in the ecn exercise to reflect the change in rule files

* Allow set table default action in P4Runtime static controller

* Fixed undefined match string when printing P4Runtime table entry

* Updated basic_tunnel exercise to use P4Runtime controller.

* Changed default action in the basic exercise's ipv4_lpm table to drop

* Porting the MRI exercise to use P4runtime with static controller

* Updating readme to reflect the change of controller for mri

* Update calc exercise for P4Runtime static controller

* Port source_routing to P4 Runtime static controller (#157)

* Port Load Balance to P4 Runtime Static Controller (#158)
2018-06-01 02:54:33 -04:00
2018-06-01 02:54:33 -04:00
2018-06-01 02:54:33 -04:00
2018-06-01 02:54:33 -04:00
2015-09-30 17:20:24 -07:00
2018-06-01 02:54:33 -04:00

P4 Tutorial

Introduction

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 and Language Basics
  1. P4 Runtime and the Control Plane
  1. Monitoring and Debugging
  1. Advanced Data Structures
  1. Dynamic Behavior

Obtaining required software

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.

Otherwise, to complete the exercises, you will need to either build a virtual machine or install several dependencies.

To build the virtual machine:

  • Install Vagrant and VirtualBox
  • 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.

To install dependencies by hand, please reference the 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
Description
P4 dili tutoriallarinin Turkce cozumleri
Readme 59 MiB
Languages
P4 42.9%
Python 41.3%
Shell 6.7%
Emacs Lisp 4.2%
Vim Script 2.5%
Other 2.4%