On Wed, Apr 26, 2000 at 04:55:38PM -0400, David Shaw wrote:
> On Wed, Apr 26, 2000 at 10:38:41PM +0200, Andi Kleen wrote:
> > On Wed, Apr 26, 2000 at 04:19:55PM -0400, David Shaw wrote:
> > > Hi,
> > > 
> > > Run the attached program under 2.0.36 and you get:
> > >   Setting socket receive buffer size to 1024
> > >   The socket receive buffer size was set to 1024
> > > 
> > > Run it under 2.2.14 and you get:
> > >   Setting socket receive buffer size to 1024
> > >   The socket receive buffer size was set to 2048
> > > 
> > > The code in question (/usr/src/linux/net/core/sock.c) seems to be very
> > > clear - it doubles the value.
> > > 
> > > What do you think - bug?  Intentional?  Other?
> > 
> > Intentional.
> 
> Ah.  So if I want a buffer size of X should I ask for X/2, or should I
> continue to ask for X?
> 
> What was the intention behind the change?

BSD compatibility. BSD does not account internal metadata, Linux assumes
half of the buffer will be taken up for it. If the real value was used
BSD applications would only get half the buffer they need.


-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to