From 28f985d9ceb8a97e70e31e32b1f5f577a2c3051e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 24 Jul 2019 23:22:14 +0200 Subject: [PATCH] Commit broken in between state --- p4src/actions_delta_checksum.p4 | 10 +++++----- p4src/minip4_solution.p4 | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/p4src/actions_delta_checksum.p4 b/p4src/actions_delta_checksum.p4 index e68aa42..31a0261 100644 --- a/p4src/actions_delta_checksum.p4 +++ b/p4src/actions_delta_checksum.p4 @@ -77,11 +77,11 @@ action delta_udp_from_v6_to_v4() tmp = tmp + 1; tmp[16:16] = 0; } - tmp = tmp + (bit<17>) (0xffff - meta.v6sum); - if (tmp[16:16] == 1) { - tmp = tmp + 1; - tmp[16:16] = 0; - } + // tmp = tmp + (bit<17>) (0xffff - meta.v6sum); + // if (tmp[16:16] == 1) { + // tmp = tmp + 1; + // tmp[16:16] = 0; + // } hdr.udp.checksum = (bit<16>) tmp; } diff --git a/p4src/minip4_solution.p4 b/p4src/minip4_solution.p4 index 16c714f..3ccbce3 100644 --- a/p4src/minip4_solution.p4 +++ b/p4src/minip4_solution.p4 @@ -140,13 +140,13 @@ control RealMain( hdr.icmp.type = ICMP_ECHO_REQUEST; hdr.icmp.code = 0; } - // if(hdr.udp.isValid()) { - // #ifdef USE_NICO_DELTA_CHECKSUM - // delta_udp_from_v6_to_v4(); - // #else - // meta.chk_udp_v4 = 1; - // #endif - // } + } + + if(hdr.udp.isValid()) { + //delta_prepare(); + delta_udp_from_v6_to_v4(); + //stupid(); + } // if(hdr.tcp.isValid()) { // #ifdef USE_NICO_DELTA_CHECKSUM // delta_tcp_from_v6_to_v4(); @@ -158,7 +158,7 @@ control RealMain( v4_networks.apply(); /* apply egress for IPv4 */ exit; /* no further v6 processing */ - } + } }