Skip to content
@p4lang

p4language

Home to all official projects of the P4 language organization.

P4 Language Consortium

Welcome to the official GitHub organization for the P4 Language Consortium. This organization hosts the open-source ecosystem for P4, a domain-specific language used to specify how data plane devices process packets.

Our ecosystem provides the tools needed to develop, compile, test, and control P4 programs.

Major Repositories

Language, Compilers and Toolchains

  • p4-spec: The official specification documents for the P4 language and its core architectures.
  • p4c: The official reference compiler for the P4_16 programming language.
  • p4mlir-incubator: An experimental project to integrate the MLIR compiler framework into P4C.
  • p4-constraints: A framework for defining and enforcing constraints on P4 objects at runtime.

Data Plane Targets

  • behavioral-model: The reference P4 software switch, commonly referred to as bmv2.
  • p4-dpdk-target: The P4 driver software for the P4 DPDK software target.
  • open-p4studio: An open-source environment and implementation of P4Studio.

Control Plane and APIs

  • p4runtime: The specification documents and protobuf definitions for the P4Runtime control-plane API.
  • PI: An implementation framework for a P4Runtime server that acts as a bridge between the control plane and the data plane.
  • ptf: The Packet Test Framework, a Python-based framework designed for data plane validation.

Governance

  • .github: Organization-wide policy, governance documents, and issue templates.
  • governance: Legal documents of the P4 Language Organization.

Education and Community

  • tutorials: Practical exercises, virtual machine environments, and tutorials for learning the P4 language.
  • project-ideas: A curated collection of ideas for prospective community and academic P4 projects.
  • gsoc: Documentation and tracking for the P4 organization's participation in Google Summer of Code.

Archived Repositories

The following repositories have been archived and are maintained in a read-only state for historical purposes. They are no longer actively developed.

  • p4factory: An early development environment for compiling P4 programs and building software switches.
  • p4c-bm: The legacy compiler preprocessor designed for the P4 behavioral model.
  • p4-hlir: The Python source code for parsing the older P4_14 standard and producing the High-Level Intermediate Representation.
  • p4c-behavioral: The original C-based reference compiler implementation for the P4 language.
  • switch: A consolidated switch repository containing the legacy switch.p4 sample program and associated libraries.
  • ntf: The legacy Network Test Framework previously used for software switch testing.
  • papers: A collection of historical academic papers and demonstrations related to the initial development of P4.

Pinned Loading

  1. project-ideas project-ideas Public

    Ideas for P4 Projects.

    15 3

  2. behavioral-model behavioral-model Public

    The reference P4 software switch

    C++ 631 386

  3. tutorials tutorials Public

    P4 language tutorials

    Python 1.6k 938

  4. p4c p4c Public

    P4_16 reference compiler

    C++ 814 511

  5. p4-spec p4-spec Public

    TeX 198 89

  6. PI PI Public

    An implementation framework for a P4Runtime server

    C++ 177 116

Repositories

Showing 10 of 48 repositories
  • p4mlir-incubator Public

    An experimental project to bring MLIR to P4C.

    p4lang/p4mlir-incubator’s past year of commit activity
    MLIR 10 Apache-2.0 22 56 (4 issues need help) 20 Updated Mar 31, 2026
  • p4c Public

    P4_16 reference compiler

    p4lang/p4c’s past year of commit activity
    C++ 814 Apache-2.0 511 371 97 Updated Mar 30, 2026
  • tutorials Public

    P4 language tutorials

    p4lang/tutorials’s past year of commit activity
    Python 1,558 Apache-2.0 938 9 9 Updated Mar 30, 2026
  • third-party Public

    Third-party dependencies for p4lang software

    p4lang/third-party’s past year of commit activity
    Dockerfile 8 13 0 5 Updated Mar 29, 2026
  • behavioral-model Public

    The reference P4 software switch

    p4lang/behavioral-model’s past year of commit activity
    C++ 631 Apache-2.0 386 45 (2 issues need help) 17 Updated Mar 29, 2026
  • ptf Public

    Packet Test Framework

    p4lang/ptf’s past year of commit activity
    Python 166 Apache-2.0 111 15 11 Updated Mar 29, 2026
  • gsoc Public

    P4.org's Participation in Google Summer of Code

    p4lang/gsoc’s past year of commit activity
    31 Apache-2.0 23 3 1 Updated Mar 23, 2026
  • p4runtime Public

    Specification documents for the P4Runtime control-plane API

    p4lang/p4runtime’s past year of commit activity
    Python 167 Apache-2.0 102 90 5 Updated Mar 21, 2026
  • p4-constraints Public

    Constraints on P4 objects enforced at runtime

    p4lang/p4-constraints’s past year of commit activity
    C++ 17 Apache-2.0 17 2 4 Updated Mar 20, 2026
  • p4-dpdk-target Public

    P4 driver SW for P4 DPDK target.

    p4lang/p4-dpdk-target’s past year of commit activity
    C++ 66 Apache-2.0 23 15 1 Updated Mar 8, 2026

Top languages

Loading…

Most used topics

Loading…