From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Vasily Khoruzhick <vasilykh@arista.com>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Florian Westphal <fw@strlen.de>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Dmitry Safonov <dima@arista.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] netfilter: conntrack: fix calculation of next bucket number in early_drop
Date: Sat, 3 Nov 2018 14:16:20 +0100 [thread overview]
Message-ID: <20181103131620.alepdriguhu2rxc3@salvia> (raw)
In-Reply-To: <20181025191543.15061-1-vasilykh@arista.com>
On Thu, Oct 25, 2018 at 12:15:43PM -0700, Vasily Khoruzhick wrote:
> If there's no entry to drop in bucket that corresponds to the hash,
> early_drop() should look for it in other buckets. But since it increments
> hash instead of bucket number, it actually looks in the same bucket 8
> times: hsize is 16k by default (14 bits) and hash is 32-bit value, so
> reciprocal_scale(hash, hsize) returns the same value for hash..hash+7 in
> most cases.
>
> Fix it by increasing bucket number instead of hash and rename _hash
> to bucket to avoid future confusion.
Applied, thanks.
prev parent reply other threads:[~2018-11-03 13:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 19:15 [PATCH v2] netfilter: conntrack: fix calculation of next bucket number in early_drop Vasily Khoruzhick
2018-11-03 13:16 ` Pablo Neira Ayuso [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=20181103131620.alepdriguhu2rxc3@salvia \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dima@arista.com \
--cc=fw@strlen.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vasilykh@arista.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