diff --git a/p4src/minip4_solution.p4 b/p4src/minip4_solution.p4 index 6c512b3..fd22643 100644 --- a/p4src/minip4_solution.p4 +++ b/p4src/minip4_solution.p4 @@ -33,21 +33,33 @@ struct digest_data_t { * Parser */ -@Xilinx_MaxPacketRegion(1024) -parser TopParser(packet_in b, - out Parsed_packet p, - out user_metadata_t user_metadata, - out digest_data_t digest_data, - inout sume_metadata_t sume_metadata) { - state start { - b.extract(p.ethernet); - user_metadata.unused = 0; - digest_data.unused = 0; +// @Xilinx_MaxPacketRegion(1024) +// parser TopParser(packet_in b, +// out Parsed_packet p, +// out user_metadata_t user_metadata, +// out digest_data_t digest_data, +// inout sume_metadata_t sume_metadata) { +// state start { +// b.extract(p.ethernet); +// user_metadata.unused = 0; +// digest_data.unused = 0; - transition accept; - } +// transition accept; +// } +// } + +@Xilinx_MaxPacketRegion(1024) +parser TopParser(packet_in packet, + out headers hdr, + out metadata meta, + out digest_data_t digest_data, + inout sume_metadata_t standard_metadata) { + + #include "parsers.p4" + digest_data.unused = 0; /* avoid compiler warning */ } + /******************************************************************************** * Main */