P4 (programming language): Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 20:
 
== History ==
The programming language P4 was originally described in a SIGCOMM CCR 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”. The first P4 workshop took place in June, 2015 <ref>{{cite web |title="1st P4 Workshop" |url=https://p4.org/events/2015-06-04-p4-workshop/ |website=P4 Official Website |accessdate=1 August 2019}}</ref> at [[Stanford University | Stanford University]]. An updated specification of P4, called P4-16, was released between 2016 and 2017 <ref name="P4-16">{{cite web |title=P4-16 Specification |url=https://p4.org/p4-spec/docs/P4-16-v1.2.0.html |website=P4 Official Website |accessdate=23 October 2019}}</ref> replacing original specification of P4, called P4-14.
 
==Design==
Line 38:
 
===Parsing logic===
P4 allows the specification of custom packet header parsing logic <ref>{{cite web |titlename="P4-16 Specification |url=https://p4.org/p4-spec/docs/P4-16-v1.2.0.html |website=P4 Official Website}}<"/ref> including but not limited to parsing typical headers used in the TCP/IP protocol suite and application specific headers.
 
===Headers===
Line 47:
 
===Stateful processing===
P4 allows the programmer to maintain state in the form of registers, counters and meters <ref>{{cite web |titlename="P4-16 Specification |url=https://p4.org/p4-spec/docs/P4-16-v1.2.0.html |website=P4 Official Website}}<"/ref>.
 
===Generic match action tables===
The primary component of a P4 program is a set of user-defined match action tables. P4 treats all match action tables as generic, leaving the user to add their match-action rules via the control plane. <ref>{{cite web |titlename="P4-16 Specification |url=https:"//p4lang>.github.io/p4-spec/docs/P4-16-v1.1.0-spec.pdf |website=P4 Official Website}}</ref>
 
====Match-action processing====