From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [PATCH 4/4] first conntrack ID must be 1 not 2 Date: Thu, 16 Feb 2006 21:09:03 +0100 Message-ID: <43F4DBDF.9010008@trash.net> References: <43EFF1F0.1090701@netfilter.org> <20060213112028.GU4601@sunbeam.de.gnumonks.org> <43F438F5.8070607@trash.net> <43F43FA9.4000906@trash.net> <43F4426D.9060807@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Harald Welte , Netfilter Development Mailinglist , Pablo Neira Ayuso , Yasuyuki Kozakai Return-path: To: Jozsef Kadlecsik In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Jozsef Kadlecsik wrote: > On Thu, 16 Feb 2006, Patrick McHardy wrote: > >>>(jiffies, tuples) would be unique even in that case. >> >>Thats true. But what is the advantage over using the counter? Actually it would still not be unique if connections live shorter than a jiffy and are resurrected. > Currently nothing :-). > > However, the counter poses an internal bottleneck in the overall system > when one attempts to replace the hashtable by hashtrie. (What I really > like about hashtrie is that it naturally implements the 'region locking' > suggested by Patrick Schaaf, compared to the 'brute force' per bucket > locking.) > > As I see, we have got three bottlenecks in conntrack in SMP systems: > the hashtable approach, the id and the expectation list. The first two > could be eliminated by hashtrie and jiffies as ids. > > Some clever solution should only be found to spread the expectations > over multiple, separatedly locked buckets... I've talked to Harald about this and as a start we can start by allowing masks only for the source part of the tuple. That means we can hash by destinations.