UDP implementation and the MSG_MORE flag

michi1 at michaelblizek.twilightparadox.com michi1 at michaelblizek.twilightparadox.com
Wed Feb 3 17:21:10 EST 2021


On 15:12 Tue 26 Jan     , Oliver Graute wrote:
> Some UDP packets send via the loopback interface are dropped in the
> kernel on the receive side when using sendto with the MSG_MORE flag.
> Every drop increases the InCsumErrors in /proc/self/net/snmp. Some
> example code to reproduce it is appended below.
> In the code we tracked it down to this code section. ( Even a little
> further but its unclear to me wy the csum() is wrong in the bad case)

I think it is unlikely that the error is on the receiving side. I recommend to
capture the data that is being sent with a sniffer and see if there is
anything wrong. You may also want to try disabling hardware acceleration on
your network devices, because the checksum is sometimes done in hardware.

programing a layer 3+4 network protocol for mesh networks
see http://michaelblizek.twilightparadox.com

More information about the Kernelnewbies mailing list