Skip to content

Commit

Permalink
Ref files.
Browse files Browse the repository at this point in the history
Ref files.
  • Loading branch information
fruffy committed Apr 23, 2022
1 parent 0b32d66 commit 04294d1
Show file tree
Hide file tree
Showing 146 changed files with 1,306 additions and 712 deletions.
13 changes: 2 additions & 11 deletions testdata/p4_14_samples_outputs/11-MultiTags.p4-stderr
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
[--Wwarn=ordering] warning: hdr.ethernet: the order of headers in deparser is not uniquely determined by parser!
11-MultiTags.p4(74): warning: packet.extract is ignored. Exception: OverwritingHeader
11-MultiTags.p4(74): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader
extract(my_tag );
^^^^^^^^^^^^^^^^
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled:
Parser ParserImpl state chain: .start, .parse_my_tag, .parse_my_tag, .parse_my_tag
11-MultiTags.p4(74): warning: packet.extract is ignored. Exception: OverwritingHeader
extract(my_tag );
^^^^^^^^^^^^^^^^
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled:
Parser ParserImpl state chain: .start, .parse_my_tag, .parse_my_tag, .parse_vlan_tag, .parse_my_tag, .parse_my_tag
11-MultiTags.p4(65): warning: packet.extract is ignored. Exception: OverwritingHeader
11-MultiTags.p4(65): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader
extract(vlan_tag );
^^^^^^^^^^^^^^^^^^
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled:
Parser ParserImpl state chain: .start, .parse_my_tag, .parse_my_tag, .parse_vlan_tag, .parse_my_tag, .parse_vlan_tag, .parse_my_tag
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled:
Parser ParserImpl state chain: .start, .parse_my_tag, .parse_my_tag, .parse_vlan_tag, .parse_my_tag, .parse_vlan_tag, .parse_vlan_tag
11-MultiTags.p4(65): warning: packet.extract is ignored. Exception: OverwritingHeader
extract(vlan_tag );
^^^^^^^^^^^^^^^^^^
11-MultiTags.p4(74): warning: packet.extract is ignored. Exception: OverwritingHeader
extract(my_tag );
^^^^^^^^^^^^^^^^
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled:
Parser ParserImpl state chain: .start, .parse_my_tag, .parse_my_tag, .parse_vlan_tag, .parse_vlan_tag, .parse_my_tag, .parse_my_tag
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled:
Expand Down
4 changes: 2 additions & 2 deletions testdata/p4_14_samples_outputs/12-MultiTagsNoLoop.p4-stderr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[--Wwarn=ordering] warning: hdr.ethernet: the order of headers in deparser is not uniquely determined by parser!
12-MultiTagsNoLoop.p4(73): warning: packet.extract is ignored. Exception: OverwritingHeader
12-MultiTagsNoLoop.p4(73): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader
extract(my_tag );
^^^^^^^^^^^^^^^^
12-MultiTagsNoLoop.p4(65): warning: packet.extract is ignored. Exception: OverwritingHeader
12-MultiTagsNoLoop.p4(65): [--Wwarn=ignore-prop] warning: Result of packet.extract is not defined: Exception: OverwritingHeader
extract(vlan_tag );
^^^^^^^^^^^^^^^^^^
[--Wwarn=invalid] warning: Parser cycle cannot be unrolled:
Expand Down
97 changes: 2 additions & 95 deletions testdata/p4_14_samples_outputs/TLV_parsing.p4-stderr

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions testdata/p4_14_samples_outputs/issue3068-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
@name(".parse_ethernet") state parse_ethernet {
state parse_ethernet {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
@name(".start") state start {
state start {
transition parse_ethernet;
}
}
Expand Down
6 changes: 0 additions & 6 deletions testdata/p4_16_samples_outputs/bvec_union-bmv2.p4-stderr
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);
^^^^^^^^^^^^^^^^^
29 changes: 29 additions & 0 deletions testdata/p4_16_samples_outputs/default-first.p4
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;

33 changes: 33 additions & 0 deletions testdata/p4_16_samples_outputs/default-frontend.p4
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;

35 changes: 35 additions & 0 deletions testdata/p4_16_samples_outputs/default-midend.p4
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;

29 changes: 29 additions & 0 deletions testdata/p4_16_samples_outputs/default.p4
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;

7 changes: 7 additions & 0 deletions testdata/p4_16_samples_outputs/default.p4-stderr
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);
^^^^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ extract_for_header_union.p4(43): [--Wwarn=invalid_header] warning: accessing a f
extract_for_header_union.p4(37): [--Wwarn=parser-transition] warning: accept state in parser ProtParser is unreachable
parser ProtParser(packet_in packet,
^^^^^^^^^^
extract_for_header_union.p4(43): [--Wwarn=ignore-prop] warning: Result of AssignmentStatement is not defined: Error: Reading field from invalid header
hdr.addr_src1.ipv4.addr = hdr.addr_src2.ipv4.addr;
^
23 changes: 4 additions & 19 deletions testdata/p4_16_samples_outputs/fabric_20190420/fabric.p4-stderr
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 testdata/p4_16_samples_outputs/gauntlet_bounded_loop-first.p4
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 testdata/p4_16_samples_outputs/gauntlet_bounded_loop-frontend.p4
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;

Loading

0 comments on commit 04294d1

Please sign in to comment.