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 380

  3. tutorials tutorials Public

    P4 language tutorials

    Python 1.6k 931

  4. p4c p4c Public

    P4_16 reference compiler

    C++ 813 509

  5. p4-spec p4-spec Public

    TeX 196 89

  6. PI PI Public

    An implementation framework for a P4Runtime server

    C++ 177 115

Repositories

Showing 10 of 48 repositories