Content deleted Content added
mNo edit summary |
added overview / design goals section |
||
Line 16:
'''P4''' is a [[programming language]] designed to allow programming of packet forwarding dataplanes. In contrast to a general purpose language such as C or python, P4 is a [[___domain-specific language]] with a number of constructs optimized around network data forwarding. P4 is an [[open source|open-source]], [[Permissive free software licence|permissively-licenced]] language and is maintained by a non-profit organization called the P4 Language Consortium. The language was originally described in a SIGCOMM paper in 2014 titled “Programming Protocol-Independent Packet Processors”<ref>{{cite web|url=http://www.sigcomm.org/node/3503|title=P4: Programming Protocol-Independent Packet Processors|date=July 2014|accessdate=7 April 2015}}</ref> – the alliterative name shortens to “P4”.
=Language overview and design considerations=
As the language is specifically targeted at packet forwarding applications, the list of requirements or design choices is somewhat unique to that forwarding case. The language is designed to meet a number of these goals:
==Target independence==
P4 programs are designed to be implementation-independent, meaning they can be compiled against many different types of execution machines such as general-purpose CPUs, FPGAs, system(s)-on-chip, network processors, and ASICs. These different types of machines are known as P4 targets, and each target must be provided along with a compiler that converts the P4 source code into an executable format. As many of the initial targets for P4 programs were used for simple packet switching it is very common to hear the term “P4 switch” used, even though “P4 target” is more formally correct.
==Protocol independence==
P4 is designed to be protocol-independent, meaning that the language has no native support for protocols such as IP, Ethernet, TCP, VxLAN, or MPLS. Instead, the P4 programmer describes the formats and field names of the required protocols in the program, which are in turn interpreted and processed by the compiled program and target device.
==Reconfigurability==
Protocol independence and the abstract language model allow for reconfigurability – P4 targets should be able to change the way they process packets (perhaps multiple times) after they are deployed. Previously, many high-speed packet switches were limited in their capabilities to expand or alter the function once installed. Although within the language there is nothing to prevent a given target from optimizing around a certain set of protocols, these optimizations are invisible to the language author and may ultimately reduce the system’s flexibility and reconfigurability goals.
==External links==
|