Browse Source

put the diff into the checksum

master
Nico Schottelius 3 years ago
parent
commit
9fdc909838
  1. 3
      p4src/checksum_diff.p4

3
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;

Loading…
Cancel
Save