summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_conntrack_tuple.h
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-07 22:28:14 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-10 22:17:40 -0700
commitf205c5e0c28aa7e0fb6eaaa66e97928f9d9e6994 (patch)
tree7ad04d827c5c2d24ac804346d95853ebceab0bfd /include/net/netfilter/nf_conntrack_tuple.h
parent8e5105a0c36a059dfd0f0bb9e73ee7c97d306247 (diff)
[NETFILTER]: nf_conntrack: use hlists for conntrack hash
Convert conntrack hash to hlists to reduce its size and cache footprint. Since the default hashsize to max. entries ratio sucks (1:16), this patch doesn't reduce the amount of memory used for the hash by default, but instead uses a better ratio of 1:8, which results in the same max. entries value. One thing worth noting is early_drop. It really should use LRU, so it now has to iterate over the entire chain to find the last unconfirmed entry. Since chains shouldn't be very long and the entire operation is very rare this shouldn't be a problem. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netfilter/nf_conntrack_tuple.h')
-rw-r--r--include/net/netfilter/nf_conntrack_tuple.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h
index 5d72b16e876f..d02ce876b4ca 100644
--- a/include/net/netfilter/nf_conntrack_tuple.h
+++ b/include/net/netfilter/nf_conntrack_tuple.h
@@ -125,8 +125,7 @@ DEBUGP("tuple %p: %u %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n", \
/* Connections have two entries in the hash table: one for each way */
struct nf_conntrack_tuple_hash
{
- struct list_head list;
-
+ struct hlist_node hnode;
struct nf_conntrack_tuple tuple;
};