s/bool/bit<1>/
Fixing Invalid entry type 'expression' in field list bad json: { "type" : "expression", "value" : { "type" : "expression", "value" : { "left" : null, "op" : "d2b", "right" : { "type" : "field", "value" : [ "scalars", "metadata.chk_icmp6" ] } } } }
This commit is contained in:
parent
d1cc9d2643
commit
ec40bc2c54
3 changed files with 6 additions and 6 deletions
|
@ -22,7 +22,7 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
|
|||
control MyComputeChecksum(inout headers hdr, inout metadata meta) {
|
||||
apply {
|
||||
|
||||
update_checksum_with_payload(meta.chk_icmp6 == true,
|
||||
update_checksum_with_payload(meta.chk_icmp6 == 1,
|
||||
{
|
||||
hdr.ipv6.src_addr, /* 128 */
|
||||
hdr.ipv6.dst_addr, /* 128 */
|
||||
|
@ -61,7 +61,7 @@ control MyComputeChecksum(inout headers hdr, inout metadata meta) {
|
|||
HashAlgorithm.csum16
|
||||
);
|
||||
|
||||
update_checksum_with_payload(meta.chk_icmp == true,
|
||||
update_checksum_with_payload(meta.chk_icmp == 1,
|
||||
{
|
||||
hdr.icmp.type,
|
||||
hdr.icmp.code
|
||||
|
|
|
@ -182,8 +182,8 @@ struct metadata {
|
|||
|
||||
/* migrate tasks to bool */
|
||||
bit<1> chk_icmp6_na_ns;
|
||||
bool chk_icmp6;
|
||||
bool chk_icmp;
|
||||
bit<1> chk_icmp6;
|
||||
bit<1> chk_icmp;
|
||||
|
||||
bit<16> tcp_length;
|
||||
bit<32> cast_length;
|
||||
|
|
|
@ -14,8 +14,8 @@ parser MyParser(packet_in packet,
|
|||
|
||||
state start {
|
||||
|
||||
meta.chk_icmp = false;
|
||||
meta.chk_icmp6 = false;
|
||||
meta.chk_icmp = 0;
|
||||
meta.chk_icmp6 = 0;
|
||||
meta.chk_icmp6_na_ns = 0;
|
||||
|
||||
packet.extract(hdr.ethernet);
|
||||
|
|
Loading…
Reference in a new issue