From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: DDoS attack causing bad effect on conntrack searches Date: Tue, 01 Jun 2010 12:31:50 +0200 Message-ID: <1275388310.2738.2.camel@edumazet-laptop> References: <1271941082.14501.189.camel@jdb-workstation> <4BD04C74.9020402@trash.net> <1271946961.7895.5665.camel@edumazet-laptop> <1271948029.7895.5707.camel@edumazet-laptop> <20100422155123.GA2524@linux.vnet.ibm.com> <1271952128.7895.5851.camel@edumazet-laptop> <1272056237.4599.7.camel@edumazet-laptop> <1272139861.20714.525.camel@edumazet-laptop> <1272292568.13192.43.camel@jdb-workstation> <1275340896.2478.26.camel@edumazet-laptop> <1275368732.2478.88.camel@edumazet-laptop> <4C04DE73.6050605@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Changli Gao , hawk@comx.dk, Jesper Dangaard Brouer , paulmck@linux.vnet.ibm.com, Linux Kernel Network Hackers , Netfilter Developers To: Patrick McHardy Return-path: Received: from mail-fx0-f46.google.com ([209.85.161.46]:63757 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752955Ab0FAKb4 (ORCPT ); Tue, 1 Jun 2010 06:31:56 -0400 In-Reply-To: <4C04DE73.6050605@trash.net> Sender: netdev-owner@vger.kernel.org List-ID: Le mardi 01 juin 2010 =C3=A0 12:18 +0200, Patrick McHardy a =C3=A9crit = : > If a new conntrack is created in PRE_ROUTING or LOCAL_OUT, it will be > added to the unconfirmed list and moved to the hash as soon as the > packet passes POST_ROUTING. This means the number of unconfirmed entr= ies > created by the network is bound by the number of CPUs due to BH > processing. The number created by locally generated packets is unboun= d > in case of preemptible kernels however. >=20 OK, we should have a percpu list then. BTW, I notice nf_conntrack_untracked is incorrectly annotated '__read_mostly'. It can be written very often :( Should'nt we special case it and let be really const ?