Skip to content

Commit

Permalink
Ref files
Browse files Browse the repository at this point in the history
Refs.
  • Loading branch information
fruffy committed Jul 18, 2022
1 parent a94aa0a commit 01356e6
Show file tree
Hide file tree
Showing 357 changed files with 3,462 additions and 2,070 deletions.
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/01-BigMatch-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/01-DeadMetadata1-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
transition accept;
}
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/01-FullPHV-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/01-JustEthernet-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/01-NoDeps-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/02-BadSizeField-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
packet.extract<vag_t>(hdr.vag);
transition accept;
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/02-DeadMetadata2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
meta._m_f10 = 32w2;
transition accept;
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/02-FullPHV1-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
Expand Down
8 changes: 4 additions & 4 deletions testdata/p4_14_samples_outputs/02-SplitEthernet-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state parse_len_or_type {
@name(".parse_len_or_type") state parse_len_or_type {
packet.extract<len_or_type_t>(hdr.len_or_type);
transition accept;
}
state parse_mac_da {
@name(".parse_mac_da") state parse_mac_da {
packet.extract<mac_da_t>(hdr.mac_da);
transition parse_mac_sa;
}
state parse_mac_sa {
@name(".parse_mac_sa") state parse_mac_sa {
packet.extract<mac_sa_t>(hdr.mac_sa);
transition parse_len_or_type;
}
state start {
@name(".start") state start {
transition parse_mac_da;
}
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/03-DeadMetadata3-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
transition accept;
}
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/03-FullPHV2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/03-Gateway-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
packet.extract<vag_t>(hdr.vag);
transition accept;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<mac_da_t>(hdr.mac_da);
packet.extract<mac_sa_t>(hdr.mac_sa);
packet.extract<len_or_type_t>(hdr.len_or_type);
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/04-GatewayDefault-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition accept;
}
Expand Down
6 changes: 3 additions & 3 deletions testdata/p4_14_samples_outputs/04-SimpleVlan-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state parse_ethernet {
@name(".parse_ethernet") state parse_ethernet {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.ethertype) {
16w0x8100: parse_vlan_tag;
16w0x9100: parse_vlan_tag;
default: accept;
}
}
state parse_vlan_tag {
@name(".parse_vlan_tag") state parse_vlan_tag {
packet.extract<vlan_tag_t>(hdr.vlan_tag);
transition accept;
}
state start {
@name(".start") state start {
transition parse_ethernet;
}
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/05-FieldProblem-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<vag_t>(hdr.vag);
transition accept;
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/05-FullTPHV-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<h_t>(hdr.h);
transition accept;
}
Expand Down
6 changes: 3 additions & 3 deletions testdata/p4_14_samples_outputs/05-SimpleVlan1-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state parse_ethernet {
@name(".parse_ethernet") state parse_ethernet {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.ethertype) {
16w0x8100 &&& 16w0xefff: parse_vlan_tag;
default: accept;
}
}
state parse_vlan_tag {
@name(".parse_vlan_tag") state parse_vlan_tag {
packet.extract<vlan_tag_t>(hdr.vlan_tag);
transition accept;
}
state start {
@name(".start") state start {
transition parse_ethernet;
}
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/06-FullTPHV1-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<h_t>(hdr.h);
transition accept;
}
Expand Down
6 changes: 3 additions & 3 deletions testdata/p4_14_samples_outputs/06-SimpleVlanStack-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
verify(false, error.StackOutOfBounds);
transition reject;
}
state parse_ethernet {
@name(".parse_ethernet") state parse_ethernet {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.ethertype) {
16w0x8100 &&& 16w0xefff: parse_vlan_tag;
default: accept;
}
}
state parse_vlan_tag {
@name(".parse_vlan_tag") state parse_vlan_tag {
packet.extract<vlan_tag_t>(hdr.vlan_tag[32w0]);
transition select(hdr.vlan_tag[32w0].ethertype) {
16w0x8100 &&& 16w0xefff: parse_vlan_tag1;
Expand Down Expand Up @@ -75,7 +75,7 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
state parse_vlan_tag5 {
transition stateOutOfBound;
}
state start {
@name(".start") state start {
transition parse_ethernet;
}
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/07-FullTPHV2-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<h_t>(hdr.h);
transition accept;
}
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_14_samples_outputs/07-MultiProtocol-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state parse_icmp {
@name(".parse_icmp") state parse_icmp {
packet.extract<icmp_t>(hdr.icmp);
transition accept;
}
state parse_ipv4 {
@name(".parse_ipv4") state parse_ipv4 {
packet.extract<ipv4_t>(hdr.ipv4);
transition select(hdr.ipv4.fragOffset, hdr.ipv4.ihl, hdr.ipv4.protocol) {
(13w0x0 &&& 13w0x0, 4w0x5, 8w0x1): parse_icmp;
Expand All @@ -109,7 +109,7 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
default: accept;
}
}
state parse_ipv6 {
@name(".parse_ipv6") state parse_ipv6 {
packet.extract<ipv6_t>(hdr.ipv6);
transition select(hdr.ipv6.nextHdr) {
8w0x1: parse_icmp;
Expand All @@ -118,23 +118,23 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
default: accept;
}
}
state parse_tcp {
@name(".parse_tcp") state parse_tcp {
packet.extract<tcp_t>(hdr.tcp);
transition accept;
}
state parse_udp {
@name(".parse_udp") state parse_udp {
packet.extract<udp_t>(hdr.udp);
transition accept;
}
state parse_vlan_tag {
@name(".parse_vlan_tag") state parse_vlan_tag {
packet.extract<vlan_tag_t>(hdr.vlan_tag);
transition select(hdr.vlan_tag.etherType) {
16w0x800: parse_ipv4;
16w0x86dd: parse_ipv6;
default: accept;
}
}
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x8100: parse_vlan_tag;
Expand Down
8 changes: 4 additions & 4 deletions testdata/p4_14_samples_outputs/07-SimpleVlanStackIP-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
verify(false, error.StackOutOfBounds);
transition reject;
}
state parse_ethernet {
@name(".parse_ethernet") state parse_ethernet {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.ethertype) {
16w0x8100 &&& 16w0xefff: parse_vlan_tag;
16w0x800: parse_ipv4;
default: accept;
}
}
state parse_ipv4 {
@name(".parse_ipv4") state parse_ipv4 {
packet.extract<ipv4_t>(hdr.ipv4);
transition accept;
}
state parse_vlan_tag {
@name(".parse_vlan_tag") state parse_vlan_tag {
packet.extract<vlan_tag_t>(hdr.vlan_tag[32w0]);
transition select(hdr.vlan_tag[32w0].ethertype) {
16w0x8100 &&& 16w0xefff: parse_vlan_tag1;
Expand All @@ -78,7 +78,7 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
state parse_vlan_tag2 {
transition stateOutOfBound;
}
state start {
@name(".start") state start {
transition parse_ethernet;
}
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/08-FullTPHV3-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state start {
@name(".start") state start {
packet.extract<h_8_1_t>(hdr.h_8_1);
packet.extract<h_8_2_t>(hdr.h_8_2);
packet.extract<h_8_3_t>(hdr.h_8_3);
Expand Down
14 changes: 7 additions & 7 deletions testdata/p4_14_samples_outputs/08-MultiProtocolIfElse-midend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ struct headers {
}

parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
state parse_icmp {
@name(".parse_icmp") state parse_icmp {
packet.extract<icmp_t>(hdr.icmp);
transition accept;
}
state parse_ipv4 {
@name(".parse_ipv4") state parse_ipv4 {
packet.extract<ipv4_t>(hdr.ipv4);
transition select(hdr.ipv4.fragOffset, hdr.ipv4.ihl, hdr.ipv4.protocol) {
(13w0x0 &&& 13w0x0, 4w0x5, 8w0x1): parse_icmp;
Expand All @@ -109,7 +109,7 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
default: accept;
}
}
state parse_ipv6 {
@name(".parse_ipv6") state parse_ipv6 {
packet.extract<ipv6_t>(hdr.ipv6);
transition select(hdr.ipv6.nextHdr) {
8w0x1: parse_icmp;
Expand All @@ -118,23 +118,23 @@ parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout
default: accept;
}
}
state parse_tcp {
@name(".parse_tcp") state parse_tcp {
packet.extract<tcp_t>(hdr.tcp);
transition accept;
}
state parse_udp {
@name(".parse_udp") state parse_udp {
packet.extract<udp_t>(hdr.udp);
transition accept;
}
state parse_vlan_tag {
@name(".parse_vlan_tag") state parse_vlan_tag {
packet.extract<vlan_tag_t>(hdr.vlan_tag);
transition select(hdr.vlan_tag.etherType) {
16w0x800: parse_ipv4;
16w0x86dd: parse_ipv6;
default: accept;
}
}
state start {
@name(".start") state start {
packet.extract<ethernet_t>(hdr.ethernet);
transition select(hdr.ethernet.etherType) {
16w0x8100: parse_vlan_tag;
Expand Down
Loading

0 comments on commit 01356e6

Please sign in to comment.