From: Rick Jones <rick.jones2@hp.com>
To: netdev <netdev@oss.sgi.com>
Subject: is UDP_CORK "real"
Date: Thu, 21 Apr 2005 16:14:56 -0700 [thread overview]
Message-ID: <426833F0.9010803@hp.com> (raw)
I've been messing about with the latest netperf, and by accident specified -D
for TCP_NODELAY on a UDP_RR test. In the past, and even today on HP-UX at
least, that results in an error on the setsockopt(). However, with the
getaddrinfo() changes to netperf and the addtion of SCTP support, setsockopt()
is now called with the ai_protocol from the getaddrinfo() call rather than a
hard-coded IPPROTO_TCP. Sooo, for UDP tests that becomes an IPPROTO_UDP.
When I run the UDP_RR test with -D set on a 2.6 kernel, netperf stops cold until
the test timer expires.
It seems there is an overlap in the setsockopt() option numbers between TCP and
UDP under Linux 2.6 at least, I've not gone back to check 2.4. TCP_NODELAY and
UDP_CORK are both defined as "1". Those seem to be the only two options that
overlap. The other UDP_mumble option is defined to be 100, which is presently
outside the range of the TCP_mumble options. So, instead of trying to set
TCP_NODELAY on a UDP socket, which would fail; netperf was unwittingly setting
UDP_CORK on a UDP socket, which would succede.
Is UDP_CORK going to be an ongoing feature? Is it a "real" feature today? While
man tcp described TCP_CORK, on the two places I've checked thusfar, man udp does
not describe UDP_CORK. I'm not sure if that means UDP_CORK is "unreal" or just
that the udp manpage needs repair (or was out of date on my systems).
I _can_ go in and have netperf check for IPPROTO_TCP and/or IPPROTO_SCTP before
making the _NODELAY setsockopt, and I suppose I probably should, but if UDP_CORK
isn't going to be around, or if TCP and UDP socket options were not _really_
meant to overlap... although the level option would seem to be there to allow it...
thanks,
rick jones
next reply other threads:[~2005-04-21 23:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-21 23:14 Rick Jones [this message]
2005-04-21 23:25 ` is UDP_CORK "real" David S. Miller
2005-04-21 23:53 ` Rick Jones
2005-04-26 13:40 ` Andi Kleen
2005-04-27 8:20 ` Michael Kerrisk
[not found] ` <426F2A1D.10001@aarnet.edu.au>
2005-04-27 12:26 ` network manpages was " Andi Kleen
2005-04-27 18:43 ` David S. Miller
2005-04-29 15:29 ` Andi Kleen
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=426833F0.9010803@hp.com \
--to=rick.jones2@hp.com \
--cc=netdev@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).