Hi, With the way that the multishot variants of recv and recvmsg currently work, we always end up doing two sock_recvmsg() call for each subsequent receive outside of the initial receive. That is obviously extra overhead, and to make matters worse, that also involves picking and recycling an appropriate buffer for those operations. For protocols that sanely pass back whether a socket has more data after a receive, we can rely on that hint to avoid iterating over recvmsg/buffers an extra time per receive. Patches 1..3 are prep patches, patch 4 has the logic mentioned above. -- Jens Axboe