diff --git a/doc/plan.org b/doc/plan.org index 0e75bf6..0ce8e37 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -415,7 +415,11 @@ DEBUG:main:reassambled= probably not updated. +request -> probably not updated. After inserting marker: it's clear +that the checksum code DOES NOT work on the task field! + +Problem: task field might be overriden for controller use in different +table -> need different task field! *** TODO Get p4 VM / vagrant running **** DONE install libvirtd-daemon diff --git a/p4src/checksums.p4 b/p4src/checksums.p4 index 9e05953..1f38867 100644 --- a/p4src/checksums.p4 +++ b/p4src/checksums.p4 @@ -21,7 +21,7 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) { control MyComputeChecksum(inout headers hdr, inout metadata meta) { apply { - update_checksum_with_payload(meta.task == TASK_CHECKSUM_ICMP6, + update_checksum_with_payload(meta.switch_task == TASK_CHECKSUM_ICMP6, { hdr.ipv6.src_addr, /* 128 */ hdr.ipv6.dst_addr, /* 128 */ @@ -36,7 +36,7 @@ control MyComputeChecksum(inout headers hdr, inout metadata meta) { ); /* checksumming for icmp6_na_ns_option */ - update_checksum_with_payload(meta.task == TASK_CHECKSUM_ICMP6_NA, + update_checksum_with_payload(meta.switch_task == TASK_CHECKSUM_ICMP6_NA, { hdr.ipv6.src_addr, /* 128 */ hdr.ipv6.dst_addr, /* 128 */ diff --git a/p4src/headers.p4 b/p4src/headers.p4 index a60ceb0..9fbcf96 100644 --- a/p4src/headers.p4 +++ b/p4src/headers.p4 @@ -166,6 +166,7 @@ struct headers { struct metadata { port_t ingress_port; task_t task; + task_t switch_task; bit<16> tcp_length; bit<32> cast_length; } diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 7f91a7e..70b5bb3 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -197,7 +197,7 @@ control MyIngress(inout headers hdr, */ /* checksum trigger / content */ - meta.task = TASK_CHECKSUM_ICMP6_NA; + meta.switch_task = TASK_CHECKSUM_ICMP6_NA; meta.cast_length = (bit<32>) hdr.ipv6.payload_length; } @@ -212,7 +212,7 @@ control MyIngress(inout headers hdr, hdr.icmp6.type = ICMP6_ECHO_REPLY; - meta.task = TASK_CHECKSUM_ICMP6; + meta.switch_task = TASK_CHECKSUM_ICMP6; meta.cast_length = (bit<32>) hdr.ipv6.payload_length; }