From: Patrick McHardy <kaber@trash.net>
To: Krzysztof Oledzki <olel@ans.pl>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] Accounting rework: ct_extend + 64bit counters (ver. 2)
Date: Fri, 06 Jun 2008 12:52:18 +0200 [thread overview]
Message-ID: <484916E2.3090200@trash.net> (raw)
In-Reply-To: <48459c0c.4MdiVlMLZBmNAw6M%olel@ans.pl>
Looks pretty good, just one or two minor things below. What would
be nice though is to reduce patch size a bit, two suggestions for
this are:
- move seq_print_acct() changes to seperate cleanup patch
- keep counters as packets/bytes struct to reduce rename
noise in connlimit
- maybe (hardly worth it) pull out the netlink.h change
Krzysztof Oledzki wrote:
> +int nf_conntrack_acct_init(void)
> +{
> + int ret;
> +
> +#ifdef CONFIG_NF_CT_ACCT
> + printk(KERN_ERR "CONFIG_NF_CT_ACCT is deprecated and will be removed soon.\n");
> +#endif
This should point out what people are supposed to do
(use the new runtime option). KERN_WARN or NOTICE
seems more appropriate.
> +
> + ret = nf_ct_extend_register(&acct_extend);
> + if (ret < 0) {
> + printk(KERN_ERR "nf_conntrack_acct: Unable to register extension\n");
> + return ret;
> + }
> +
> +#ifdef CONFIG_SYSCTL
> + acct_sysctl_header = register_sysctl_paths(nf_net_netfilter_sysctl_path, acct_sysctl_table);
> +#endif
Please stay under the 80 character limit. Also should check whether
registration succeeded.
> struct hlist_head *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced)
> @@ -1165,6 +1174,10 @@ int __init nf_conntrack_init(void)
> if (ret < 0)
> goto out_fini_expect;
>
> + ret = nf_conntrack_acct_init();
> + if (ret < 0)
> + goto out_fini_acct;
> +
> /* For use by REJECT target */
> rcu_assign_pointer(ip_ct_attach, nf_conntrack_attach);
> rcu_assign_pointer(nf_ct_destroy, destroy_conntrack);
> @@ -1177,6 +1190,7 @@ int __init nf_conntrack_init(void)
>
> return ret;
>
> +out_fini_acct:
nf_conntrack_helper_fini(); ?
> out_fini_expect:
> nf_conntrack_expect_fini();
> out_fini_proto:
next parent reply other threads:[~2008-06-06 10:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <48459c0c.4MdiVlMLZBmNAw6M%olel@ans.pl>
2008-06-06 10:52 ` Patrick McHardy [this message]
2008-06-06 17:13 ` [PATCH] Accounting rework: ct_extend + 64bit counters (ver. 2) Krzysztof Oledzki
2008-06-07 13:31 ` Patrick McHardy
2008-06-07 14:10 ` Krzysztof Oledzki
2008-06-03 19:40 Krzysztof Oledzki
2008-06-05 23:49 ` Krzysztof Oledzki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=484916E2.3090200@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=olel@ans.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.