1
1
Title : P4~16~ Language Specification
2
- Title Note: version 1.2.2
2
+ Title Note: version 1.2.3
3
3
Title Footer: &date;
4
4
Author: The P4 Language Consortium
5
5
Heading depth: 5
@@ -40,6 +40,9 @@ pre, code {
40
40
font-family: LuxiMono;
41
41
font-size: 75%;
42
42
}
43
+ table {
44
+ breakable: true;
45
+ }
43
46
}
44
47
45
48
Colorizer: p4
@@ -1994,7 +1997,7 @@ compile-time known value (see Section [#sec-ct-constants]) that is a
1994
1997
non-negative integer. When using an expression for
1995
1998
the size, the expression must be parenthesized. Bitstrings with width 0 are
1996
1999
allowed; they have no actual bits, and can only have the value 0. See
1997
- { #sec-uninitialized-values-and-writing-invalid-headers } for additional details.
2000
+ [ #sec-uninitialized-values-and-writing-invalid-headers] for additional details.
1998
2001
1999
2002
~ Begin P4Example
2000
2003
const bit<32> x = 10; // 32-bit constant with value 10.
@@ -7600,7 +7603,7 @@ names.
7600
7603
Evaluation may create multiple instances from one type, each of which
7601
7604
must have a unique, fully-qualified name.
7602
7605
7603
- ### Computing control names
7606
+ ### Computing control-plane names
7604
7607
7605
7608
The fully-qualified name of a construct is derived by concatenating
7606
7609
the fully-qualified name of its enclosing construct with its local
@@ -7609,7 +7612,7 @@ the global scope, have the same local and fully-qualified names. The
7609
7612
local names of controllable entities and enclosing constructs are
7610
7613
derived from the syntax of a P4 program as follows.
7611
7614
7612
- #### Value sets { #sec-cp-tables }
7615
+ #### Value sets { #sec-cp-value-set }
7613
7616
For each `value_set` construct, its syntactic name becomes the local
7614
7617
name of the value set. For example:
7615
7618
@@ -8325,47 +8328,26 @@ The P4 compiler should provide:
8325
8328
8326
8329
# Appendix: Revision History { #sec-revision-history; @h1:"A" }
8327
8330
8328
- |:---{width:12%}---|:---{width:20%}---|:---{width:68%}---|
8329
- | **Release** | **Release Date** | **Summary of Changes** |
8330
- |-----|-----|-----|
8331
- | 1.0.0 | May 17, 2017 | Initial version. |
8332
- |-----|-----|-----|
8333
- | 1.1.0 | November 26, 2018 | Added top-level functions, optional and named parameters, |
8334
- | | | `enum` representations, parser value sets, type definitions, |
8335
- | | | saturating arithmetic, and structured annotations. |
8336
- | | | Removed `globalname` annotation and added a table `size` property. |
8337
- | | | Clarified semantics of operations on invalid headers, added |
8338
- | | | restrictions on arguments to calls, and modified precedence of |
8339
- | | | bitwise operators. |
8340
- |-----|-----|-----|
8341
- | 1.2.0 | October 14, 2019 | Added error `ParserInvalidArgument`, order of `const` entries, |
8342
- | | | header size methods, 1-bit signed values, signed bit slices, empty |
8343
- | | | tuples, `@deprecated` annotation, free-form annotations, `int` type |
8344
- | | | `table.apply().miss`, `string` type. |
8345
- |-----|-----|-----|
8346
- | 1.2.1 | June 11, 2020 | Added structure-value expressions, default values, concatenation, |
8347
- | | | structured annotations; standardized several new annotations; |
8348
- | | | generalized typing rule for masks; restricted typing rule for |
8349
- | | | shifts with infinite-precision operands; clarified evaluation |
8350
- | | | order for table keys; clarified copy-out behavior; clarified |
8351
- | | | semantics of invalid header stacks; clarified initialization |
8352
- | | | semantics; fixed several small issues in grammar. |
8353
- |-----|-----|-----|
8354
- | 1.2.2 | May 17, 2021 | Added support for tuple access, generic structures, additional |
8355
- | | | enumeration types, abstract methods, conditional and empty |
8356
- | | | statements in parsers, additional casts, and 0-width types; |
8357
- | | | clarified semantics of default actions, headers, empty types, and |
8358
- | | | action data; fixed typos and inconsistencies in the grammar. |
8359
- |-----|-----|-----|
8360
-
8361
- ## Summary of changes made in version 1.2.3
8362
-
8363
- * Allow empty entries lists for tables
8364
- * Extended minSizeInBits, and minSizeInBytes to apply to more
8365
- expressions (Section [#sec-minsizeinbits]). Added maxSizeInBits and maxSizeInBytes.
8366
- * Specify operations on values typed as type variables.
8367
-
8368
- ## Summary of changes made in version 1.2.2
8331
+ ## Summary of changes made in version 1.2.3, released July 11, 2022.
8332
+
8333
+ * Extended `minSizeInBits` and `minSizeInBytes` to apply to more expressions (Section [#sec-minsizeinbits]).
8334
+ * Added support for `maxSizeInBits` and `maxSizeInBytes` (Section [#sec-minsizeinbits]).
8335
+ * Added support for empty lists of const entries in tables (Section [#sec-entries]).
8336
+ * Added support for `switch` statements in actions (Section [#sec-actions]).
8337
+ * Added support for direct invocation of controls and parsers (Section [#sec-parameterization]).
8338
+ * Added parser `value_set` to list of control-plane visible names (Section [#sec-cp-names]).
8339
+ * Added `match_kind` as a base type (Section [#sec-match-kind-type]).
8340
+ * Removed structure initializers as they are subsumed by structure-valued expressions (Section [#sec-structure-expressions]).
8341
+ * Specified operations on values typed as type variables (Section [#sec-type-variable-operations]).
8342
+ * Clarified semantics of compile-time known values (Section [#sec-ct-constants]).
8343
+ * Clarified semantics of directionless parameters (Section [#sec-calling-convention]).
8344
+ * Clarified semantics of infinite precision integers (Section [#sec-infinite-precision-integers]).
8345
+ * Clarified semantics of bit slices, shifts, and concatenation (Section [#sec-bit-ops]).
8346
+ * Clarified semantics of optional parameters (Section [#sec-optional-parameters]).
8347
+ * Clarified restrictions on extern method and function invocation (Section [#sec-calling-restrictions]).
8348
+ * Clarified semantics of implicit casts (Section [#sec-implicit-casts]).
8349
+
8350
+ ## Summary of changes made in version 1.2.2, released May 17, 2021
8369
8351
8370
8352
* Added support for accessing tuple fields (Section [#sec-tuple-exprs]).
8371
8353
* Added support for generic structures (Section [#sec-type-spec]).
@@ -8383,7 +8365,7 @@ The P4 compiler should provide:
8383
8365
* Fixed several typos and inconsistencies in grammar (Section [#sec-grammar]).
8384
8366
* Eliminated annotations on `const` entries in grammar (Section [#sec-grammar]).
8385
8367
8386
- ## Summary of changes made in version 1.2.1
8368
+ ## Summary of changes made in version 1.2.1, released June 11, 2020
8387
8369
8388
8370
* Added structure-value expressions (Section
8389
8371
[#sec-structure-expressions]).
@@ -8413,7 +8395,7 @@ The P4 compiler should provide:
8413
8395
allow empty statements in parser (Section [#sec-parser-state-stmt]),
8414
8396
and eliminate annotations on const entries (Section [#sec-entries]).
8415
8397
8416
- ## Summary of changes made in version 1.2.0
8398
+ ## Summary of changes made in version 1.2.0, released October 14, 2019
8417
8399
8418
8400
* Added `table.apply().miss` (Section [#sec-invoke-mau]).
8419
8401
* Added `string` type (Section [#sec-string-type]).
@@ -8430,7 +8412,7 @@ The P4 compiler should provide:
8430
8412
* Clarified the significance of order of entries in `const entries` (Section [#sec-entries]).
8431
8413
* Added methods to calculate header size (Section [#sec-ops-on-hdrs]).
8432
8414
8433
- ## Summary of changes made in version 1.1.0
8415
+ ## Summary of changes made in version 1.1.0, released November 26, 2017.
8434
8416
8435
8417
* Top-level functions (Section [#sec-functions])
8436
8418
- Functions may be declared at the top-level of a P4 program.
@@ -8459,6 +8441,8 @@ The P4 compiler should provide:
8459
8441
* Computed bitwidths (Section [#sec-base-types])
8460
8442
- Added support for specifying widths using expressions in `bit` and `varbit` types.
8461
8443
8444
+ ## Initial version 1.0.0, released May 17, 2017
8445
+
8462
8446
# Appendix: P4 reserved keywords { #sec-p4-keywords }
8463
8447
8464
8448
The following table shows all P4 reserved keywords. Some identifiers
0 commit comments