David S. Miller wrote:

This has been this way for centuries and it's the correct behavior.

We double it on the way in to account for "struct sk_buff" etc.
overhead, applications assume that the SO_RCVBUF setting they make
will allow that much actual data to be received on that socket.
Applications are unaware that "struct sk_buff" and other overheads
allocate from the receive buffer during socket buffer allocation.

And after considering the possible alternatives, returning the value
we actually used on get is the most desirable behavior.

Doubling the value passed via setsockopt(..., SO_RCVBUF,...) makes perfect sense. But what is the rationale for returning the doubled value back in getsockopt(..., SO_RCVBUF, ....)?

All it appears to do is make applications believe / report they have more buffer space than is actually available.

- Mark B.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to