From: Mika Liljeberg <Mika.Liljeberg@welho.com>
To: Dan Kegel <dank@kegel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tcp_v4_get_port() and ephemeral ports
Date: Sun, 30 Sep 2001 21:41:48 +0300 [thread overview]
Message-ID: <3BB7676C.1213CC84@welho.com> (raw)
In-Reply-To: <3BB75EB4.3268D3FC@kegel.com>
Dan Kegel wrote:
> So far, I've found an implementation of getifaddrs() that makes it
> easy to retrieve the list of local IP addresses, and modified my
> benchmark to assign a different local ip address to each user;
> the users use bind() with that address and a zero port number,
> and expect the system to assign a port.
[...]
> It's tempting to patch tcp_v4_get_port() to check
> sk->rcv_saddr, and if it's nonzero, allow the
> same ephemeral port number to be reused on different interfaces.
[...]
> Can anyone comment on the wisdom of such a change?
Hi Dan,
It shouldn't break anything as far as I can see. However, patching the
kernel simply to accommodate a benchmark does not seem the right thing
to do. Since your client is already binding the source address, why not
simply bind the port as well? You can easily loop the whole 64K range if
you want. Or you could even pick a completely empty port range and bind
each client socket with the SO_REUSE flag (which is ok, since your
clients are using different source addresses). I don't see any reason to
modify the kernel for this, particularly as it wouldn't really help port
exhaustion in real-life situations.
Best Regards,
Mika Liljeberg
next prev parent reply other threads:[~2001-09-30 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-30 18:04 [PATCH] tcp_v4_get_port() and ephemeral ports Dan Kegel
2001-09-30 18:16 ` Davide Libenzi
2001-09-30 18:29 ` Dan Kegel
2001-09-30 18:41 ` Mika Liljeberg [this message]
2001-09-30 20:37 ` Dan Kegel
2001-09-30 21:45 ` Mika Liljeberg
2001-09-30 20:53 ` Chris Wedgwood
-- strict thread matches above, loose matches on Subject: below --
2001-09-30 21:15 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=3BB7676C.1213CC84@welho.com \
--to=mika.liljeberg@welho.com \
--cc=dank@kegel.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 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.