Skip to content

Commit

Permalink
Extend IR proto with error codes.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 537425128
  • Loading branch information
kishanps authored and VSuryaprasad-HCL committed Nov 29, 2024
1 parent c8c35e2 commit 05d906b
Show file tree
Hide file tree
Showing 19 changed files with 809 additions and 0 deletions.
1 change: 1 addition & 0 deletions p4_symbolic/ir/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ cc_library(
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_protobuf//:protobuf",
],
)

Expand Down
48 changes: 48 additions & 0 deletions p4_symbolic/ir/expected/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,54 @@ parsers {
}
}
}
errors {
key: "HeaderTooShort"
value {
name: "HeaderTooShort"
value: 4
}
}
errors {
key: "NoError"
value {
name: "NoError"
}
}
errors {
key: "NoMatch"
value {
name: "NoMatch"
value: 2
}
}
errors {
key: "PacketTooShort"
value {
name: "PacketTooShort"
value: 1
}
}
errors {
key: "ParserInvalidArgument"
value {
name: "ParserInvalidArgument"
value: 6
}
}
errors {
key: "ParserTimeout"
value {
name: "ParserTimeout"
value: 5
}
}
errors {
key: "StackOutOfBounds"
value {
name: "StackOutOfBounds"
value: 3
}
}

=====MyIngress.ipv4_lpm Entries=====

Expand Down
48 changes: 48 additions & 0 deletions p4_symbolic/ir/expected/complex_conditional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2100,4 +2100,52 @@ parsers {
}
}
}
errors {
key: "HeaderTooShort"
value {
name: "HeaderTooShort"
value: 4
}
}
errors {
key: "NoError"
value {
name: "NoError"
}
}
errors {
key: "NoMatch"
value {
name: "NoMatch"
value: 2
}
}
errors {
key: "PacketTooShort"
value {
name: "PacketTooShort"
value: 1
}
}
errors {
key: "ParserInvalidArgument"
value {
name: "ParserInvalidArgument"
value: 6
}
}
errors {
key: "ParserTimeout"
value {
name: "ParserTimeout"
value: 5
}
}
errors {
key: "StackOutOfBounds"
value {
name: "StackOutOfBounds"
value: 3
}
}

48 changes: 48 additions & 0 deletions p4_symbolic/ir/expected/conditional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -732,4 +732,52 @@ parsers {
}
}
}
errors {
key: "HeaderTooShort"
value {
name: "HeaderTooShort"
value: 4
}
}
errors {
key: "NoError"
value {
name: "NoError"
}
}
errors {
key: "NoMatch"
value {
name: "NoMatch"
value: 2
}
}
errors {
key: "PacketTooShort"
value {
name: "PacketTooShort"
value: 1
}
}
errors {
key: "ParserInvalidArgument"
value {
name: "ParserInvalidArgument"
value: 6
}
}
errors {
key: "ParserTimeout"
value {
name: "ParserTimeout"
value: 5
}
}
errors {
key: "StackOutOfBounds"
value {
name: "StackOutOfBounds"
value: 3
}
}

48 changes: 48 additions & 0 deletions p4_symbolic/ir/expected/conditional_sequence.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2369,4 +2369,52 @@ parsers {
}
}
}
errors {
key: "HeaderTooShort"
value {
name: "HeaderTooShort"
value: 4
}
}
errors {
key: "NoError"
value {
name: "NoError"
}
}
errors {
key: "NoMatch"
value {
name: "NoMatch"
value: 2
}
}
errors {
key: "PacketTooShort"
value {
name: "PacketTooShort"
value: 1
}
}
errors {
key: "ParserInvalidArgument"
value {
name: "ParserInvalidArgument"
value: 6
}
}
errors {
key: "ParserTimeout"
value {
name: "ParserTimeout"
value: 5
}
}
errors {
key: "StackOutOfBounds"
value {
name: "StackOutOfBounds"
value: 3
}
}

48 changes: 48 additions & 0 deletions p4_symbolic/ir/expected/default_transition.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,52 @@ parsers {
}
}
}
errors {
key: "HeaderTooShort"
value {
name: "HeaderTooShort"
value: 4
}
}
errors {
key: "NoError"
value {
name: "NoError"
}
}
errors {
key: "NoMatch"
value {
name: "NoMatch"
value: 2
}
}
errors {
key: "PacketTooShort"
value {
name: "PacketTooShort"
value: 1
}
}
errors {
key: "ParserInvalidArgument"
value {
name: "ParserInvalidArgument"
value: 6
}
}
errors {
key: "ParserTimeout"
value {
name: "ParserTimeout"
value: 5
}
}
errors {
key: "StackOutOfBounds"
value {
name: "StackOutOfBounds"
value: 3
}
}

48 changes: 48 additions & 0 deletions p4_symbolic/ir/expected/extract_parser_operation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,52 @@ parsers {
}
}
}
errors {
key: "HeaderTooShort"
value {
name: "HeaderTooShort"
value: 4
}
}
errors {
key: "NoError"
value {
name: "NoError"
}
}
errors {
key: "NoMatch"
value {
name: "NoMatch"
value: 2
}
}
errors {
key: "PacketTooShort"
value {
name: "PacketTooShort"
value: 1
}
}
errors {
key: "ParserInvalidArgument"
value {
name: "ParserInvalidArgument"
value: 6
}
}
errors {
key: "ParserTimeout"
value {
name: "ParserTimeout"
value: 5
}
}
errors {
key: "StackOutOfBounds"
value {
name: "StackOutOfBounds"
value: 3
}
}

48 changes: 48 additions & 0 deletions p4_symbolic/ir/expected/hardcoded.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,52 @@ parsers {
}
}
}
errors {
key: "HeaderTooShort"
value {
name: "HeaderTooShort"
value: 4
}
}
errors {
key: "NoError"
value {
name: "NoError"
}
}
errors {
key: "NoMatch"
value {
name: "NoMatch"
value: 2
}
}
errors {
key: "PacketTooShort"
value {
name: "PacketTooShort"
value: 1
}
}
errors {
key: "ParserInvalidArgument"
value {
name: "ParserInvalidArgument"
value: 6
}
}
errors {
key: "ParserTimeout"
value {
name: "ParserTimeout"
value: 5
}
}
errors {
key: "StackOutOfBounds"
value {
name: "StackOutOfBounds"
value: 3
}
}

Loading

0 comments on commit 05d906b

Please sign in to comment.