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++ 628 383

  3. tutorials tutorials Public

    P4 language tutorials

    Python 1.6k 937

  4. p4c p4c Public

    P4_16 reference compiler

    C++ 814 510

  5. p4-spec p4-spec Public

    TeX 197 89

  6. PI PI Public

    An implementation framework for a P4Runtime server

    C++ 177 116

Repositories

Showing 10 of 48 repositories
  • 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 19, 2026
  • p4c Public

    P4_16 reference compiler

    p4lang/p4c’s past year of commit activity
    C++ 814 Apache-2.0 510 373 95 Updated Mar 19, 2026
  • p4runtime Public

    Specification documents for the P4Runtime control-plane API

    p4lang/p4runtime’s past year of commit activity
    Python 166 Apache-2.0 102 89 3 Updated Mar 19, 2026
  • tutorials Public

    P4 language tutorials

    p4lang/tutorials’s past year of commit activity
    Python 1,554 Apache-2.0 937 9 10 Updated Mar 19, 2026
  • behavioral-model Public

    The reference P4 software switch

    p4lang/behavioral-model’s past year of commit activity
    C++ 628 Apache-2.0 380 46 (2 issues need help) 14 Updated Mar 10, 2026
  • gsoc Public

    P4.org's Participation in Google Summer of Code

    p4lang/gsoc’s past year of commit activity
    29 Apache-2.0 23 3 2 Updated Mar 10, 2026
  • p4mlir-incubator Public

    An experimental project to bring MLIR to P4C.

    p4lang/p4mlir-incubator’s past year of commit activity
    MLIR 9 Apache-2.0 20 55 (4 issues need help) 17 Updated Mar 10, 2026
  • p4-dpdk-target Public

    P4 driver SW for P4 DPDK target.

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

    Organization-wide policy and governance documents.

    p4lang/.github’s past year of commit activity
    2 Apache-2.0 1 0 1 Updated Mar 8, 2026
  • p4ep Public

    The repository for P4 Enhancement Proposals (P4EPs).

    p4lang/p4ep’s past year of commit activity
    2 Apache-2.0 1 1 1 Updated Mar 7, 2026