From: Andi Kleen <andi@firstfloor.org>
To: Stephen Hemminger <stephen.hemminger@vyatta.com>
Cc: Eugene Teo <eugeneteo@kernel.sg>,
netdev@vger.kernel.org, Eugene Teo <eteo@redhat.com>
Subject: Re: Internet-Draft on Port Randomisation
Date: Tue, 09 Sep 2008 16:28:30 +0200 [thread overview]
Message-ID: <878wu1tmup.fsf@basil.nowhere.org> (raw)
In-Reply-To: <48C60284.2070402@vyatta.com> (Stephen Hemminger's message of "Mon, 08 Sep 2008 21:58:44 -0700")
Stephen Hemminger <stephen.hemminger@vyatta.com> writes:
> Eugene Teo wrote:
>> Has anyone read this Internet-Draft?
>> http://www.gont.com.ar/drafts/port-randomization/draft-ietf-tsvwg-port-randomization-02.txt
>>
>> In this memo, there are descriptions of four different ephemeral port
>> randomisation algorithms (see page 17).
>>
>> Algo #1 and #2 are simple port randomisation algorithms. Algo #3 is
>> what we have in Linux. The memo suggested algorithm #4, double-hash
>> randomisation algorithm, which is an improvement to algo #3 (see page
>> 15).
>>
>> Does anyone have any thought about the improved algorithm? Is this
>> worth implementing,
> No the added lock overhead of a global next free port array is not
> worth it.
[haven't read the draft] But you don't necessarily need a full global
lock for such a scheme. What works too is to access global state only
ever N accesses and pre-allocate a small range per CPU. While there's
still some global overhead then, it happens significantly less. My old
alternative ipid setup algorithm worked this way.
One drawback of such a scheme today: on RT kernels the per CPU state
tends to be become a problem.
-Andi
--
ak@linux.intel.com
next prev parent reply other threads:[~2008-09-09 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 4:07 Internet-Draft on Port Randomisation Eugene Teo
2008-09-09 4:58 ` Stephen Hemminger
2008-09-09 6:31 ` Eugene Teo
2008-09-09 14:28 ` Andi Kleen [this message]
2008-09-09 20:04 ` David Miller
2008-09-09 20:11 ` 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=878wu1tmup.fsf@basil.nowhere.org \
--to=andi@firstfloor.org \
--cc=eteo@redhat.com \
--cc=eugeneteo@kernel.sg \
--cc=netdev@vger.kernel.org \
--cc=stephen.hemminger@vyatta.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).