nf_conntrack [was Re: [PATCH 1/4] RFC: fast string matching
infrastrure for netfilter]
laforge at netfilter.org
Mon Jan 10 22:28:07 CET 2005
On Mon, Jan 10, 2005 at 09:31:45PM +0100, Patrick McHardy wrote:
> >Actually, what is the opinion that nf_conntrack uses the union of IPv4 and
> >IPv6 addresses in the tuples?
> In my opinion that's something that could also be improved later.
> >The infrastructure is there in the patch to support IPv4/IPv6 conntrack
> >separatedly in spite of the common code and not to waste so many bytes at
> >every IPv4 connections for the sake of supporting IPv6.
> You mean the get_features stuff and seperate caches ? I'm don't like this
> part very much, I thing Rusty's "structure extension stuff" (ct_extend)
> is a nicer way to do this, although its probably not useable for the tuples.
Unfortunately I have to disagree. I think I pointed it out in an
earlier email, but I'm not sure whether it was on IRC or whether you've
been on the list of recipients.
the nf_conntrack approach of having multiple slab caches of differently
sized conntrack structures is better from a performance point of view.
If you look at the typical applications, people will usually
a) either use NAT on most/all of their connections
b) or not use NAT on any of their connections
Now why don't they (the 'b' users) recompile their kernel? Because they
use vendor-kernels, and they compile with everything enabled.
So what we end up if we use rusty's scheme for nat private data, is that
we have at least one additional allocation, and two disjunct seperate
pieces of memory (which will probably also introduce yet another cache
miss). This is acceptable for rare exceptional cases, not for 99.9% of
So even if Rusty's architecture and API is cleaner, I'm very much in
favour of the nf_conntrack design and Yasuyuki's current
Now you can argue about conntrack/nat helper private data. Here my
argument is weaker, since normally you have something like < 1% of your
connections with a helper. For this I would be willing to accept the
additional allocation and whatever.
But, then think of a firewall in front of an FTP (IRC/...) Server, and
your traffic pattern immediately looks like 50% of your connections (not
talking about traffic) have helper private data... and my argument
becomes stronger again.
> I think we should put ip_conntrack in maintenance mode, than we can
> resync nf_conntrack and make changes like this before we submit it.
At last, we again agree :)
- Harald Welte <laforge at netfilter.org> http://www.netfilter.org/
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : /pipermail/netfilter-devel/attachments/20050110/c4fcf1d0/attachment.bin
More information about the netfilter-devel