Open
Description
We experience UDP checksum errors on traffic originating from localhost. This is normal behavior, on localhost udp checksums are dont-care. To overcome this, we introduced full checksum recalculation in afeb80a . It fixed the wrong checksum error, but it also has a significant performance toll.
An improved solution would be to apply full checksum recalculation only if it is necessary (i.e., the traffic originates from localhost), otherwise stick to the partial UDP checksum calculation:
if (source.addr in 127.0.0.0/8):
recompute_UDP_csum_from_scratch()
else:
incrementally_update_UDP_csum()