From: Holger Eitzenberger <holger@eitzenberger.org>
To: David Miller <davem@davemloft.net>
Cc: netfilter-devel <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH RFC 1/3] NFQUEUE: introduce CPU fanout
Date: Tue, 19 Mar 2013 22:38:11 +0100 [thread overview]
Message-ID: <20130319213811.GF13505@imap.eitzenberger.org> (raw)
In-Reply-To: <20130319.103708.24746976367419338.davem@davemloft.net>
On Tue, Mar 19, 2013 at 10:37:08AM -0400, David S. Miller wrote:
> From: Jan Engelhardt <jengelh@inai.de>
> Date: Tue, 19 Mar 2013 15:34:56 +0100 (CET)
>
> >
> > On Tuesday 2013-03-19 15:26, David Miller wrote:
> >>
> >>> + if (par->family == NFPROTO_IPV4)
> >>> + queue = (((u64) hash_v4(skb) * info->queues_total) >>
> >>> + 32) + queue;
> >>> +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
> >>> + else if (par->family == NFPROTO_IPV6)
> >>> + queue = (((u64) hash_v6(skb) * info->queues_total) >>
> >>> + 32) + queue;
> >>> +#endif
> >>
> >>Maybe add a helper function so you don't have to indent so deeply. Something
> >>like:
> >
> > And combined with smart arranging of clauses, won't need an extra
> > helper function.
> > http://www.braceless.org/Various/The%20Else%20Statement%20Considered%20Harmful
> >
> > Something like
>
> Yes, but:
>
> > + queue = (((u64) hash_v4(skb) * info->queues_total) >>
> > + 32) + queue;
> ^^^^^^
>
> it's that terribly indented giblet that I want to disappear.
Fully agreed, but at this time I kept the indentation. Take
a look at the changes done in nfqueue_tg_v1() from patch #2.
Will see how I can address your point.
next prev parent reply other threads:[~2013-03-19 21:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 14:14 [PATCH RFC 0/3] NFQUEUE: introduce CPU fanout holger
2013-03-19 14:14 ` [PATCH RFC 1/3] " holger
2013-03-19 14:26 ` David Miller
2013-03-19 14:34 ` Jan Engelhardt
2013-03-19 14:37 ` David Miller
2013-03-19 21:38 ` Holger Eitzenberger [this message]
2013-03-19 21:34 ` Holger Eitzenberger
2013-03-19 21:57 ` Jan Engelhardt
2013-03-19 22:30 ` Holger Eitzenberger
2013-03-19 19:56 ` Florian Westphal
2013-03-19 20:17 ` Holger Eitzenberger
2013-03-19 14:14 ` [PATCH RFC 2/3] NFQUEUE: coalesce IPv4 and IPv6 hashing holger
2013-03-19 14:27 ` David Miller
2013-03-19 14:39 ` Holger Eitzenberger
2013-03-19 14:14 ` [PATCH RFC 3/3] NFQUEUE: add --queue-cpu-fanout parameter holger
2013-03-19 14:34 ` Eric Leblond
2013-03-19 16:07 ` Holger Eitzenberger
2013-03-23 19:52 ` Holger Eitzenberger
2013-03-23 21:53 ` Eric Leblond
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=20130319213811.GF13505@imap.eitzenberger.org \
--to=holger@eitzenberger.org \
--cc=davem@davemloft.net \
--cc=netfilter-devel@vger.kernel.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).