Several proposed changes to v1model standard_metadata for cheat sheet (#255)

* Several proposed changes to v1model standard_metadata for cheat sheet

Remove several fields that are deprecated in the v1model.p4 include file,
or will be soon:

+ drop
+ recirculate_port
+ clone_spec
+ lf_field_list
+ resubmit_flag
+ recirculate_flag

Add mention of more detailed documentation in behavioral-model
repository, for those that want to know more about how each field
behaves.

Group the fields by those that are only intended to be read in a P4
program, versues read/write, and which are only intended to be useful
in ingress, egress, or both.

* Minor updates to proposed v1model standard_metadata changes
This commit is contained in:
Andy Fingerhut 2019-12-09 13:56:15 -08:00 committed by GitHub
parent 3851d8dabe
commit 2df5f43b3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,22 +1,26 @@
struct standard_metadata_t {
// For more details see docs/simple_switch.md
// in https://github.com/p4lang/behavioral-model
// Should only read, ingress or egress
bit<9> ingress_port;
bit<9> egress_spec;
bit<9> egress_port;
bit<32> clone_spec;
bit<32> instance_type;
bit<1> drop;
bit<16> recirculate_port;
bit<32> packet_length;
bit<48> ingress_global_timestamp;
bit<1> checksum_error;
error parser_error;
// In ingress, read or write.
// In egress, should only read.
bit<9> egress_spec;
bit<16> mcast_grp;
// Should only read, only in egress
bit<9> egress_port;
bit<16> egress_rid;
bit<48> egress_global_timestamp;
bit<32> enq_timestamp;
bit<19> enq_qdepth;
bit<32> deq_timedelta;
bit<19> deq_qdepth;
bit<48> ingress_global_timestamp;
bit<48> egress_global_timestamp;
bit<32> lf_field_list;
bit<16> mcast_grp;
bit<32> resubmit_flag;
bit<16> egress_rid;
bit<1> checksum_error;
bit<32> recirculate_flag;
}
}