Skip to content

Commit 61b5860

Browse files
authored
Merge pull request #1111 from Abe149/Abe149/006___making_corrections_to_the_P4₁₆_spec._based_on_reading_version_1.2.2
making corrections to the P4₁₆ spec. based on reading version 1.2.2 [branch 006]
2 parents 93b36f5 + f5e4ace commit 61b5860

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Diff for: p4-16/spec/P4-16-spec.mdk

+7-8
Original file line numberDiff line numberDiff line change
@@ -6045,8 +6045,7 @@ parser Top(packet_in b, out Parsed_headers headers) {
60456045
}
60466046

60476047
state parse_ipv4_options {
6048-
// use information in the ipv4 header to compute the number
6049-
// of bits to extract
6048+
// use information in the ipv4 header to compute the number of bits to extract
60506049
b.extract(headers.ipv4options,
60516050
(bit<32>)(((bit<16>)headers.ipv4.ihl - 5) * 32));
60526051
transition dispatch_on_protocol;
@@ -6071,7 +6070,7 @@ where `T` must be a type with fixed width. In case of success the
60716070
result of the evaluation of `lookahead` returns a value of type `T`.
60726071

60736072
In terms of the `ParserModel`, the semantics of `lookahead` is
6074-
given by the following pseudo-code:
6073+
given by the following pseudocode:
60756074

60766075
~ Begin P4Pseudo
60776076
T packet_in.lookahead<T>() {
@@ -6121,7 +6120,7 @@ Another way is to use the `advance` method of the packet when the
61216120
number of bits to skip is known.
61226121

61236122
In terms of the `ParserModel`, the meaning of `advance` is
6124-
given in pseudo-code as follows:
6123+
given in pseudocode as follows:
61256124

61266125
~ Begin P4Pseudo
61276126
void packet_in.advance(bit<32> bits) {
@@ -6196,7 +6195,7 @@ parser P(packet_in b, out Pkthdr p) {
61966195
P4 allows parsers to invoke the services of other parsers, similar to
61976196
subroutines. To invoke the services of another parser, the sub-parser
61986197
must be first instantiated; the services of an instance are invoked by
6199-
calling it using its apply method.
6198+
calling it using its `apply` method.
62006199

62016200
The following example shows a sub-parser invocation:
62026201

@@ -6230,7 +6229,7 @@ The semantics of a sub-parser invocation can be described as follows:
62306229
[]{tex-cmd: "\indent"}
62316230
Figure [#fig-subparser] shows a diagram of this process.
62326231

6233-
Note that since P4 requires declarations to precede uses, it is impossible to
6232+
Note that since P4 requires definitions to precede uses, it is impossible to
62346233
create recursive (or mutually recursive) parsers.
62356234

62366235
Architectures may impose (static or dynamic) constraints on the
@@ -6270,7 +6269,7 @@ valueSetDeclaration
62706269
~ End P4Grammar
62716270

62726271
Parser Value Sets support a `size` argument to provide hints to the compiler to
6273-
reserve hardware resource to implement the value set. For example, this parser
6272+
reserve hardware resources to implement the value set. For example, this parser
62746273
value set:
62756274

62766275
~ Begin P4Example
@@ -6286,7 +6285,7 @@ storing `N` value set entries. See "Size property of P4 tables and parser value
62866285
sets" [P4SizeProperty] for further discussion on the implementation of parser
62876286
value set size.
62886287

6289-
The value set is populated by the control-plane by methods specified in the
6288+
The value set is populated by the control plane by methods specified in the
62906289
P4Runtime specification.
62916290

62926291
# Control blocks { #sec-control }

0 commit comments

Comments
 (0)