-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref files.
- Loading branch information
Showing
146 changed files
with
1,306 additions
and
712 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +0,0 @@ | ||
bvec_union-bmv2.p4(68): warning: b.extract is ignored. Error: Reading field from invalid header union | ||
b.extract(h.u.h2); | ||
^^^^^^^^^^^^^^^^^ | ||
bvec_union-bmv2.p4(63): warning: b.extract is ignored. Error: Reading field from invalid header union | ||
b.extract(h.u.h1); | ||
^^^^^^^^^^^^^^^^^ | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <core.p4> | ||
|
||
header Header { | ||
bit<32> data; | ||
} | ||
|
||
parser p0(packet_in p, out Header h) { | ||
bool b = true; | ||
state start { | ||
p.extract<Header>(h); | ||
transition select(h.data, b) { | ||
(default, true): next; | ||
(default, default): reject; | ||
} | ||
} | ||
state next { | ||
p.extract<Header>(h); | ||
transition select(h.data, b) { | ||
(default, true): accept; | ||
(default, default): reject; | ||
default: reject; | ||
} | ||
} | ||
} | ||
|
||
parser proto(packet_in p, out Header h); | ||
package top(proto _p); | ||
top(p0()) main; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <core.p4> | ||
|
||
header Header { | ||
bit<32> data; | ||
} | ||
|
||
parser p0(packet_in p, out Header h) { | ||
@name("p0.b") bool b_0; | ||
state start { | ||
b_0 = true; | ||
transition start_0; | ||
} | ||
state start_0 { | ||
p.extract<Header>(h); | ||
transition select(h.data, b_0) { | ||
(default, true): next; | ||
(default, default): reject; | ||
} | ||
} | ||
state next { | ||
p.extract<Header>(h); | ||
transition select(h.data, b_0) { | ||
(default, true): accept; | ||
(default, default): reject; | ||
default: reject; | ||
} | ||
} | ||
} | ||
|
||
parser proto(packet_in p, out Header h); | ||
package top(proto _p); | ||
top(p0()) main; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include <core.p4> | ||
|
||
header Header { | ||
bit<32> data; | ||
} | ||
|
||
parser p0(packet_in p, out Header h) { | ||
@name("p0.b") bool b_0; | ||
state next { | ||
p.extract<Header>(h); | ||
transition select(h.data, (bit<1>)b_0) { | ||
(default, 1w1): accept; | ||
(default, default): reject; | ||
default: reject; | ||
} | ||
} | ||
state noMatch { | ||
verify(false, error.NoMatch); | ||
transition reject; | ||
} | ||
state start { | ||
b_0 = true; | ||
p.extract<Header>(h); | ||
transition select(h.data, 1w1) { | ||
(default, 1w1): next; | ||
(default, default): reject; | ||
default: noMatch; | ||
} | ||
} | ||
} | ||
|
||
parser proto(packet_in p, out Header h); | ||
package top(proto _p); | ||
top(p0()) main; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <core.p4> | ||
|
||
header Header { | ||
bit<32> data; | ||
} | ||
|
||
parser p0(packet_in p, out Header h) { | ||
bool b = true; | ||
state start { | ||
p.extract(h); | ||
transition select(h.data, b) { | ||
(default, true): next; | ||
(default, default): reject; | ||
} | ||
} | ||
state next { | ||
p.extract(h); | ||
transition select(h.data, b) { | ||
(default, true): accept; | ||
(default, default): reject; | ||
default: reject; | ||
} | ||
} | ||
} | ||
|
||
parser proto(packet_in p, out Header h); | ||
package top(proto _p); | ||
top(p0()) main; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
default.p4(33): [--Wwarn=expr] warning: p.extract: error OverwritingHeader will be triggered | ||
Parser p0 state chain: start, next | ||
p.extract(h); | ||
^^^^^^^^^^^^ | ||
default.p4(33): [--Wwarn=ignore-prop] warning: Result of p.extract is not defined: Exception: OverwritingHeader | ||
p.extract(h); | ||
^^^^^^^^^^^^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 4 additions & 19 deletions
23
testdata/p4_16_samples_outputs/fabric_20190420/fabric.p4-stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,24 @@ | ||
parser.p4(42): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
parser.p4(42): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader | ||
packet.extract(hdr.ethernet); | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
parser.p4(86): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
parser.p4(86): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader | ||
packet.extract(hdr.mpls); | ||
^^^^^^^^^^^^^^^^^^^^^^^^ | ||
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled: | ||
Parser FabricParser state chain: start, parse_ethernet, parse_mpls, parse_ethernet, parse_mpls, parse_ethernet | ||
parser.p4(86): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
packet.extract(hdr.mpls); | ||
^^^^^^^^^^^^^^^^^^^^^^^^ | ||
parser.p4(42): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
packet.extract(hdr.ethernet); | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled: | ||
Parser FabricParser state chain: start, parse_ethernet, parse_mpls, parse_ethernet, parse_vlan_tag, parse_inner_vlan_tag, parse_mpls, parse_ethernet, parse_mpls | ||
parser.p4(57): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
parser.p4(57): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader | ||
packet.extract(hdr.vlan_tag); | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
parser.p4(73): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
parser.p4(73): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader | ||
packet.extract(hdr.inner_vlan_tag); | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled: | ||
Parser FabricParser state chain: start, parse_ethernet, parse_mpls, parse_ethernet, parse_vlan_tag, parse_inner_vlan_tag, parse_mpls, parse_ethernet, parse_vlan_tag, parse_inner_vlan_tag, parse_mpls | ||
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled: | ||
Parser FabricParser state chain: start, parse_ethernet, parse_mpls, parse_ethernet, parse_vlan_tag, parse_inner_vlan_tag, parse_mpls, parse_ethernet, parse_vlan_tag, parse_mpls | ||
parser.p4(86): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
packet.extract(hdr.mpls); | ||
^^^^^^^^^^^^^^^^^^^^^^^^ | ||
parser.p4(42): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
packet.extract(hdr.ethernet); | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled: | ||
Parser FabricParser state chain: start, parse_ethernet, parse_mpls, parse_ethernet, parse_vlan_tag, parse_mpls, parse_ethernet, parse_mpls | ||
parser.p4(57): warning: packet.extract is ignored. Exception: OverwritingHeader | ||
packet.extract(hdr.vlan_tag); | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled: | ||
Parser FabricParser state chain: start, parse_ethernet, parse_mpls, parse_ethernet, parse_vlan_tag, parse_mpls, parse_ethernet, parse_vlan_tag, parse_mpls |
57 changes: 57 additions & 0 deletions
57
testdata/p4_16_samples_outputs/gauntlet_bounded_loop-first.p4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#include <core.p4> | ||
|
||
header H { | ||
bit<8> a; | ||
} | ||
|
||
header padding { | ||
bit<8> p; | ||
} | ||
|
||
struct headers { | ||
H nop; | ||
padding p; | ||
} | ||
|
||
parser sub_parser(packet_in b, out headers hdr) { | ||
@name("tracker") bit<8> tracker_0; | ||
state start { | ||
tracker_0 = 8w0; | ||
transition next; | ||
} | ||
state next { | ||
transition select(tracker_0 == 8w1) { | ||
true: next_true; | ||
false: next_join; | ||
} | ||
} | ||
state next_true { | ||
b.extract<padding>(hdr.p); | ||
hdr.p.p = 8w1; | ||
transition next_join; | ||
} | ||
state next_join { | ||
transition select(hdr.p.p) { | ||
8w0: parse_hdr; | ||
default: accept; | ||
} | ||
} | ||
state parse_hdr { | ||
tracker_0 = tracker_0 + 8w1; | ||
b.extract<H>(hdr.nop); | ||
transition next; | ||
} | ||
} | ||
|
||
parser p(packet_in packet, out headers hdr) { | ||
@name("sub_parser") sub_parser() sub_parser_inst_0; | ||
state start { | ||
sub_parser_inst_0.apply(packet, hdr); | ||
transition accept; | ||
} | ||
} | ||
|
||
parser Parser(packet_in b, out headers hdr); | ||
package top(Parser p); | ||
top(p()) main; | ||
|
57 changes: 57 additions & 0 deletions
57
testdata/p4_16_samples_outputs/gauntlet_bounded_loop-frontend.p4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#include <core.p4> | ||
|
||
header H { | ||
bit<8> a; | ||
} | ||
|
||
header padding { | ||
bit<8> p; | ||
} | ||
|
||
struct headers { | ||
H nop; | ||
padding p; | ||
} | ||
|
||
parser p(packet_in packet, out headers hdr) { | ||
@name("p.sub_parser.tracker") bit<8> sub_parser_tracker; | ||
state start { | ||
hdr.nop.setInvalid(); | ||
hdr.p.setInvalid(); | ||
transition sub_parser_start; | ||
} | ||
state sub_parser_start { | ||
sub_parser_tracker = 8w0; | ||
transition sub_parser_next; | ||
} | ||
state sub_parser_next { | ||
transition select(sub_parser_tracker == 8w1) { | ||
true: sub_parser_next_true; | ||
false: sub_parser_next_join; | ||
} | ||
} | ||
state sub_parser_next_true { | ||
packet.extract<padding>(hdr.p); | ||
hdr.p.p = 8w1; | ||
transition sub_parser_next_join; | ||
} | ||
state sub_parser_next_join { | ||
transition select(hdr.p.p) { | ||
8w0: sub_parser_parse_hdr; | ||
default: start_0; | ||
} | ||
} | ||
state sub_parser_parse_hdr { | ||
sub_parser_tracker = sub_parser_tracker + 8w1; | ||
packet.extract<H>(hdr.nop); | ||
transition sub_parser_next; | ||
} | ||
state start_0 { | ||
transition accept; | ||
} | ||
} | ||
|
||
parser Parser(packet_in b, out headers hdr); | ||
package top(Parser p); | ||
top(p()) main; | ||
|
Oops, something went wrong.