From: Eric Dumazet Date: Tue, 24 Mar 2009 13:26:50 +0000 (+0100) Subject: netfilter: nf_conntrack: Reduce conntrack count in nf_conntrack_free() X-Git-Tag: v2.6.30-rc1~662^2~48^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d45209d89e647e9f27e4afa1f47338df73bc112;p=pandora-kernel.git netfilter: nf_conntrack: Reduce conntrack count in nf_conntrack_free() We use RCU to defer freeing of conntrack structures. In DOS situation, RCU might accumulate about 10.000 elements per CPU in its internal queues. To get accurate conntrack counts (at the expense of slightly more RAM used), we might consider conntrack counter not taking into account "about to be freed elements, waiting in RCU queues". We thus decrement it in nf_conntrack_free(), not in the RCU callback. Signed-off-by: Eric Dumazet Tested-by: Joakim Tjernlund Signed-off-by: Patrick McHardy --- Reading git-diff-tree failed