From: Alexander Clouter <alex@digriz.org.uk>
To: linux-kernel@vger.kernel.org
Subject: Re: SO_REUSEPORT
Date: Wed, 23 Jun 2010 08:54:08 +0100 [thread overview]
Message-ID: <06r8f7-jsn.ln1@chipmunk.wormnet.eu> (raw)
In-Reply-To: AANLkTimxGK93hnV9-jGZAeeJ_JnrWCTaq-dkDvfUW6St@mail.gmail.com
Hi,
Tim Prepscius <timprepscius@gmail.com> wrote:
>
> Is SO_REUSEPORT available 2.6.ish - (or any version)?
> I've been searching for a conclusive answer to this question and can't
> find it.
>
That will be a no then:
----
alex@berk:~$ grep SO_REUSEPORT -r /usr/src/linux-2.6-stable/include/
/usr/src/linux-2.6-stable/include/asm-generic/socket.h:/* To add :#define SO_REUSEPORT 15 */
----
> (yes I know of SO_REUSEADDR, and I know the difference between this
> and *PORT, and yes I know that I *definitely* need SO_REUSEPORT, no,
> I'm unconcerned this may/may not be part of a "standard," yes I know
> it is implemented differently on different systems, yes I know there
> may be security problems, but no, I don't care about this.)
>
This really sounds like the sort of thing (for TCP/SCTP) where the
'master' process would maintain the listening socket and upon accept()
you would fork() or pass the file descriptor off to a thread. This
would make SO_REUSEPORT un-necessary and also your code would be
portable.
If you are doing things with UDP (or another datagram-esque stream) then
your master listener could pass off the incoming packets to
threads/processes trivially.
Of course this depends on what you are doing, but my opinion is that the
functionality has been unneeded so far by people in the kernel, so *I*
must be doing something wrong ;)
Cheers
--
Alexander Clouter
.sigmonster says: "Every man has his price. Mine is $3.95."
next prev parent reply other threads:[~2010-06-23 8:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-23 0:26 SO_REUSEPORT Tim Prepscius
2010-06-23 7:54 ` Alexander Clouter [this message]
2010-06-23 16:09 ` SO_REUSEPORT Brian Bloniarz
2010-06-25 17:39 ` SO_REUSEPORT Tom Herbert
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=06r8f7-jsn.ln1@chipmunk.wormnet.eu \
--to=alex@digriz.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.