• Learn

    Find what you are looking for at every stage of learning about P4 from beginner to expert. This page will help you navigate the available resources which are primarily located on GitHub and YouTube.

    You also have the opportunity to learn by interacting with the P4 community on the P4 forum, slack, and email lists.

    Educational Working Group

    The education working group has put together a Getting Started page that curates the links for tutorials, hardware compatibility, videos, and code samples.

    P4 Tutorials

    A good starting point is our rich set of tutorials. The tutorials are developed as hands-on labs, and contain everything to get you 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 so you can jump directly into data plane programming.

    Definitions

    Discourse is an excellent place to learn P4 terminology. For example, see this thread on bmv2, v1model, and P4_16. The P4 Specification also has a useful section on terminology.

    P4 Ecosystem

    Information about training and consulting service providers in the P4 Ecosystem are found here.

     

    Classes

    Graduate classes in P4 are available at a number of universities, including Stanford, Cambridge, Karlstads, and Lisbon. Learn about these classes and view materials here. Professors – you are invited to add the classes you teach to this page.

     

    P4 Blogs

    Some of the blogs on this website provide learning opportunities for beginners (e.g., Getting Started page), while other topics and new applications will resonate with experienced P4 programmers.

    GitHub

    Please feel free to browse our github repositories. All our code is released under the Apache 2.0 license.
    Here are some of the repositories you may be interested in:

    control ingress () {
         table routing {
              key = { hdr.ipv4.dstAddr : lpm; }
              actions = { drop; route; }
              size = 2048;
          }
          apply {
              routing.apply();
          }
    }

    Ready to try programming in P4?

    Try it out in our P4 Sandbox!

    TRY NOW

    Videos

    Resources to learn P4 are primarily found on Github and YouTube. This page is to help you find what you are looking for at every stage of development. As an open source community, we rely on your help to keep this information current.

    You can also learn by engaging with the P4 community on our forum, slack, and email lists.

    P4 YOUTUBE CHANNEL

    Highlights

    Check all the exciting talks that were included in the 2022 P4 Workshop. It includes insightful keynotes, tech talks, demos and tutorials from a wide range of P4 community members.

    Checkout YouTube playlists from past P4 Events or check out the full list of past events and information here.

    In addition to the P4-specific events, many ONF events also contain P4 topics. Browse the ONF event archives.Enjoy a short P4 introduction in four parts: