From: Raphael_Manfredi@pobox.com (Raphael Manfredi)
To: linux-kernel@vger.kernel.org
Subject: Re: setsockopt(SOL_SOCKET, SO_SNDBUF) broken on 2.4.18?
Date: 26 Feb 2002 07:46:42 GMT [thread overview]
Message-ID: <a5feh2$bvs$1@lyon.ram.loc> (raw)
In-Reply-To: <2871.1014671286@nice.ram.loc> <E16fTly-0006Va-00@the-village.bc.nu>
In-Reply-To: <E16fTly-0006Va-00@the-village.bc.nu>
Quoting Alan Cox <alan@lxorguk.ukuu.org.uk> from ml.linux.kernel:
:Neither. You asked for 8K the kernel allows a bit more for BSD compatibility
:and other things. You query and it gives back the size it chose
I understand the kernel can choose to allocate more than requested.
Even double the size. But it should be consistent, i.e. if when I request
x it allocates 2x, then when I ask the size, I want to know x, not 2x.
Otherwise, how can the application behave sanely if it want to vary the
size?
Linux seems to be the only kernel to lie like that. It's not consistent.
The aim is not for the application to accurately measure the amount of
kernel resources used by sockets, it's to adjust the (perceived) size of the
socket buffer.
If I can't use the returned value from getsockopt(SO_SNDBUF) to do a
setsockopt(SO_SNDBUF), then it's broken! You'll have a hard time convincing
me otherwise.
Now whether it should be fixed is another matter.
Raphael
next prev parent reply other threads:[~2002-02-26 8:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-25 21:08 setsockopt(SOL_SOCKET, SO_SNDBUF) broken on 2.4.18? Raphael Manfredi
2002-02-25 21:34 ` Richard B. Johnson
2002-02-25 22:19 ` Raphael Manfredi
2002-02-25 23:21 ` Alan Cox
2002-02-25 22:39 ` Alan Cox
2002-02-26 7:46 ` Raphael Manfredi [this message]
2002-02-26 9:39 ` Alan Cox
2002-02-26 12:54 ` Raphael Manfredi
2002-02-27 16:17 ` Horst von Brand
[not found] <E16_Tly-0006Va-00@the-village.bc.nu>
2002-02-26 0:11 ` Ton Hospel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='a5feh2$bvs$1@lyon.ram.loc' \
--to=raphael_manfredi@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox