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++ 655 402

  3. tutorials tutorials Public

    P4 language tutorials

    Python 1.6k 944

  4. p4c p4c Public

    P4_16 reference compiler

    C++ 843 527

  5. p4-spec p4-spec Public

    TeX 201 93

  6. PI PI Public

    An implementation framework for a P4Runtime server

    C++ 189 123

Repositories

Showing 10 of 50 repositories
  • p4c Public

    P4_16 reference compiler

    p4lang/p4c's past year of commit activity
    C++ 843 527 373 123 Updated Oct 15, 2026
  • tutorials Public

    P4 language tutorials

    p4lang/tutorials's past year of commit activity
    Python 1,600 944 7 10 Updated Oct 15, 2026
  • PI Public

    An implementation framework for a P4Runtime server

    p4lang/PI's past year of commit activity
    C++ 189 123 20 9 Updated Oct 13, 2026
  • open-p4studio Public
    p4lang/open-p4studio's past year of commit activity
    C++ 205 42 29 4 Updated Oct 13, 2026
  • p4mlir-incubator Public

    An experimental project to bring MLIR to P4C.

    p4lang/p4mlir-incubator's past year of commit activity
    MLIR 17 26 54 (5 issues need help) 25 Updated Oct 13, 2026
  • p4runtime-shell Public

    An interactive Python shell for P4Runtime

    p4lang/p4runtime-shell's past year of commit activity
    Python 91 47 15 5 Updated Oct 12, 2026
  • behavioral-model Public

    The reference P4 software switch

    p4lang/behavioral-model's past year of commit activity
    C++ 655 402 54 (2 issues need help) 12 Updated Oct 10, 2026
  • p4runtime Public

    Specification documents for the P4Runtime control-plane API

    p4lang/p4runtime's past year of commit activity
    Python 176 103 86 3 Updated Oct 9, 2026
  • gsoc Public

    P4.org's Participation in Google Summer of Code

    p4lang/gsoc's past year of commit activity
    CSS 32 Apache-2.0 30 1 1 Updated Oct 6, 2026
  • packages Public

    P4 Packages

    p4lang/packages's past year of commit activity
    Shell 4 0 6 0 Updated Sep 25, 2026