From: "John Stoffel" <john@stoffel.org>
To: "Matt Garman" <matthew.garman@gmail.com>
Cc: "Phillip Susi" <psusi@cfl.rr.com>, linux-kernel@vger.kernel.org
Subject: Re: What happened to CONFIG_TCP_NAGLE_OFF?
Date: Thu, 30 Nov 2006 14:12:37 -0500 [thread overview]
Message-ID: <17775.11557.674203.172383@smtp.charter.net> (raw)
In-Reply-To: <bdd6985b0611300921u1a88f410vdaf9051c220719e1@mail.gmail.com>
>>>>> "Matt" == Matt Garman <matthew.garman@gmail.com> writes:
Matt> On 11/29/06, Phillip Susi <psusi@cfl.rr.com> wrote:
>> > How might I achieve having TCP_NODELAY effectively set for all sockets
>> > (by default)? Is there a new/different kernel config option, a patch,
>> > a sysctl or proc setting? Or can I "fake" this behavior by, e.g.
>> > setting a send buffer sufficiently small?
>>
>> This is a bad idea and breaks api compatibility. Nagle is very
>> important for sockets being used for things like telnet. Other
>> applications, like ftp, should already disable nagle themselves.
Matt> I don't want to change the API at all. I'm using a
Matt> closed-source, 3rd party library. Using strace, I can see that
Matt> the library does *not* do a setsockopt(...TCP_NODELAY...) on
Matt> opened sockets. Since I can't change the library, I would like
Matt> to patch and/or configure my kernel so that all TCP/IP sockets
Matt> default to TCP_NODELAY.
Can't you use the LD_PRELOAD trick to force your own custom library to
override the closed library, so that you can change the socket options
to be how you want them?
Wouldn't that be easier, and be less likely to screw up the whole
system?
You could override the socket() call, so that you just pass through
all the parameters your library sets, and then you just put in your
own setsockopt() call on the socket, and return it as normal to the
library? Hacky, but should do the trick if you're careful.
John
next prev parent reply other threads:[~2006-11-30 19:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 22:05 Matt Garman
2006-11-29 20:06 ` Phillip Susi
2006-11-30 17:21 ` Matt Garman
2006-11-30 19:12 ` John Stoffel [this message]
2006-11-30 19:45 ` Phillip Susi
2006-12-01 0:00 ` Alan
2006-12-01 20:42 ` Phillip Susi
2006-12-02 3:29 ` Herbert Xu
2006-12-04 15:35 ` Phillip Susi
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=17775.11557.674203.172383@smtp.charter.net \
--to=john@stoffel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.garman@gmail.com \
--cc=psusi@cfl.rr.com \
/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
all inboxes | Powered by JetHome®