Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant fold casts of serializble enums #3181

Merged
merged 2 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions frontends/common/constantFolding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,13 @@ const IR::Node *DoConstantFolding::postorder(IR::Cast *e) {
} else if (auto arg = expr->to<IR::BoolLiteral>()) {
int v = arg->value ? 1 : 0;
return new IR::Constant(e->srcInfo, type, v, 10);
} else if (expr->is<IR::Member>()) {
auto ei = EnumInstance::resolve(expr, typeMap);
if (ei == nullptr)
return e;
if (auto se = ei->to<SerEnumInstance>()) {
return se->value;
}
} else {
return e;
}
Expand Down
5 changes: 3 additions & 2 deletions frontends/p4/commonInlining.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ class InlineDriver : public Visitor {
public:
InlineDriver(
InlineList* toInline, AbstractInliner<InlineList, InlineWorkList> *inliner) :
toInline(toInline), inliner(inliner)
{ CHECK_NULL(toInline); CHECK_NULL(inliner); setName("InlineDriver"); }
toInline(toInline), inliner(inliner) {
CHECK_NULL(toInline); CHECK_NULL(inliner);
setName((cstring("InlineDriver_") + cstring(inliner->name())).c_str()); }
rst0git marked this conversation as resolved.
Show resolved Hide resolved
const IR::Node* apply_visitor(const IR::Node *program, const char * = 0) override {
LOG2("InlineDriver");
toInline->analyze();
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/copy_to_cpu-first.p4
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t

control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) {
@name(".do_copy_to_cpu") action do_copy_to_cpu() {
clone_preserving_field_list(CloneType.I2E, 32w250, (bit<8>)FieldLists.copy_to_cpu_fields);
clone_preserving_field_list(CloneType.I2E, 32w250, 8w1);
}
@name(".copy_to_cpu") table copy_to_cpu {
actions = {
Expand Down
7 changes: 1 addition & 6 deletions testdata/p4_14_samples_outputs/copy_to_cpu-frontend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
#define V1MODEL_VERSION 20200408
#include <v1model.p4>

enum bit<8> FieldLists {
none = 8w0,
copy_to_cpu_fields = 8w1
}

struct intrinsic_metadata_t {
bit<4> mcast_grp;
bit<4> egress_rid;
Expand Down Expand Up @@ -86,7 +81,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
@noWarn("unused") @name(".NoAction") action NoAction_3() {
}
@name(".do_copy_to_cpu") action do_copy_to_cpu() {
clone_preserving_field_list(CloneType.I2E, 32w250, (bit<8>)FieldLists.copy_to_cpu_fields);
clone_preserving_field_list(CloneType.I2E, 32w250, 8w1);
}
@name(".copy_to_cpu") table copy_to_cpu_0 {
actions = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710633;
meta.mymeta.f1 = meta.mymeta.f1 + 8w23;
meta.mymeta.clone_e2e_count = meta.mymeta.clone_e2e_count + 8w1;
clone_preserving_field_list(CloneType.E2E, 32w1, (bit<8>)FieldLists.clone_e2e_FL);
clone_preserving_field_list(CloneType.E2E, 32w1, 8w1);
}
@name(".do_recirculate") action do_recirculate() {
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710637;
meta.mymeta.f1 = meta.mymeta.f1 + 8w19;
meta.mymeta.recirculate_count = meta.mymeta.recirculate_count + 8w1;
recirculate_preserving_field_list((bit<8>)FieldLists.recirculate_FL);
recirculate_preserving_field_list(8w2);
}
@name("._nop") action _nop() {
}
Expand Down Expand Up @@ -230,7 +230,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710639;
meta.mymeta.f1 = meta.mymeta.f1 + 8w17;
meta.mymeta.resubmit_count = meta.mymeta.resubmit_count + 8w1;
resubmit_preserving_field_list((bit<8>)FieldLists.resubmit_FL);
resubmit_preserving_field_list(8w3);
}
@name("._nop") action _nop() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710633;
meta.mymeta.f1 = meta.mymeta.f1 + 8w23;
meta.mymeta.clone_e2e_count = meta.mymeta.clone_e2e_count + 8w1;
clone_preserving_field_list(CloneType.E2E, 32w1, (bit<8>)FieldLists.clone_e2e_FL);
clone_preserving_field_list(CloneType.E2E, 32w1, 8w1);
}
@name(".do_recirculate") action do_recirculate() {
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710637;
meta.mymeta.f1 = meta.mymeta.f1 + 8w19;
meta.mymeta.recirculate_count = meta.mymeta.recirculate_count + 8w1;
recirculate_preserving_field_list((bit<8>)FieldLists.recirculate_FL);
recirculate_preserving_field_list(8w2);
}
@name("._nop") action _nop() {
}
Expand Down Expand Up @@ -259,7 +259,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710639;
meta.mymeta.f1 = meta.mymeta.f1 + 8w17;
meta.mymeta.resubmit_count = meta.mymeta.resubmit_count + 8w1;
resubmit_preserving_field_list((bit<8>)FieldLists.resubmit_FL);
resubmit_preserving_field_list(8w3);
}
@name("._nop") action _nop_3() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710633;
meta.mymeta.f1 = meta.mymeta.f1 + 8w23;
meta.mymeta.clone_e2e_count = meta.mymeta.clone_e2e_count + 8w1;
clone_preserving_field_list(CloneType.E2E, 32w1, (bit<8>)FieldLists.clone_e2e_FL);
clone_preserving_field_list(CloneType.E2E, 32w1, 8w1);
}
@name(".do_recirculate") action do_recirculate() {
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710637;
meta.mymeta.f1 = meta.mymeta.f1 + 8w19;
meta.mymeta.recirculate_count = meta.mymeta.recirculate_count + 8w1;
recirculate_preserving_field_list((bit<8>)FieldLists.recirculate_FL);
recirculate_preserving_field_list(8w2);
}
@name("._nop") action _nop() {
}
Expand Down Expand Up @@ -242,7 +242,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710639;
meta.mymeta.f1 = meta.mymeta.f1 + 8w17;
meta.mymeta.resubmit_count = meta.mymeta.resubmit_count + 8w1;
resubmit_preserving_field_list((bit<8>)FieldLists.resubmit_FL);
resubmit_preserving_field_list(8w3);
}
@name("._nop") action _nop() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710633;
meta.mymeta.f1 = meta.mymeta.f1 + 8w23;
meta.mymeta.clone_e2e_count = meta.mymeta.clone_e2e_count + 8w1;
clone_preserving_field_list(CloneType.E2E, 32w1, (bit<8>)FieldLists.clone_e2e_FL);
clone_preserving_field_list(CloneType.E2E, 32w1, 8w1);
}
@name(".do_recirculate") action do_recirculate() {
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710637;
meta.mymeta.f1 = meta.mymeta.f1 + 8w19;
meta.mymeta.recirculate_count = meta.mymeta.recirculate_count + 8w1;
recirculate_preserving_field_list((bit<8>)FieldLists.recirculate_FL);
recirculate_preserving_field_list(8w2);
}
@name("._nop") action _nop() {
}
Expand Down Expand Up @@ -271,7 +271,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710639;
meta.mymeta.f1 = meta.mymeta.f1 + 8w17;
meta.mymeta.resubmit_count = meta.mymeta.resubmit_count + 8w1;
resubmit_preserving_field_list((bit<8>)FieldLists.resubmit_FL);
resubmit_preserving_field_list(8w3);
}
@name("._nop") action _nop_3() {
}
Expand Down
6 changes: 3 additions & 3 deletions testdata/p4_14_samples_outputs/p414-special-ops-first.p4
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710633;
meta.mymeta.f1 = meta.mymeta.f1 + 8w23;
meta.mymeta.clone_e2e_count = meta.mymeta.clone_e2e_count + 8w1;
clone_preserving_field_list(CloneType.E2E, 32w1, (bit<8>)FieldLists.clone_e2e_FL);
clone_preserving_field_list(CloneType.E2E, 32w1, 8w1);
}
@name(".do_recirculate") action do_recirculate() {
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710637;
meta.mymeta.f1 = meta.mymeta.f1 + 8w19;
meta.mymeta.recirculate_count = meta.mymeta.recirculate_count + 8w1;
recirculate_preserving_field_list((bit<8>)FieldLists.recirculate_FL);
recirculate_preserving_field_list(8w2);
}
@name("._nop") action _nop() {
}
Expand Down Expand Up @@ -229,7 +229,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710639;
meta.mymeta.f1 = meta.mymeta.f1 + 8w17;
meta.mymeta.resubmit_count = meta.mymeta.resubmit_count + 8w1;
resubmit_preserving_field_list((bit<8>)FieldLists.resubmit_FL);
resubmit_preserving_field_list(8w3);
}
@name("._nop") action _nop() {
}
Expand Down
6 changes: 3 additions & 3 deletions testdata/p4_14_samples_outputs/p414-special-ops-frontend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710633;
meta.mymeta.f1 = meta.mymeta.f1 + 8w23;
meta.mymeta.clone_e2e_count = meta.mymeta.clone_e2e_count + 8w1;
clone_preserving_field_list(CloneType.E2E, 32w1, (bit<8>)FieldLists.clone_e2e_FL);
clone_preserving_field_list(CloneType.E2E, 32w1, 8w1);
}
@name(".do_recirculate") action do_recirculate() {
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710637;
meta.mymeta.f1 = meta.mymeta.f1 + 8w19;
meta.mymeta.recirculate_count = meta.mymeta.recirculate_count + 8w1;
recirculate_preserving_field_list((bit<8>)FieldLists.recirculate_FL);
recirculate_preserving_field_list(8w2);
}
@name("._nop") action _nop() {
}
Expand Down Expand Up @@ -258,7 +258,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ethernet.srcAddr = hdr.ethernet.srcAddr + 48w281474976710639;
meta.mymeta.f1 = meta.mymeta.f1 + 8w17;
meta.mymeta.resubmit_count = meta.mymeta.resubmit_count + 8w1;
resubmit_preserving_field_list((bit<8>)FieldLists.resubmit_FL);
resubmit_preserving_field_list(8w3);
}
@name("._nop") action _nop_3() {
}
Expand Down
8 changes: 4 additions & 4 deletions testdata/p4_14_samples_outputs/packet_redirect-first.p4
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
@name("._nop") action _nop() {
}
@name("._recirculate") action _recirculate() {
recirculate_preserving_field_list((bit<8>)FieldLists.redirect_FL);
recirculate_preserving_field_list(8w1);
}
@name("._clone_e2e") action _clone_e2e(bit<32> mirror_id) {
clone_preserving_field_list(CloneType.E2E, mirror_id, (bit<8>)FieldLists.redirect_FL);
clone_preserving_field_list(CloneType.E2E, mirror_id, 8w1);
}
@name(".t_egress") table t_egress {
actions = {
Expand Down Expand Up @@ -88,10 +88,10 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
standard_metadata.mcast_grp = mgrp;
}
@name("._resubmit") action _resubmit() {
resubmit_preserving_field_list((bit<8>)FieldLists.redirect_FL);
resubmit_preserving_field_list(8w1);
}
@name("._clone_i2e") action _clone_i2e(bit<32> mirror_id) {
clone_preserving_field_list(CloneType.I2E, mirror_id, (bit<8>)FieldLists.redirect_FL);
clone_preserving_field_list(CloneType.I2E, mirror_id, 8w1);
}
@name(".t_ingress_1") table t_ingress_1 {
actions = {
Expand Down
8 changes: 4 additions & 4 deletions testdata/p4_14_samples_outputs/packet_redirect-frontend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ control egress(inout headers hdr, inout metadata meta, inout standard_metadata_t
@name("._nop") action _nop() {
}
@name("._recirculate") action _recirculate() {
recirculate_preserving_field_list((bit<8>)FieldLists.redirect_FL);
recirculate_preserving_field_list(8w1);
}
@name("._clone_e2e") action _clone_e2e(@name("mirror_id") bit<32> mirror_id) {
clone_preserving_field_list(CloneType.E2E, mirror_id, (bit<8>)FieldLists.redirect_FL);
clone_preserving_field_list(CloneType.E2E, mirror_id, 8w1);
}
@name(".t_egress") table t_egress_0 {
actions = {
Expand Down Expand Up @@ -96,10 +96,10 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
standard_metadata.mcast_grp = mgrp;
}
@name("._resubmit") action _resubmit() {
resubmit_preserving_field_list((bit<8>)FieldLists.redirect_FL);
resubmit_preserving_field_list(8w1);
}
@name("._clone_i2e") action _clone_i2e(@name("mirror_id") bit<32> mirror_id_2) {
clone_preserving_field_list(CloneType.I2E, mirror_id_2, (bit<8>)FieldLists.redirect_FL);
clone_preserving_field_list(CloneType.I2E, mirror_id_2, 8w1);
}
@name(".t_ingress_1") table t_ingress {
actions = {
Expand Down
2 changes: 1 addition & 1 deletion testdata/p4_14_samples_outputs/simple_nat-first.p4
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ipv4.ttl = hdr.ipv4.ttl + 8w255;
}
@name(".nat_miss_int_to_ext") action nat_miss_int_to_ext() {
clone_preserving_field_list(CloneType.I2E, 32w250, (bit<8>)FieldLists.copy_to_cpu_fields);
clone_preserving_field_list(CloneType.I2E, 32w250, 8w1);
}
@name(".nat_miss_ext_to_int") action nat_miss_ext_to_int() {
meta.meta.do_forward = 1w0;
Expand Down
7 changes: 1 addition & 6 deletions testdata/p4_14_samples_outputs/simple_nat-frontend.p4
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
#define V1MODEL_VERSION 20200408
#include <v1model.p4>

enum bit<8> FieldLists {
none = 8w0,
copy_to_cpu_fields = 8w1
}

struct intrinsic_metadata_t {
bit<4> mcast_grp;
bit<4> egress_rid;
Expand Down Expand Up @@ -211,7 +206,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_
hdr.ipv4.ttl = hdr.ipv4.ttl + 8w255;
}
@name(".nat_miss_int_to_ext") action nat_miss_int_to_ext() {
clone_preserving_field_list(CloneType.I2E, 32w250, (bit<8>)FieldLists.copy_to_cpu_fields);
clone_preserving_field_list(CloneType.I2E, 32w250, 8w1);
}
@name(".nat_miss_ext_to_int") action nat_miss_ext_to_int() {
meta.meta.do_forward = 1w0;
Expand Down
20 changes: 10 additions & 10 deletions testdata/p4_14_samples_outputs/switch_20160512/switch-first.p4
Original file line number Diff line number Diff line change
Expand Up @@ -2979,15 +2979,15 @@ control process_egress_acl(inout headers hdr, inout metadata meta, inout standar
}
@name(".egress_mirror") action egress_mirror(bit<32> session_id) {
meta.i2e_metadata.mirror_session_id = (bit<16>)session_id;
clone_preserving_field_list(CloneType.E2E, session_id, (bit<8>)FieldLists.e2e_mirror_info);
clone_preserving_field_list(CloneType.E2E, session_id, 8w3);
}
@name(".egress_mirror_drop") action egress_mirror_drop(bit<32> session_id) {
egress_mirror(session_id);
mark_to_drop(standard_metadata);
}
@name(".egress_copy_to_cpu") action egress_copy_to_cpu(bit<16> reason_code) {
meta.fabric_metadata.reason_code = reason_code;
clone_preserving_field_list(CloneType.E2E, 32w250, (bit<8>)FieldLists.cpu_info);
clone_preserving_field_list(CloneType.E2E, 32w250, 8w2);
}
@name(".egress_redirect_to_cpu") action egress_redirect_to_cpu(bit<16> reason_code) {
egress_copy_to_cpu(reason_code);
Expand Down Expand Up @@ -3511,7 +3511,7 @@ control process_int_endpoint(inout headers hdr, inout metadata meta, inout stand
@name(".int_sink") action int_sink(bit<32> mirror_id) {
meta.int_metadata_i2e.sink = 1w1;
meta.i2e_metadata.mirror_session_id = (bit<16>)mirror_id;
clone_preserving_field_list(CloneType.I2E, mirror_id, (bit<8>)FieldLists.int_i2e_mirror_info);
clone_preserving_field_list(CloneType.I2E, mirror_id, 8w4);
hdr.int_header.setInvalid();
hdr.int_val[0].setInvalid();
hdr.int_val[1].setInvalid();
Expand Down Expand Up @@ -4302,7 +4302,7 @@ control process_ingress_sflow(inout headers hdr, inout metadata meta, inout stan
@name(".sflow_ing_pkt_to_cpu") action sflow_ing_pkt_to_cpu(bit<32> sflow_i2e_mirror_id, bit<16> reason_code) {
meta.fabric_metadata.reason_code = reason_code;
meta.i2e_metadata.mirror_session_id = (bit<16>)sflow_i2e_mirror_id;
clone_preserving_field_list(CloneType.I2E, sflow_i2e_mirror_id, (bit<8>)FieldLists.sflow_cpu_info);
clone_preserving_field_list(CloneType.I2E, sflow_i2e_mirror_id, 8w6);
}
@name(".sflow_ing_session_enable") action sflow_ing_session_enable(bit<32> rate_thr, bit<16> session_id) {
meta.ingress_metadata.sflow_take_sample = rate_thr |+| meta.ingress_metadata.sflow_take_sample;
Expand All @@ -4315,7 +4315,7 @@ control process_ingress_sflow(inout headers hdr, inout metadata meta, inout stan
sflow_ingress_session_pkt_counter.count();
meta.fabric_metadata.reason_code = reason_code;
meta.i2e_metadata.mirror_session_id = (bit<16>)sflow_i2e_mirror_id;
clone_preserving_field_list(CloneType.I2E, sflow_i2e_mirror_id, (bit<8>)FieldLists.sflow_cpu_info);
clone_preserving_field_list(CloneType.I2E, sflow_i2e_mirror_id, 8w6);
}
@name(".sflow_ing_take_sample") table sflow_ing_take_sample {
actions = {
Expand Down Expand Up @@ -4533,7 +4533,7 @@ control process_mac_acl(inout headers hdr, inout metadata meta, inout standard_m
@name(".acl_mirror") action acl_mirror(bit<32> session_id, bit<14> acl_stats_index, bit<16> acl_meter_index) {
meta.i2e_metadata.mirror_session_id = (bit<16>)session_id;
meta.i2e_metadata.ingress_tstamp = (bit<32>)standard_metadata.ingress_global_timestamp;
clone_preserving_field_list(CloneType.I2E, session_id, (bit<8>)FieldLists.i2e_mirror_info);
clone_preserving_field_list(CloneType.I2E, session_id, 8w1);
meta.acl_metadata.acl_stats_index = acl_stats_index;
meta.meter_metadata.meter_index = acl_meter_index;
}
Expand Down Expand Up @@ -4601,7 +4601,7 @@ control process_ip_acl(inout headers hdr, inout metadata meta, inout standard_me
@name(".acl_mirror") action acl_mirror(bit<32> session_id, bit<14> acl_stats_index, bit<16> acl_meter_index) {
meta.i2e_metadata.mirror_session_id = (bit<16>)session_id;
meta.i2e_metadata.ingress_tstamp = (bit<32>)standard_metadata.ingress_global_timestamp;
clone_preserving_field_list(CloneType.I2E, session_id, (bit<8>)FieldLists.i2e_mirror_info);
clone_preserving_field_list(CloneType.I2E, session_id, 8w1);
meta.acl_metadata.acl_stats_index = acl_stats_index;
meta.meter_metadata.meter_index = acl_meter_index;
}
Expand Down Expand Up @@ -5852,15 +5852,15 @@ control process_system_acl(inout headers hdr, inout metadata meta, inout standar
}
@name(".copy_to_cpu_with_reason") action copy_to_cpu_with_reason(bit<16> reason_code) {
meta.fabric_metadata.reason_code = reason_code;
clone_preserving_field_list(CloneType.I2E, 32w250, (bit<8>)FieldLists.cpu_info);
clone_preserving_field_list(CloneType.I2E, 32w250, 8w2);
}
@name(".redirect_to_cpu") action redirect_to_cpu(bit<16> reason_code) {
copy_to_cpu_with_reason(reason_code);
mark_to_drop(standard_metadata);
meta.fabric_metadata.dst_device = 8w0;
}
@name(".copy_to_cpu") action copy_to_cpu() {
clone_preserving_field_list(CloneType.I2E, 32w250, (bit<8>)FieldLists.cpu_info);
clone_preserving_field_list(CloneType.I2E, 32w250, 8w2);
}
@name(".drop_packet") action drop_packet() {
mark_to_drop(standard_metadata);
Expand All @@ -5870,7 +5870,7 @@ control process_system_acl(inout headers hdr, inout metadata meta, inout standar
mark_to_drop(standard_metadata);
}
@name(".negative_mirror") action negative_mirror(bit<32> session_id) {
clone_preserving_field_list(CloneType.I2E, session_id, (bit<8>)FieldLists.mirror_info);
clone_preserving_field_list(CloneType.I2E, session_id, 8w5);
mark_to_drop(standard_metadata);
}
@name(".drop_stats") table drop_stats_0 {
Expand Down
Loading