Move digest handling into parser

This commit is contained in:
Nico Schottelius 2019-07-23 12:32:59 +02:00
parent 37de257a7d
commit 6fce1d7f7d
2 changed files with 5 additions and 1 deletions

View File

@ -56,7 +56,7 @@ parser TopParser(packet_in packet,
inout sume_metadata_t standard_metadata) {
#include "parsers.p4"
digest_data.unused = 0; /* avoid compiler warning */
}

View File

@ -17,6 +17,10 @@
meta.v6sum = 0;
meta.headerdiff = 0;
#ifdef _SUME_SWITCH_P4_
digest_data.unused = 0; /* avoid compiler warning */
#endif
packet.extract(hdr.ethernet);
transition select(hdr.ethernet.ethertype){
TYPE_IPV4: ipv4;