Browse Source

Debug missing checksum, introduce new field

master
Nico Schottelius 4 years ago
parent
commit
c6b1463e17
  1. 6
      doc/plan.org
  2. 4
      p4src/checksums.p4
  3. 1
      p4src/headers.p4
  4. 4
      p4src/static-mapping.p4

6
doc/plan.org

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

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

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

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

Loading…
Cancel
Save