From bfd4a359420b2e844b4040281b5b8408192087c5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 30 Mar 2019 16:57:57 +0100 Subject: [PATCH] Try to find another workaround against json error in the switch [15:54:38.463] [bmv2] [D] [thread 21721] Set default default entry for table 'MyIngress.nat46': MyIngress.controller_debug_table_id - 4, [15:54:38.463] [bmv2] [D] [thread 21721] Set default default entry for table 'tbl_act_3': act_3 - [15:54:38.463] [bmv2] [D] [thread 21721] Set default default entry for table 'tbl_act_4': act_4 - [15:54:38.463] [bmv2] [D] [thread 21721] Set default default entry for table 'tbl_nat46_icmp_generic': MyIngress.nat46_icmp_generic - [15:54:38.463] [bmv2] [D] [thread 21721] Set default default entry for table 'tbl_act_5': act_5 - [15:54:38.463] [bmv2] [D] [thread 21721] Set default default entry for table 'tbl_act_6': act_6 - [15:54:38.463] [bmv2] [D] [thread 21721] Set default default entry for table 'tbl_act_7': act_7 - 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_na_ns" ] } } } } p4@ubuntu:~/master-thesis/p4app$ --- p4src/checksums.p4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/p4src/checksums.p4 b/p4src/checksums.p4 index c729f3c..40f4e43 100644 --- a/p4src/checksums.p4 +++ b/p4src/checksums.p4 @@ -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, + update_checksum_with_payload(meta.chk_icmp6 == true, { hdr.ipv6.src_addr, /* 128 */ hdr.ipv6.dst_addr, /* 128 */ @@ -37,7 +37,7 @@ control MyComputeChecksum(inout headers hdr, inout metadata meta) { ); /* checksumming for icmp6_na_ns_option */ - update_checksum_with_payload(meta.chk_icmp6_na_ns, + update_checksum_with_payload(meta.switch_task == true, { 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, + update_checksum_with_payload(meta.chk_icmp == true, { hdr.icmp.type, hdr.icmp.code