A joint presentation by Stanford University and P4 Language Consortium.


Held at Arrillaga Alumni Center, Stanford University on Friday, November 10, 2017.


We would like to thank our sponsors for their support:

  ATT Barefoot Cisco Google  


8:00 - 8:30am
  • Registration and Breakfast

8:30 - 9:00am
  • Technical Set-up for Hands-on Lab
    • In order to complete the exercises at the Fall 2017 P4 Developer Day, we have created a virtual machine that has all of the required software installed. Note that this download and setup can take around 45 minutes.
    • To build the virtual machine:
      • Step 1: Install VirtualBox https://virtualbox.org/
      • Step 2: Install Vagrant: https://vagrantup.com/
      • Step 3: Clone the tutorial repository:
        $ git clone https://github.com/p4lang/tutorials
      • Step 4: Go to the vm directory:
        $ cd tutorials/P4D2_2017_Fall/vm/
      • Step 5: Build the virtual machine:
        $ vagrant up
      • Step 6: Login and restart: 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.

9:00 - 9:10am
  • Welcome and Introductions
    • Robert Soulé, Università della Svizzera Italiana (USI) 
  • Video for this session is available here.
9:10 - 10:45am
  • Introduction to Data Plane Programming
  • Language Basics
    • by Stephen Ibanez, Stanford University
Session 1 will provide a hand-on introduction to P4. Students will start by implementing a "Hello World"-style application to gain an understanding of P4 concepts. The lesson will progressively introduce core language features, such as header/metadata types, packet parsers, and controls. By the end of this session, students will be able to implement a basic IP router.
  • Slides for this session are available here.
  • Video for this session is available here.

10:45 - 11:15am
  • Break

11:15 - 12:00pm
  • Software Tools and P4 Runtime
    • by Carmelo Cascone and Brian O'Connor, Open Networking Foundation (ONF)
Session 2 will cover software tools that are essential to developing P4 applications. Students will learn how to invoke the the P4 compiler, run the debugger, and start a P4 software switch. This session will also introduce the control-plane interfaces via P4 Runtime, a protocol-independent API auto-generated from the definition of a packet processing pipeline written in P4.
  • Slides for this session are available here.
  • Video for this session is available here.

12:00 - 1:30pm
  • Lunch

1:30 - 3:00pm
  • Monitoring and Debugging
    • by Mina Tahmasbi (Princeton University)
Session 3 will focus on a set of labs related to network monitoring and debugging. In this session, students will gain a deeper understanding of P4 language concepts, including custom headers and intrinsic metadata. In the first exercise, students will implement Explicit Congestion Notification (ECN) to set a congestion bit in a packet header when the queue depth exceeds a threshold. In the second exercise, MRI, students will implement a simplified version of In-Band Network Telemetry to track the path that packets travel through the network.
  • Slides for this session are available here.
  • Video for this session is available here.

3:00 - 3:30pm
  • Break

3:30 - 4:50pm
  • Advanced Data Structures
    • by Samar Abdi (Google)
Session 4 covers advanced data structures. In this session, students will implement two data-plane applications. In the first, source routing, end-hosts specify paths through the network by using a stack of labels in the packet header. The switch must “pop” each label and forward out the appropriate interface. In the second, students will implement a network calculator. Packets containing arithmetic expressions are sent to a switch. The switch will evaluate the expressions, and return the results back to the sender.
  • Slides for this session are available here.
  • Video for this session is available here.

4:50 - 5:00pm
  • Break

5:00 - 5:10pm
  • Closing Remarks
    • by Robert Soulé, Università della Svizzera Italiana (USI)
  • Slides for this session is available here.

5:10 - 6:00pm
  • Panel Discussion
    • Dejan Vucinic, Western Digital
    • Mario Baldi, Cisco Systems
    • Anirudh Sivaraman, NYU
    • Anurag Agrawal, Barefoot Networks
  • Video for this session is available here.

6:00 - 7:00pm
  • Reception