From ccfca0ad21b050f23f3ec5ff65e3151a636b6264 Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Tue, 8 Oct 2024 21:53:09 -0700 Subject: [PATCH] Update expected output files for modified test programs --- .../multicast-bmv2-first.p4 | 162 ++++++++++++++++++ .../p4_16_errors_outputs/multicast-bmv2.p4 | 154 +++++++++++++++++ testdata/p4_16_samples/issue1949-bmv2.p4 | 84 +++++++++ .../name_annotations_to_p4info-bmv2.p4 | 69 ++++++++ .../multicast-bmv2-first.p4 | 4 +- .../multicast-bmv2-frontend.p4 | 6 +- .../multicast-bmv2-midend.p4 | 6 +- .../p4_16_samples_outputs/multicast-bmv2.p4 | 4 +- .../multicast-bmv2.p4.p4info.txtpb | 19 +- .../named_meter_1-bmv2-first.p4 | 4 +- .../named_meter_1-bmv2-frontend.p4 | 4 +- .../named_meter_1-bmv2-midend.p4 | 4 +- .../named_meter_1-bmv2.p4 | 4 +- .../named_meter_1-bmv2.p4.p4info.txtpb | 17 +- .../named_meter_bmv2-first.p4 | 4 +- .../named_meter_bmv2-frontend.p4 | 4 +- .../named_meter_bmv2-midend.p4 | 4 +- .../p4_16_samples_outputs/named_meter_bmv2.p4 | 4 +- .../named_meter_bmv2.p4.p4info.txtpb | 17 +- 19 files changed, 532 insertions(+), 42 deletions(-) create mode 100644 testdata/p4_16_errors_outputs/multicast-bmv2-first.p4 create mode 100644 testdata/p4_16_errors_outputs/multicast-bmv2.p4 create mode 100644 testdata/p4_16_samples/issue1949-bmv2.p4 create mode 100644 testdata/p4_16_samples/name_annotations_to_p4info-bmv2.p4 diff --git a/testdata/p4_16_errors_outputs/multicast-bmv2-first.p4 b/testdata/p4_16_errors_outputs/multicast-bmv2-first.p4 new file mode 100644 index 00000000000..44fb930e118 --- /dev/null +++ b/testdata/p4_16_errors_outputs/multicast-bmv2-first.p4 @@ -0,0 +1,162 @@ +#include +#define V1MODEL_VERSION 20180101 +#include + +struct routing_metadata_t { + bit<32> nhop_ipv4; +} + +header ethernet_t { + bit<48> dstAddr; + bit<48> srcAddr; + bit<16> etherType; +} + +header ipv4_t { + bit<4> version; + bit<4> ihl; + bit<8> diffserv; + bit<16> totalLen; + bit<16> identification; + bit<3> flags; + bit<13> fragOffset; + bit<8> ttl; + bit<8> protocol; + bit<16> hdrChecksum; + bit<32> srcAddr; + bit<32> dstAddr; +} + +struct metadata { + @name("routing_metadata") + routing_metadata_t routing_metadata; +} + +struct headers { + @name("ethernet") + ethernet_t ethernet; + @name("ipv4") + ipv4_t ipv4; +} + +parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { + @name("parse_ethernet") state parse_ethernet { + packet.extract(hdr.ethernet); + transition select(hdr.ethernet.etherType) { + 16w0x800: parse_ipv4; + default: accept; + } + } + @name("parse_ipv4") state parse_ipv4 { + packet.extract(hdr.ipv4); + transition accept; + } + @name("start") state start { + transition parse_ethernet; + } +} + +control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { + @name(".rewrite_mac") action rewrite_mac(bit<48> smac) { + hdr.ethernet.srcAddr = smac; + } + @name("._drop") action _drop() { + mark_to_drop(standard_metadata); + } + @name("send_frame") table send_frame { + actions = { + rewrite_mac(); + _drop(); + @defaultonly NoAction(); + } + key = { + standard_metadata.egress_port: exact @name("standard_metadata.egress_port"); + } + size = 256; + default_action = NoAction(); + } + apply { + send_frame.apply(); + } +} + +control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { + @name(".bcast") action bcast() { + standard_metadata.mcast_grp = 16w1; + } + @name(".set_dmac") action set_dmac(bit<48> dmac) { + hdr.ethernet.dstAddr = dmac; + } + @name("._drop") action _drop() { + mark_to_drop(standard_metadata); + } + @name(".set_nhop") action set_nhop(bit<32> nhop_ipv4, bit<9> port) { + meta.routing_metadata.nhop_ipv4 = nhop_ipv4; + standard_metadata.egress_spec = port; + hdr.ipv4.ttl = hdr.ipv4.ttl + 8w255; + } + @name(".set_nhop_redirect") action set_nhop_redirect(bit<32> nhop_ipv4, bit<9> port) { + meta.routing_metadata.nhop_ipv4 = nhop_ipv4; + standard_metadata.egress_spec = port; + hdr.ipv4.ttl = hdr.ipv4.ttl + 8w255; + } + @name("broadcast") table broadcast { + actions = { + bcast(); + @defaultonly NoAction(); + } + size = 1; + default_action = NoAction(); + } + @name("forward") table forward { + actions = { + set_dmac(); + _drop(); + @defaultonly NoAction(); + } + key = { + meta.routing_metadata.nhop_ipv4: exact @name("meta.routing_metadata.nhop_ipv4"); + } + size = 512; + default_action = NoAction(); + } + @name("ipv4_lpm") table ipv4_lpm { + actions = { + set_nhop(); + _drop(); + @defaultonly NoAction(); + } + key = { + hdr.ipv4.dstAddr: lpm @name("hdr.ipv4.dstAddr"); + } + size = 1024; + default_action = NoAction(); + } + apply { + if (hdr.ipv4.isValid()) { + ipv4_lpm.apply(); + forward.apply(); + } else { + broadcast.apply(); + } + } +} + +control DeparserImpl(packet_out packet, in headers hdr) { + apply { + packet.emit(hdr.ethernet); + packet.emit(hdr.ipv4); + } +} + +control verifyChecksum(inout headers hdr, inout metadata meta) { + apply { + } +} + +control computeChecksum(inout headers hdr, inout metadata meta) { + apply { + } +} + +V1Switch(ParserImpl(), verifyChecksum(), ingress(), egress(), computeChecksum(), DeparserImpl()) main; diff --git a/testdata/p4_16_errors_outputs/multicast-bmv2.p4 b/testdata/p4_16_errors_outputs/multicast-bmv2.p4 new file mode 100644 index 00000000000..fdf4220703c --- /dev/null +++ b/testdata/p4_16_errors_outputs/multicast-bmv2.p4 @@ -0,0 +1,154 @@ +#include +#define V1MODEL_VERSION 20180101 +#include + +struct routing_metadata_t { + bit<32> nhop_ipv4; +} + +header ethernet_t { + bit<48> dstAddr; + bit<48> srcAddr; + bit<16> etherType; +} + +header ipv4_t { + bit<4> version; + bit<4> ihl; + bit<8> diffserv; + bit<16> totalLen; + bit<16> identification; + bit<3> flags; + bit<13> fragOffset; + bit<8> ttl; + bit<8> protocol; + bit<16> hdrChecksum; + bit<32> srcAddr; + bit<32> dstAddr; +} + +struct metadata { + @name("routing_metadata") + routing_metadata_t routing_metadata; +} + +struct headers { + @name("ethernet") + ethernet_t ethernet; + @name("ipv4") + ipv4_t ipv4; +} + +parser ParserImpl(packet_in packet, out headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { + @name("parse_ethernet") state parse_ethernet { + packet.extract(hdr.ethernet); + transition select(hdr.ethernet.etherType) { + 16w0x800: parse_ipv4; + default: accept; + } + } + @name("parse_ipv4") state parse_ipv4 { + packet.extract(hdr.ipv4); + transition accept; + } + @name("start") state start { + transition parse_ethernet; + } +} + +control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { + @name(".rewrite_mac") action rewrite_mac(bit<48> smac) { + hdr.ethernet.srcAddr = smac; + } + @name("._drop") action _drop() { + mark_to_drop(standard_metadata); + } + @name("send_frame") table send_frame { + actions = { + rewrite_mac; + _drop; + } + key = { + standard_metadata.egress_port: exact; + } + size = 256; + } + apply { + send_frame.apply(); + } +} + +control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { + @name(".bcast") action bcast() { + standard_metadata.mcast_grp = 1; + } + @name(".set_dmac") action set_dmac(bit<48> dmac) { + hdr.ethernet.dstAddr = dmac; + } + @name("._drop") action _drop() { + mark_to_drop(standard_metadata); + } + @name(".set_nhop") action set_nhop(bit<32> nhop_ipv4, bit<9> port) { + meta.routing_metadata.nhop_ipv4 = nhop_ipv4; + standard_metadata.egress_spec = port; + hdr.ipv4.ttl = hdr.ipv4.ttl + 8w255; + } + @name(".set_nhop_redirect") action set_nhop_redirect(bit<32> nhop_ipv4, bit<9> port) { + meta.routing_metadata.nhop_ipv4 = nhop_ipv4; + standard_metadata.egress_spec = port; + hdr.ipv4.ttl = hdr.ipv4.ttl + 8w255; + } + @name("broadcast") table broadcast { + actions = { + bcast; + } + size = 1; + } + @name("forward") table forward { + actions = { + set_dmac; + _drop; + } + key = { + meta.routing_metadata.nhop_ipv4: exact; + } + size = 512; + } + @name("ipv4_lpm") table ipv4_lpm { + actions = { + set_nhop; + _drop; + } + key = { + hdr.ipv4.dstAddr: lpm; + } + size = 1024; + } + apply { + if (hdr.ipv4.isValid()) { + ipv4_lpm.apply(); + forward.apply(); + } else { + broadcast.apply(); + } + } +} + +control DeparserImpl(packet_out packet, in headers hdr) { + apply { + packet.emit(hdr.ethernet); + packet.emit(hdr.ipv4); + } +} + +control verifyChecksum(inout headers hdr, inout metadata meta) { + apply { + } +} + +control computeChecksum(inout headers hdr, inout metadata meta) { + apply { + } +} + +V1Switch(ParserImpl(), verifyChecksum(), ingress(), egress(), computeChecksum(), DeparserImpl()) main; diff --git a/testdata/p4_16_samples/issue1949-bmv2.p4 b/testdata/p4_16_samples/issue1949-bmv2.p4 new file mode 100644 index 00000000000..5eb22a115a7 --- /dev/null +++ b/testdata/p4_16_samples/issue1949-bmv2.p4 @@ -0,0 +1,84 @@ +/* +Copyright 2019 Cisco Systems, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#include +#include + +header h1_t { + bit<8> f1; + bit<8> f2; +} + +struct headers_t { + h1_t h1; +} + +struct metadata_t { +} + +parser parserImpl(packet_in packet, + out headers_t hdr, + inout metadata_t meta, + inout standard_metadata_t stdmeta) +{ + state start { + packet.extract(hdr.h1); + transition accept; + } +} + +control ingressImpl(inout headers_t hdr, + inout metadata_t meta, + inout standard_metadata_t stdmeta) +{ + @name(".foo") action act1() { + hdr.h1.f1 = hdr.h1.f1 >> 2; + } + @name(".foo") action act2() { + hdr.h1.f1 = hdr.h1.f1 << 3; + } + table t1 { + key = { hdr.h1.f1 : exact; } + actions = { act1; act2; NoAction; } + const default_action = NoAction; + } + apply { + t1.apply(); + } +} + +control verifyChecksum(inout headers_t hdr, inout metadata_t meta) { + apply { + } +} + +control egressImpl(inout headers_t hdr, inout metadata_t meta, inout standard_metadata_t stdmeta) { + apply { + } +} + +control updateChecksum(inout headers_t hdr, inout metadata_t meta) { + apply { + } +} + +control deparserImpl(packet_out packet, in headers_t hdr) { + apply { + } +} + +V1Switch(parserImpl(), verifyChecksum(), ingressImpl(), egressImpl(), updateChecksum(), deparserImpl()) main; + diff --git a/testdata/p4_16_samples/name_annotations_to_p4info-bmv2.p4 b/testdata/p4_16_samples/name_annotations_to_p4info-bmv2.p4 new file mode 100644 index 00000000000..bb1f7627cc0 --- /dev/null +++ b/testdata/p4_16_samples/name_annotations_to_p4info-bmv2.p4 @@ -0,0 +1,69 @@ +/* +Copyright 2021 Intel Corporation + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +#include +#include + +struct H { }; +struct M { + bit<32> hash1; +} + +parser ParserI(packet_in pk, out H hdr, inout M meta, inout standard_metadata_t smeta) { + state start { transition accept; } +} + +@name("altIngressName") +control IngressI(inout H hdr, inout M meta, inout standard_metadata_t smeta) { + @name("blue") + action foo(@name("orange") bit<9> port) { + smeta.egress_spec = port; + } + + @name("red") + table foo_table { + key = { + smeta.ingress_port : exact @name("green"); + } + actions = { + @name("yellow") foo; + @name("grey") NoAction; + } + const default_action = NoAction(); + } + apply { + foo_table.apply(); + } +}; + +control EgressI(inout H hdr, inout M meta, inout standard_metadata_t smeta) { + apply { } +}; + +control DeparserI(packet_out pk, in H hdr) { + apply { } +} + +control VerifyChecksumI(inout H hdr, inout M meta) { + apply { } +} + +control ComputeChecksumI(inout H hdr, inout M meta) { + apply { } +} + +V1Switch(ParserI(), VerifyChecksumI(), IngressI(), EgressI(), + ComputeChecksumI(), DeparserI()) main; diff --git a/testdata/p4_16_samples_outputs/multicast-bmv2-first.p4 b/testdata/p4_16_samples_outputs/multicast-bmv2-first.p4 index 44fb930e118..549f83c13a1 100644 --- a/testdata/p4_16_samples_outputs/multicast-bmv2-first.p4 +++ b/testdata/p4_16_samples_outputs/multicast-bmv2-first.p4 @@ -60,7 +60,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t @name(".rewrite_mac") action rewrite_mac(bit<48> smac) { hdr.ethernet.srcAddr = smac; } - @name("._drop") action _drop() { + @name("_drop") action _drop() { mark_to_drop(standard_metadata); } @name("send_frame") table send_frame { @@ -87,7 +87,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ @name(".set_dmac") action set_dmac(bit<48> dmac) { hdr.ethernet.dstAddr = dmac; } - @name("._drop") action _drop() { + @name("_drop") action _drop() { mark_to_drop(standard_metadata); } @name(".set_nhop") action set_nhop(bit<32> nhop_ipv4, bit<9> port) { diff --git a/testdata/p4_16_samples_outputs/multicast-bmv2-frontend.p4 b/testdata/p4_16_samples_outputs/multicast-bmv2-frontend.p4 index 95148afd70f..25a2fed91b6 100644 --- a/testdata/p4_16_samples_outputs/multicast-bmv2-frontend.p4 +++ b/testdata/p4_16_samples_outputs/multicast-bmv2-frontend.p4 @@ -62,7 +62,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t @name(".rewrite_mac") action rewrite_mac(@name("smac") bit<48> smac) { hdr.ethernet.srcAddr = smac; } - @name("._drop") action _drop() { + @name("egress._drop") action _drop() { mark_to_drop(standard_metadata); } @name("egress.send_frame") table send_frame_0 { @@ -95,10 +95,10 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ @name(".set_dmac") action set_dmac(@name("dmac") bit<48> dmac) { hdr.ethernet.dstAddr = dmac; } - @name("._drop") action _drop_2() { + @name("ingress._drop") action _drop_2() { mark_to_drop(standard_metadata); } - @name("._drop") action _drop_3() { + @name("ingress._drop") action _drop_3() { mark_to_drop(standard_metadata); } @name(".set_nhop") action set_nhop(@name("nhop_ipv4") bit<32> nhop_ipv4_1, @name("port") bit<9> port) { diff --git a/testdata/p4_16_samples_outputs/multicast-bmv2-midend.p4 b/testdata/p4_16_samples_outputs/multicast-bmv2-midend.p4 index 10afd1f4bb2..7845e575bc9 100644 --- a/testdata/p4_16_samples_outputs/multicast-bmv2-midend.p4 +++ b/testdata/p4_16_samples_outputs/multicast-bmv2-midend.p4 @@ -61,7 +61,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t @name(".rewrite_mac") action rewrite_mac(@name("smac") bit<48> smac) { hdr.ethernet.srcAddr = smac; } - @name("._drop") action _drop() { + @name("egress._drop") action _drop() { mark_to_drop(standard_metadata); } @name("egress.send_frame") table send_frame_0 { @@ -94,10 +94,10 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ @name(".set_dmac") action set_dmac(@name("dmac") bit<48> dmac) { hdr.ethernet.dstAddr = dmac; } - @name("._drop") action _drop_2() { + @name("ingress._drop") action _drop_2() { mark_to_drop(standard_metadata); } - @name("._drop") action _drop_3() { + @name("ingress._drop") action _drop_3() { mark_to_drop(standard_metadata); } @name(".set_nhop") action set_nhop(@name("nhop_ipv4") bit<32> nhop_ipv4_1, @name("port") bit<9> port) { diff --git a/testdata/p4_16_samples_outputs/multicast-bmv2.p4 b/testdata/p4_16_samples_outputs/multicast-bmv2.p4 index fdf4220703c..f608cc80b0f 100644 --- a/testdata/p4_16_samples_outputs/multicast-bmv2.p4 +++ b/testdata/p4_16_samples_outputs/multicast-bmv2.p4 @@ -60,7 +60,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t @name(".rewrite_mac") action rewrite_mac(bit<48> smac) { hdr.ethernet.srcAddr = smac; } - @name("._drop") action _drop() { + @name("_drop") action _drop() { mark_to_drop(standard_metadata); } @name("send_frame") table send_frame { @@ -85,7 +85,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ @name(".set_dmac") action set_dmac(bit<48> dmac) { hdr.ethernet.dstAddr = dmac; } - @name("._drop") action _drop() { + @name("_drop") action _drop() { mark_to_drop(standard_metadata); } @name(".set_nhop") action set_nhop(bit<32> nhop_ipv4, bit<9> port) { diff --git a/testdata/p4_16_samples_outputs/multicast-bmv2.p4.p4info.txtpb b/testdata/p4_16_samples_outputs/multicast-bmv2.p4.p4info.txtpb index eb21c0eabd8..c22ccb32dbb 100644 --- a/testdata/p4_16_samples_outputs/multicast-bmv2.p4.p4info.txtpb +++ b/testdata/p4_16_samples_outputs/multicast-bmv2.p4.p4info.txtpb @@ -39,7 +39,7 @@ tables { id: 25234447 } action_refs { - id: 19143480 + id: 19344232 } action_refs { id: 21257015 @@ -67,7 +67,7 @@ tables { id: 23300268 } action_refs { - id: 19143480 + id: 19344232 } action_refs { id: 21257015 @@ -95,7 +95,7 @@ tables { id: 31165400 } action_refs { - id: 19143480 + id: 25850727 } action_refs { id: 21257015 @@ -136,9 +136,9 @@ actions { } actions { preamble { - id: 19143480 - name: "_drop" - alias: "_drop" + id: 19344232 + name: "ingress._drop" + alias: "ingress._drop" } } actions { @@ -170,5 +170,12 @@ actions { bitwidth: 48 } } +actions { + preamble { + id: 25850727 + name: "egress._drop" + alias: "egress._drop" + } +} type_info { } diff --git a/testdata/p4_16_samples_outputs/named_meter_1-bmv2-first.p4 b/testdata/p4_16_samples_outputs/named_meter_1-bmv2-first.p4 index 2d70d5b316e..b4b618b7596 100644 --- a/testdata/p4_16_samples_outputs/named_meter_1-bmv2-first.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_1-bmv2-first.p4 @@ -60,11 +60,11 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction(); } - @name("m_action") action m_action_0(bit<9> meter_idx) { + @name("m_action_2") action m_action_0(bit<9> meter_idx) { standard_metadata.egress_spec = meter_idx; my_meter.read(meta.meta.meter_tag); } - @name("_nop") action _nop_0() { + @name("_nop_2") action _nop_0() { my_meter.read(meta.meta.meter_tag); } @name("m_table") table m_table { diff --git a/testdata/p4_16_samples_outputs/named_meter_1-bmv2-frontend.p4 b/testdata/p4_16_samples_outputs/named_meter_1-bmv2-frontend.p4 index 551a3b2c470..2d08c566a81 100644 --- a/testdata/p4_16_samples_outputs/named_meter_1-bmv2-frontend.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_1-bmv2-frontend.p4 @@ -60,11 +60,11 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction_1(); } - @name("ingress.m_action") action m_action_0(@name("meter_idx") bit<9> meter_idx) { + @name("ingress.m_action_2") action m_action_0(@name("meter_idx") bit<9> meter_idx) { standard_metadata.egress_spec = meter_idx; my_meter.read(meta.meta.meter_tag); } - @name("ingress._nop") action _nop_0() { + @name("ingress._nop_2") action _nop_0() { my_meter.read(meta.meta.meter_tag); } @name("ingress.m_table") table m_table_0 { diff --git a/testdata/p4_16_samples_outputs/named_meter_1-bmv2-midend.p4 b/testdata/p4_16_samples_outputs/named_meter_1-bmv2-midend.p4 index 716d31df623..fe5f2004863 100644 --- a/testdata/p4_16_samples_outputs/named_meter_1-bmv2-midend.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_1-bmv2-midend.p4 @@ -59,11 +59,11 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction_1(); } - @name("ingress.m_action") action m_action_0(@name("meter_idx") bit<9> meter_idx) { + @name("ingress.m_action_2") action m_action_0(@name("meter_idx") bit<9> meter_idx) { standard_metadata.egress_spec = meter_idx; my_meter.read(meta._meta_meter_tag0); } - @name("ingress._nop") action _nop_0() { + @name("ingress._nop_2") action _nop_0() { my_meter.read(meta._meta_meter_tag0); } @name("ingress.m_table") table m_table_0 { diff --git a/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4 b/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4 index a9544c63639..75cfab9d1a0 100644 --- a/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4 @@ -60,11 +60,11 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction(); } - @name("m_action") action m_action_0(bit<9> meter_idx) { + @name("m_action_2") action m_action_0(bit<9> meter_idx) { standard_metadata.egress_spec = meter_idx; my_meter.read(meta.meta.meter_tag); } - @name("_nop") action _nop_0() { + @name("_nop_2") action _nop_0() { my_meter.read(meta.meta.meter_tag); } @name("m_table") table m_table { diff --git a/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4.p4info.txtpb b/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4.p4info.txtpb index 398c9670544..5fd57eb7b5b 100644 --- a/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4.p4info.txtpb +++ b/testdata/p4_16_samples_outputs/named_meter_1-bmv2.p4.p4info.txtpb @@ -43,10 +43,10 @@ tables { match_type: EXACT } action_refs { - id: 24512981 + id: 18971545 } action_refs { - id: 26939440 + id: 27693640 } action_refs { id: 21257015 @@ -81,9 +81,9 @@ actions { } actions { preamble { - id: 24512981 - name: "ingress.m_action" - alias: "m_action" + id: 18971545 + name: "ingress.m_action_2" + alias: "m_action_2" } params { id: 1 @@ -91,6 +91,13 @@ actions { bitwidth: 9 } } +actions { + preamble { + id: 27693640 + name: "ingress._nop_2" + alias: "_nop_2" + } +} direct_meters { preamble { id: 368209065 diff --git a/testdata/p4_16_samples_outputs/named_meter_bmv2-first.p4 b/testdata/p4_16_samples_outputs/named_meter_bmv2-first.p4 index 4234a05c5d6..08560c03e6f 100644 --- a/testdata/p4_16_samples_outputs/named_meter_bmv2-first.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_bmv2-first.p4 @@ -60,12 +60,12 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction(); } - @name("m_action") action m_action_0(bit<9> meter_idx) { + @name("m_action_2") action m_action_0(bit<9> meter_idx) { standard_metadata.egress_spec = meter_idx; standard_metadata.egress_spec = 9w1; my_meter.read(meta.meta.meter_tag); } - @name("_nop") action _nop_0() { + @name("_nop_2") action _nop_0() { my_meter.read(meta.meta.meter_tag); } @name("m_table") table m_table { diff --git a/testdata/p4_16_samples_outputs/named_meter_bmv2-frontend.p4 b/testdata/p4_16_samples_outputs/named_meter_bmv2-frontend.p4 index 8ca214c1191..49b7140c8f3 100644 --- a/testdata/p4_16_samples_outputs/named_meter_bmv2-frontend.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_bmv2-frontend.p4 @@ -60,11 +60,11 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction_1(); } - @name("ingress.m_action") action m_action_0(@name("meter_idx") bit<9> meter_idx) { + @name("ingress.m_action_2") action m_action_0(@name("meter_idx") bit<9> meter_idx) { standard_metadata.egress_spec = 9w1; my_meter_0.read(meta.meta.meter_tag); } - @name("ingress._nop") action _nop_0() { + @name("ingress._nop_2") action _nop_0() { my_meter_0.read(meta.meta.meter_tag); } @name("ingress.m_table") table m_table_0 { diff --git a/testdata/p4_16_samples_outputs/named_meter_bmv2-midend.p4 b/testdata/p4_16_samples_outputs/named_meter_bmv2-midend.p4 index 0bdd39f7a1c..7c2b71cd7a1 100644 --- a/testdata/p4_16_samples_outputs/named_meter_bmv2-midend.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_bmv2-midend.p4 @@ -59,11 +59,11 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction_1(); } - @name("ingress.m_action") action m_action_0(@name("meter_idx") bit<9> meter_idx) { + @name("ingress.m_action_2") action m_action_0(@name("meter_idx") bit<9> meter_idx) { standard_metadata.egress_spec = 9w1; my_meter_0.read(meta._meta_meter_tag0); } - @name("ingress._nop") action _nop_0() { + @name("ingress._nop_2") action _nop_0() { my_meter_0.read(meta._meta_meter_tag0); } @name("ingress.m_table") table m_table_0 { diff --git a/testdata/p4_16_samples_outputs/named_meter_bmv2.p4 b/testdata/p4_16_samples_outputs/named_meter_bmv2.p4 index 3f53812af01..c6f394e2cd4 100644 --- a/testdata/p4_16_samples_outputs/named_meter_bmv2.p4 +++ b/testdata/p4_16_samples_outputs/named_meter_bmv2.p4 @@ -60,12 +60,12 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ size = 16; default_action = NoAction(); } - @name("m_action") action m_action_0(bit<9> meter_idx) { + @name("m_action_2") action m_action_0(bit<9> meter_idx) { standard_metadata.egress_spec = meter_idx; standard_metadata.egress_spec = 9w1; my_meter.read(meta.meta.meter_tag); } - @name("_nop") action _nop_0() { + @name("_nop_2") action _nop_0() { my_meter.read(meta.meta.meter_tag); } @name("m_table") table m_table { diff --git a/testdata/p4_16_samples_outputs/named_meter_bmv2.p4.p4info.txtpb b/testdata/p4_16_samples_outputs/named_meter_bmv2.p4.p4info.txtpb index 30a57fc6528..c351804ae74 100644 --- a/testdata/p4_16_samples_outputs/named_meter_bmv2.p4.p4info.txtpb +++ b/testdata/p4_16_samples_outputs/named_meter_bmv2.p4.p4info.txtpb @@ -43,10 +43,10 @@ tables { match_type: EXACT } action_refs { - id: 24512981 + id: 18971545 } action_refs { - id: 26939440 + id: 27693640 } action_refs { id: 21257015 @@ -81,9 +81,9 @@ actions { } actions { preamble { - id: 24512981 - name: "ingress.m_action" - alias: "m_action" + id: 18971545 + name: "ingress.m_action_2" + alias: "m_action_2" } params { id: 1 @@ -91,6 +91,13 @@ actions { bitwidth: 9 } } +actions { + preamble { + id: 27693640 + name: "ingress._nop_2" + alias: "_nop_2" + } +} direct_meters { preamble { id: 354402025