Add the complement diff
This commit is contained in:
parent
80803c5546
commit
8ac508162a
1 changed files with 1 additions and 2 deletions
|
@ -197,8 +197,7 @@ control MyIngress(inout headers hdr,
|
||||||
v4sum();
|
v4sum();
|
||||||
v6sum();
|
v6sum();
|
||||||
bit<16> diff = meta.v6sum - meta.v4sum;
|
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
|
#else
|
||||||
meta.chk_udp_v6 = 1;
|
meta.chk_udp_v6 = 1;
|
||||||
|
|
Loading…
Reference in a new issue