From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 3/7] netfilter: ctnetlink: cleanup message building and size calculation
Date: Tue, 02 Jun 2009 15:11:34 +0200 [thread overview]
Message-ID: <4A252506.9050604@trash.net> (raw)
In-Reply-To: <20090602115235.7677.91307.stgit@Decadence>
Pablo Neira Ayuso wrote:
> This patch is a cleanup. It removes unneeded verbose information
> about the size calculation and it also replaces the old macros
> to build Netlink messages with the new nlmsg_*() helper functions.
This one is really hard to review because of the mixed renames
and code movals. Please split this into two patches.
> diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
> index 6c3f964..9aafe70 100644
> --- a/include/net/netfilter/nf_conntrack.h
> +++ b/include/net/netfilter/nf_conntrack.h
> @@ -144,6 +144,12 @@ static inline u_int8_t nf_ct_protonum(const struct nf_conn *ct)
> return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum;
> }
>
> +static inline const struct nf_conntrack_tuple *
> +nf_ct_tuple(const struct nf_conn *ct, enum ip_conntrack_dir dir)
> +{
> + return &ct->tuplehash[dir].tuple;
> +}
This is a useful helper for other situations as well, so I think
it shouldn't be const.
> +static inline size_t
> +ctnetlink_nlmsg_size(const struct nf_conn *ct)
> +{
> + ...
> - return alloc_skb(len, gfp);
> + + ctnetlink_proto_size(ct);
> + ;
^^ stray semicolon
next prev parent reply other threads:[~2009-06-02 13:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 11:51 [PATCH 0/7] Netfilter updates for nf-next tree (2.6.31) Pablo Neira Ayuso
2009-06-02 11:51 ` [PATCH 1/7] netfilter: nfnetlink: cleanup for nfnetlink_rcv_msg() function Pablo Neira Ayuso
2009-06-02 11:52 ` [PATCH 2/7] netfilter: ctnetlink: remove nowait parameter from *fill_info() Pablo Neira Ayuso
2009-06-02 11:52 ` [PATCH 3/7] netfilter: ctnetlink: cleanup message building and size calculation Pablo Neira Ayuso
2009-06-02 13:11 ` Patrick McHardy [this message]
2009-06-02 14:49 ` Pablo Neira Ayuso
2009-06-02 14:52 ` Patrick McHardy
2009-06-02 11:52 ` [PATCH 4/7] netfilter: conntrack: don't report events on module removal Pablo Neira Ayuso
2009-06-02 11:53 ` [PATCH 5/7] netfilter: conntrack: remove events flags from userspace exposed file Pablo Neira Ayuso
2009-06-02 11:53 ` [PATCH 6/7] netfilter: conntrack: simplify event caching system Pablo Neira Ayuso
2009-06-02 11:54 ` [PATCH 7/7] netfilter: conntrack: replace notify chain by function pointer Pablo Neira Ayuso
2009-06-02 12:54 ` [PATCH 0/7] Netfilter updates for nf-next tree (2.6.31) Patrick McHardy
2009-06-02 14:43 ` Pablo Neira Ayuso
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=4A252506.9050604@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).