STM32 gotchas
119. ETH IPv4 checksum offload does not work - if checksum fields in the packet submitted to ETH/MAC are not zero

The ETH module in 'Fxx7/'Fxx9 (within 'F1/'F2/'F4/'F7 families) is an incredibly complex machine with lots of more or less useful options.

One of its features is, that it can calculate in hardware several header checksums for some of the common protocols of the TCP/IP suite. This significantly increases the performance of TCP/IP stack running through ETH, which is undoubtedly the most common usage combination.

As user SHers reported on STM32 forum, this mechanism does not work, if the respective fields in data submitted to ETH/MAC are not zero. In that case, the ETH/MAC unit, instead of calculating the proper checksum, inserts zeros in those fields.