From: Patrick Schaaf <bof@bof.de>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>, Harald Welte <laforge@gnumonks.org>,
Netfilter Mailing List <netfilter-devel@lists.netfilter.org>,
Linux Kernel mailing list <linux-kernel@vger.kernel.org>,
Patrick Schaaf <bof@bof.de>
Subject: Re: ip_conntrack_hash() problem
Date: Thu, 5 Sep 2002 08:21:28 +0200 [thread overview]
Message-ID: <20020905082128.D19551@oknodo.bof.de> (raw)
In-Reply-To: <20020905044436.0772A2C0DF@lists.samba.org>; from rusty@rustcorp.com.au on Thu, Sep 05, 2002 at 10:39:40AM +1000
On Thu, Sep 05, 2002 at 10:39:40AM +1000, Rusty Russell wrote:
> In message <20020904152626.A11438@wotan.suse.de> you write:
> > > I think the hash function should be fixed, not the possible choice of
> > > hash sizes, if that is at feasible.
> > I also agree with Martin that it is better to fix the hash function in
> > this case. Restricting to magic hash table sizes looks like a bad hack.
>
> This work is already done:
> http://www.kernel.org/pub/linux/kernel/people/rusty/patches/Netfilter/conntrack_hashing.patch.gz
Some comments:
A) secs_between_rehash is doubled every rehash, and never decreased
again. This looks broken. What's the rationale?
B) I despise the (1 << ...htable_bits) construct, used in several places.
It's nothing but obfuscation. Please reinstate ...htable_size, and
use that, the code will be more readable.
C) did you measure how much time the rehashing takes, for a single run
on a significant (2^16 buckets, at least) conntracking table?
D) did you run your hash_conntrack() against my cttest bucket occupation
simulator? Can we see comparing pictures?
To conclude, I agree with using a multiplicative hash, but I'm a bit nervous
about the rehashing thing. A single random hash_base call would be enough
to satisfy _my_ paranoia. IMHO the rehashing should be a compile/run time
"be more paranoid" option.
best regards
Patrick
next prev parent reply other threads:[~2002-09-05 6:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-04 12:33 Martin Wilck
2002-09-04 12:56 ` Harald Welte
2002-09-04 13:24 ` Martin Wilck
2002-09-04 13:26 ` Andi Kleen
2002-09-05 0:39 ` Rusty Russell
2002-09-05 6:21 ` Patrick Schaaf [this message]
2002-09-05 6:24 ` David S. Miller
2002-09-05 6:33 ` Patrick Schaaf
2002-09-05 6:32 ` David S. Miller
2002-09-05 6:39 ` Patrick Schaaf
2002-09-05 6:40 ` David S. Miller
2002-09-05 13:37 ` Rik van Riel
2002-09-05 11:14 ` Rusty Russell
2002-09-05 6:51 ` Patrick Schaaf
2002-09-05 7:19 ` Martin Wilck
2002-09-05 11:15 ` Rusty Russell
2002-09-05 11:54 ` Andi Kleen
2002-09-05 17:55 ` Patrick Schaaf
2002-09-05 18:24 ` Martin Wilck
2002-09-05 8:19 ` Harald Welte
2002-09-04 13:40 ` Martin Wilck
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=20020905082128.D19551@oknodo.bof.de \
--to=bof@bof.de \
--cc=ak@suse.de \
--cc=laforge@gnumonks.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=rusty@rustcorp.com.au \
/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®