Move digest handling into parser
This commit is contained in:
parent
37de257a7d
commit
6fce1d7f7d
2 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,7 @@ parser TopParser(packet_in packet,
|
||||||
inout sume_metadata_t standard_metadata) {
|
inout sume_metadata_t standard_metadata) {
|
||||||
|
|
||||||
#include "parsers.p4"
|
#include "parsers.p4"
|
||||||
digest_data.unused = 0; /* avoid compiler warning */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
meta.v6sum = 0;
|
meta.v6sum = 0;
|
||||||
meta.headerdiff = 0;
|
meta.headerdiff = 0;
|
||||||
|
|
||||||
|
#ifdef _SUME_SWITCH_P4_
|
||||||
|
digest_data.unused = 0; /* avoid compiler warning */
|
||||||
|
#endif
|
||||||
|
|
||||||
packet.extract(hdr.ethernet);
|
packet.extract(hdr.ethernet);
|
||||||
transition select(hdr.ethernet.ethertype){
|
transition select(hdr.ethernet.ethertype){
|
||||||
TYPE_IPV4: ipv4;
|
TYPE_IPV4: ipv4;
|
||||||
|
|
Loading…
Reference in a new issue