• 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.

    As an open source community, we rely on your participation to keep this information current. We welcome suggestions and contributions to help others learn about P4!

    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.

    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 with P4), 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:

    table routing {
          key = { ipv4.dstAddr : lpm; }
          actions = { drop; route; }
          size : 204 8;
    }
    control ingress() {
          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 2021 P4 Workshop. It includes insightful keynotes, tech talks, demos and tutorials from a wide range of P4 community members.

    View in-depth use cases from plenary sessions during the 2020 P4 Expert Roundtable Series:

    Browse the YouTube playlists from all the 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: