P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4 Compiler Documentation (P4C)

P4 (Programming Protocol-independent Packet Processors) is a language for expressing how packets are processed by the data-plane of a programmable network element, e.g.(hardware or software switch, Smart-NIC, and network function appliance).

P4C is the official open-source reference compiler for the P4 programming language, supporting both P4-14 and P4-16.

Features of P4C

  • Provides compatibility for all versions of P4.
  • Open-source compiler front end, allows anyone to quickly build a compiler for a new architecture.
  • Supports multiple back-ends for application specific integrated circuits (ASICs), network-interface cards (NICs), field-programmable gate arrays (FPGAs), software switches and other targets.
  • Promotes the expansion of software development tools like debuggers, integrated development environments, P4 control-planes, testing and formal verification tools.
  • The compiler has an extensible architecture, making it easy to add new passes and optimizations, and to hook up new back-ends. Furthermore, the front-end and mid-end can be further detailed and extended by target-specific back-end.