Re: UDP recvmsg blocks after select(), 2.6 bug?

From: Michael Clark
Date: Thu Oct 21 2004 - 01:26:35 EST


On 10/21/04 13:50, Chris Friesen wrote:
H. Peter Anvin wrote:

H. Peter Anvin wrote:

The whole point is that it doesn't break the *documented* interface.


I'm talking about returning -1, EIO.



Ah. By "it", I thought you meant the current performance optimizations, not the EIO. My apologies.

Same.

I think returning EIO is suboptimal, as it is not an expected error value for recvmsg(). (It's not listed in the man pages for recvmsg() or ip.) It would certainly work for new apps, but probably not for many existing binaries.

Yes, big likelyhood of breaking apps although does give you the
deterministic behaviour of recvmsg not blocking after select.

On the other hand, if you simply do the checksum verification at select() time for blocking sockets, then the existing binaries get exactly the behaviour they expect.

This would be the best from existing usersapce apps, although i'd much
rather have EIO returned than the current behaviour if that was that
was the only choice (although the offshoot would be the need for patches
to quite a few apps).

~mc
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/