Skip to content

Commit

Permalink
Reference files.
Browse files Browse the repository at this point in the history
  • Loading branch information
fruffy committed Dec 15, 2022
1 parent 91a0d18 commit 4cacb90
Show file tree
Hide file tree
Showing 356 changed files with 3,508 additions and 2,832 deletions.
4 changes: 2 additions & 2 deletions testdata/p4_16_samples_outputs/array-copy-bmv2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ struct Meta {

parser P(packet_in p, out Headers h, inout Meta m, inout standard_metadata_t sm) {
state start {
p.extract<Hdr>(h.h1.next);
p.extract<Hdr>(h.h1.next);
p.extract<Hdr>(h.h1[32w0]);
p.extract<Hdr>(h.h1[32w1]);
h.h2 = h.h1;
transition accept;
}
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_16_samples_outputs/bvec_union-bmv2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ struct Meta {
}

parser p(packet_in b, out Headers h, inout Meta m, inout standard_metadata_t sm) {
state start {
b.extract<Hdr1>(h.h1);
transition select(h.h1._a0) {
8w0: getH1;
default: getH2;
}
}
state getH1 {
b.extract<Hdr1>(h.u_h1);
transition accept;
Expand All @@ -57,6 +50,13 @@ parser p(packet_in b, out Headers h, inout Meta m, inout standard_metadata_t sm)
b.extract<Hdr2>(h.u_h2);
transition accept;
}
state start {
b.extract<Hdr1>(h.h1);
transition select(h.h1._a0) {
8w0: getH1;
default: getH2;
}
}
}

control vrfy(inout Headers h, inout Meta m) {
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_16_samples_outputs/calc-ebpf-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ parser Parser(packet_in packet, out headers hdr) {
bit<128> tmp_6;
bit<128> tmp_7;
bit<128> tmp_8;
state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x1234: check_p4calc;
default: accept;
}
}
state check_p4calc {
tmp_6 = packet.lookahead<bit<128>>();
tmp_0.setValid();
Expand Down Expand Up @@ -73,6 +66,13 @@ parser Parser(packet_in packet, out headers hdr) {
packet.extract<p4calc_t>(hdr.p4calc);
transition accept;
}
state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x1234: check_p4calc;
default: accept;
}
}
}

