Hi Martin, Hi Patrick, Attached a clean up for current conntrack stats, it applies to current bk 2.6 tree. Some comments: a) I combined ifdef's checkings + macro, so if conntrack stats are compiled in the kernel we increase the counters. #define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) +#else /* !CONNTRACK STATS */ +#define CONNTRACK_STAT_INC(count) +#endif b) Martin, I've killed this to make them use the macro, are you ok with this? I know that we call twice smp_proccesor_id now, but it's clean I think. - /* use per_cpu() to avoid multiple calls to smp_processor_id() */ - unsigned int cpu = smp_processor_id(); MUST_BE_READ_LOCKED(&ip_conntrack_lock); list_for_each_entry(h, &ip_conntrack_hash[hash], list) { if (conntrack_tuple_cmp(h, tuple, ignored_conntrack)) { - per_cpu(ip_conntrack_stat, cpu).found++; + CONNTRACK_STAT_INC(found); return h; c) This is similar to a) +#define CT_ADD_COUNTERS(ct, ctinfo, skb) ct_add_counters(ct, ctinfo, skb) +#else +#define CT_ADD_COUNTERS(ct, ctinfo, skb) +#endif d) You can see that I've play around with ip_conntrack_standalone reordering the creation of /proc entries. I did it just to remove warnings about unused labels when unsetting conntrack stats. To conclude, this patch adds up to 8 ifdef's CONFIG_IP_NF_CT_ACCT checkings, I must confess that I don't love them, I'll think if there's a way to do cleaner. Wait for your comments. regards, Pablo