From: Patrick McHardy <kaber@trash.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: remove modulo operations
Date: Mon, 25 Oct 2010 17:39:08 +0200 [thread overview]
Message-ID: <4CC5A49C.1040405@trash.net> (raw)
In-Reply-To: <1287998810.2826.46.camel@edumazet-laptop>
Am 25.10.2010 11:26, schrieb Eric Dumazet:
> Le dimanche 24 octobre 2010 à 11:40 +0800, Changli Gao a écrit :
>> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
>> ---
>> net/netfilter/xt_NFQUEUE.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>> diff --git a/net/netfilter/xt_NFQUEUE.c b/net/netfilter/xt_NFQUEUE.c
>> index 039cce1..3962770 100644
>> --- a/net/netfilter/xt_NFQUEUE.c
>> +++ b/net/netfilter/xt_NFQUEUE.c
>> @@ -72,10 +72,12 @@ nfqueue_tg_v1(struct sk_buff *skb, const struct xt_action_param *par)
>>
>> if (info->queues_total > 1) {
>> if (par->family == NFPROTO_IPV4)
>> - queue = hash_v4(skb) % info->queues_total + queue;
>> + queue = (((u64) hash_v4(skb) * info->queues_total) >>
>> + 32) + queue;
>> #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
>> else if (par->family == NFPROTO_IPV6)
>> - queue = hash_v6(skb) % info->queues_total + queue;
>> + queue = (((u64) hash_v6(skb) * info->queues_total) >>
>> + 32) + queue;
>> #endif
>> }
>> return NF_QUEUE_NR(queue);
>
>
> Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
This looks fine to me, however I'm currently only taking bugfixes.
Please resend once net-next opens up for new patches again.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2010-10-25 15:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-24 3:40 [PATCH] netfilter: remove modulo operations Changli Gao
2010-10-24 18:25 ` Florian Westphal
2010-10-24 19:11 ` Eric Dumazet
2010-10-24 20:44 ` Florian Westphal
2010-10-24 21:49 ` Maciej Żenczykowski
2010-10-25 3:02 ` Jan Engelhardt
2010-10-25 3:19 ` Maciej Żenczykowski
2010-10-25 9:13 ` Jan Engelhardt
2010-10-25 9:28 ` Jan Engelhardt
2010-10-25 9:26 ` Eric Dumazet
2010-10-25 15:39 ` Patrick McHardy [this message]
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=4CC5A49C.1040405@trash.net \
--to=kaber@trash.net \
--cc=eric.dumazet@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=xiaosuo@gmail.com \
/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).