control Ingress(inout headers hdr, out bool xout) {
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_16_samples_outputs/chain1-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ header Header {

parser p1(packet_in p, out Header h) {
@name("p1.x") bit<1> x_0;
state start {
transition select(x_0) {
1w0: chain1;
1w1: chain2;
default: noMatch;
}
}
state chain1 {
p.extract<Header>(h);
transition endchain;
Expand All @@ -28,6 +21,13 @@ parser p1(packet_in p, out Header h) {
verify(false, error.NoMatch);
transition reject;
}
state start {
transition select(x_0) {
1w0: chain1;
1w1: chain2;
default: noMatch;
}
}
}

parser proto(packet_in p, out Header h);
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_16_samples_outputs/checksum-l4-bmv2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,6 @@ parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standa
@name("parserI.tmp_4") tcp_upto_data_offset_only_h tmp_4;
bit<8> tmp_9;
bit<104> tmp_10;
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
state parse_ipv4 {
tmp_9 = pkt.lookahead<bit<8>>();
tmp.setValid();
Expand Down Expand Up @@ -128,6 +121,13 @@ parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standa
pkt.extract<udp_t>(hdr.udp);
transition accept;
}
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
}

control cIngress(inout headers hdr, inout metadata meta, inout standard_metadata_t stdmeta) {
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_16_samples_outputs/checksum1-bmv2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,6 @@ struct metadata {
parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standard_metadata_t stdmeta) {
@name("parserI.tmp") IPv4_up_to_ihl_only_h tmp;
bit<8> tmp_4;
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
state parse_ipv4 {
tmp_4 = pkt.lookahead<bit<8>>();
tmp.setValid();
Expand All @@ -91,6 +84,13 @@ parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standa
pkt.extract<tcp_t>(hdr.tcp);
transition accept;
}
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
}

control cIngress(inout headers hdr, inout metadata meta, inout standard_metadata_t stdmeta) {
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_16_samples_outputs/checksum2-bmv2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ struct metadata {
}

parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standard_metadata_t stdmeta) {
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
state parse_ipv4 {
pkt.extract<ipv4_t>(hdr.ipv4);
verify(hdr.ipv4.version == 4w4, error.IPv4IncorrectVersion);
Expand All @@ -78,6 +71,13 @@ parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standa
pkt.extract<tcp_t>(hdr.tcp);
transition accept;
}
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
}

control cIngress(inout headers hdr, inout metadata meta, inout standard_metadata_t stdmeta) {
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_16_samples_outputs/checksum3-bmv2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ struct metadata {
}

parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standard_metadata_t stdmeta) {
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
state parse_ipv4 {
pkt.extract<ipv4_t>(hdr.ipv4);
verify(hdr.ipv4.version == 4w4, error.IPv4IncorrectVersion);
Expand All @@ -78,6 +71,13 @@ parser parserI(packet_in pkt, out headers hdr, inout metadata meta, inout standa
pkt.extract<tcp_t>(hdr.tcp);
transition accept;
}
state start {
pkt.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x800: parse_ipv4;
default: accept;
}
}
}

control cIngress(inout headers hdr, inout metadata meta, inout standard_metadata_t stdmeta) {
Expand Down
110 changes: 51 additions & 59 deletions testdata/p4_16_samples_outputs/control-hs-index-test4-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -172,88 +172,80 @@ control ingress(inout headers h, inout Meta m, inout standard_metadata_t sm) {
}
apply {
tbl_controlhsindextest4l48.apply();
{
tbl_controlhsindextest4l48_0.apply();
{
tbl_controlhsindextest4l48_1.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w0 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w0].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l48_0.apply();
tbl_controlhsindextest4l48_1.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w0 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w0].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w0 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w0].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w0 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w0].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_2.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w1 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w1].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w1 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w1].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w1 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w1].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_3.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w2 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w2].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w0 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w0].b + h.h[32w1].c > 32w20))) {
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w2 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w2].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w0 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w0].b + h.h[32w2].c > 32w20))) {
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w2 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w2].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_2.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w1 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w1].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l48_4.apply();
tbl_controlhsindextest4l48_5.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w0 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w0].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w1 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w1].b + h.h[32w1].c > 32w20))) {
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w0 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w0].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w1 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w1].b + h.h[32w2].c > 32w20))) {
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w0 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w0].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_3.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w2 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w2].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l48_6.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w1 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w1].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w2 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w2].b + h.h[32w1].c > 32w20))) {
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w1 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w1].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w2 && (hsiVar == 32w0 && h.h[32w0].a + h.h[32w2].b + h.h[32w2].c > 32w20))) {
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w1 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w1].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_4.apply();
{
tbl_controlhsindextest4l48_5.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w0 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w0].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l48_7.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w2 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w2].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w2 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w2].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w2 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w2].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_8.apply();
tbl_controlhsindextest4l48_9.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w0 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w0].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w0 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w0].b + h.h[32w1].c > 32w20))) {
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w0 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w0].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w0 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w0].b + h.h[32w2].c > 32w20))) {
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w0 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w0].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_6.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w1 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w1].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l48_10.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w1 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w1].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w1 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w1].b + h.h[32w1].c > 32w20))) {
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w1 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w1].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w1 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w1].b + h.h[32w2].c > 32w20))) {
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w1 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w1].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_7.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w2 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w2].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l48_11.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w2 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w2].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w2 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w2].b + h.h[32w1].c > 32w20))) {
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w2 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w2].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w2 && (hsiVar == 32w1 && h.h[32w1].a + h.h[32w2].b + h.h[32w2].c > 32w20))) {
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w2 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w2].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_8.apply();
{
tbl_controlhsindextest4l48_9.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w0 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w0].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w0 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w0].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w0 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w0].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_10.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w1 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w1].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w1 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w1].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w1 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w1].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else {
tbl_controlhsindextest4l48_11.apply();
if (hsiVar_1 == 32w0 && (hsiVar_0 == 32w2 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w2].b + h.h[32w0].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w1 && (hsiVar_0 == 32w2 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w2].b + h.h[32w1].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
} else if (hsiVar_1 == 32w2 && (hsiVar_0 == 32w2 && (hsiVar == 32w2 && h.h[32w2].a + h.h[32w2].b + h.h[32w2].c > 32w20))) {
tbl_controlhsindextest4l49.apply();
}
}
}
}
}
}
}
Expand Down
Loading

0 comments on commit 4cacb90

Please sign in to comment.