Skip to content

Commit f0e1a24

Browse files
Merge pull request #1313 from p4lang/release_v1.2.5
Release v1.2.5
2 parents 0b6c4b7 + e9a3c09 commit f0e1a24

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- p4-16: This holds the official P4 16 spec and discussion materials.
77
- The discussions of the design committee and the current open problems are held in [Google Docs](https://docs.google.com/document/d/1XSgdXeG1UuF1FM_XAqxDrHeN4dHZWBnJPKVS6SnGNwM/edit)
88
- An archive of the meeting notes from 2020 to 2022 is in this [pdf document](p4-16/spec/docs/P4-LDWG-Old-Notes.pdf)
9-
- The latest version of the P4 specification is [1.2.4](https://p4.org/p4-spec/docs/P4-16-v1.2.4.html).
9+
- The latest version of the P4 specification is [1.2.5](https://p4.org/p4-spec/docs/P4-16-v1.2.5.html).
1010
- Portable Switch architecture discussion materials and meeting minutes are available [here](https://github.com/p4lang/p4-spec/wiki/PSA)
1111

1212
# Modification Policy

p4-16/spec/P4-16-spec.mdk

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Title : P4~16~ Language Specification
2-
Title Note: version 1.2.4
2+
Title Note: version 1.2.5
33
Title Footer: &date;
44
Author: The P4 Language Consortium
55
Heading depth: 5
@@ -3466,7 +3466,7 @@ to bit-strings of the same width:
34663466

34673467
Bit-strings also support the following operations:
34683468

3469-
- Logical shift left and right by a non-negative integer value (which need not be
3469+
- Logical shift left and right by a non-negative integer value (which need not be
34703470
a compile-time known value), denoted by `<<` and `>>` respectively.
34713471
In a shift, the left operand is unsigned, and right operand must be either an
34723472
expression of type `bit<S>` or a non-negative integer value that is known at
@@ -3783,7 +3783,7 @@ The following casts are legal in P4:
37833783
- casts of a tuple expression to a header stack type
37843784
- casts of an invalid expression `{#}` to a header or a header union type
37853785
- casts where the destination type is the same as the source type
3786-
if the destination type appears in this list (this excludes
3786+
if the destination type appears in this list (this excludes
37873787
e.g., parsers or externs).
37883788

37893789
### Implicit casts { sec-implicit-casts }
@@ -4312,7 +4312,7 @@ expressions are legal:
43124312
- `hs[index]`: produces a reference to the header at the
43134313
specified position within the stack; if `hs` is an l-value,
43144314
the result is also an l-value. The header may be invalid. Some implementations
4315-
may impose the constraint that the index expression must be a compile-time known value.
4315+
may impose the constraint that the index expression must be a compile-time known value.
43164316
A P4 compiler must give an error if an index that is a compile-time known value is out of range.
43174317

43184318
Accessing a header stack ``hs`` with an index less than `0` or
@@ -4401,7 +4401,7 @@ void pop_front(int count) {
44014401
}
44024402
~ End P4Pseudo
44034403

4404-
Similar to structs and headers, the size of a header stack is a compile-time known value
4404+
Similar to structs and headers, the size of a header stack is a compile-time known value
44054405
(Section [#sec-minsizeinbits]).
44064406

44074407
Two header stacks can be compared for equality (`==`) or inequality (`!=`)
@@ -4424,7 +4424,7 @@ expression ...
44244424
The `typeRef` is a header stack type. The `typeRef` can be omitted if
44254425
it can be inferred from context, e.g., when initializing a variable
44264426
with a header stack type. Each expression in the list must evaluate
4427-
to a header of the same type as the other stack elements.
4427+
to a header of the same type as the other stack elements.
44284428

44294429
Here is an example:
44304430

@@ -7053,7 +7053,7 @@ because of the `@noWarn("duplicate_priorities")` annotation.
70537053
#### Size {#sec-size-table-property}
70547054

70557055
The `size` is an optional property of a table. When present, its
7056-
value must always be a compile-time known value that is an integer. The `size` property
7056+
value must always be a compile-time known value that is an integer. The `size` property
70577057
is specified in units of number of table entries.
70587058

70597059
If a table is specified with a `size` property of value `N`, it is
@@ -8322,7 +8322,7 @@ a key and a value `expression`. Note the syntax for `expression` is rich, see
83228322
Appendix [#sec-grammar] for details.
83238323

83248324
All `expression`s within a `structuredAnnotationBody` must be compile-time known
8325-
values with a result type that is either: `string`, `int`, or `bool`.
8325+
values with a result type that is either: `string`, `int`, or `bool`.
83268326
In particular, structured `expression`s (e.g. an `expression` containing an
83278327
`expressionList`, a `kvList`, etc.) are not allowed. Note that P4Runtime
83288328
information (P4Info) may stipulate additional restrictions. For example, an
@@ -8619,14 +8619,21 @@ The P4 compiler should provide:
86198619

86208620
- Errors when annotations are used incorrectly (e.g., an annotation
86218621
expecting a parameter but used without arguments, or with arguments
8622-
of the wrong type
8622+
of the wrong type)
86238623
- Warnings for unknown annotations.
86248624

86258625
# Appendix: Revision History { #sec-revision-history; @h1:"A" }
86268626

8627-
## Summary of changes made in version 1.2.4
8627+
## Summary of changes made in unreleased version
86288628

8629+
## Summary of changes made in version 1.2.5, released October 11, 2024
8630+
8631+
* Improved type nesting rules (Section[#sec-type-nesting]).
8632+
* Clarified that directionless extern parameters are passed by reference.
86298633
* Introduced distinction between local compile-time known and compile-time known values (Section[#sec-compile-time-known]).
8634+
8635+
## Summary of changes made in version 1.2.4,released May 15, 2023
8636+
86308637
* Added header stack expressions (Section [#sec-hs-init]).
86318638
* Allow casts from a type to itself (Section [#sec-casts]).
86328639
* Added an invalid header or header union expression `{#}` (Sections [#sec-ops-on-hdrs] and [#sec-expr-hu]).

0 commit comments

Comments
 (0)