Debug missing checksum, introduce new field

This commit is contained in:
Nico Schottelius 2019-03-25 13:02:09 +01:00
parent 2e8f51929b
commit c6b1463e17
4 changed files with 10 additions and 5 deletions

View File

@ -415,7 +415,11 @@ DEBUG:main:reassambled=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=
That looks like NDP is not working again. Why: checksum seems to be
incorrect according to wireshark. Why? Checksum is the SAME as in the
request -> 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

View File

@ -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 */

View File

@ -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;
}

View File

@ -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;
}