From: David Miller <davem@davemloft.net>
To: jengelh@inai.de
Cc: holger@eitzenberger.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH RFC 1/3] NFQUEUE: introduce CPU fanout
Date: Tue, 19 Mar 2013 10:37:08 -0400 (EDT) [thread overview]
Message-ID: <20130319.103708.24746976367419338.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LNX.2.01.1303191531210.9679@nerf07.vanv.qr>
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.
next prev parent reply other threads:[~2013-03-19 14:37 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 [this message]
2013-03-19 21:38 ` Holger Eitzenberger
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=20130319.103708.24746976367419338.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=holger@eitzenberger.org \
--cc=jengelh@inai.de \
--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).