The P4 community is proud to make available a wealth of software packages that enable you to get started on your data-plane programming journey.
Tutorials and Example Programs
A good starting point is our rich set of tutorials. Our tutorials are developed as hands-on labs, and contain everything to get you started with experimenting in P4: an overview of the language, sets of exercises that increase in complexity, and a virtual machine pre-installed with all the software such that you can directly jump into data-plane programming.
We have also released a data-center switch definition. It supports a large number of features, from L2/L3 processing, to Multicast, MPLS, ACL, SFLOW and even In-band Network Telemetry (INT).
- The P4C compiler for both
P414 and P416 language variants. The
compiler supports several backends:
- p4c-bmv2 – targets the behavioral model
- p4c-ebpf – targets the Extended Berkeley Packet Framework
- p4c-graphs – produces parser and table flow graph diagrams, and
- p4test – a simple frontend verifier for P4 programs. The infrastructure is designed to easily integrate vendor specific backends.
Behavioral Model (BMv2)
- The behavioral model, a simulation environment to run the P4 software switch, standalone or in Mininet. The behavioral model is an extensible framework that currently supports a P414 pipeline (simple_switch). However it allows you to easily simulate new archiectures by implementing new externs and enabling you to organize the forwarding elements as needed.
- The specification and reference implementation for P4 Runtime, a runtime API and protocol for controlling data-plane programs.
Packet Test Framework (PTF)
- A packet testing framework (PTF), written in Python, that enables configuring a switch and creating tests that send, receive, and verify packets of different formats. PTF interfaces with P4 Runtime.
- P4app, a Docker container pre-packaged with a development environment that makes it easy to compile and deploy P4 programs using simple configuration rules.
As your interest grows, we encourage you to participate and contribute your code. Please join the P4 Developer mailing list to get updates, ask questions, and get answers. Our community projects include a variety of tasks that can give you ideas on where to start contributing. Note that you or your organization must be a P4 member in order for us to accept your contributions.