From 9fdc909838219065d3b6680ba8a2e7860c21c96f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 10 Jul 2019 14:49:23 +0200 Subject: [PATCH] put the diff into the checksum --- p4src/checksum_diff.p4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/p4src/checksum_diff.p4 b/p4src/checksum_diff.p4 index ee91c41..8c626ad 100644 --- a/p4src/checksum_diff.p4 +++ b/p4src/checksum_diff.p4 @@ -197,7 +197,8 @@ control MyIngress(inout headers hdr, v4sum(); v6sum(); bit<16> diff = meta.v6sum - meta.v4sum; - hdr.udp.checksum = hdr.udp.checksum + diff; + # hdr.udp.checksum = hdr.udp.checksum + diff; + hdr.udp.checksum = diff; #else meta.chk_udp_v6 = 1;