From: David Ahern <dsahern@gmail.com>
To: 张凯 <zhangkaiheb@126.com>
Cc: davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org,
kuba@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipv4: only allow increasing fib_info_hash_size
Date: Wed, 13 Oct 2021 20:51:59 -0600 [thread overview]
Message-ID: <fc1bde05-8f7b-9d1f-a55f-8c77cfd55ee3@gmail.com> (raw)
In-Reply-To: <1e3f52c3.350f.17c78afcc56.Coremail.zhangkaiheb@126.com>
On 10/13/21 2:05 AM, 张凯 wrote:
> Should we let the function still work when the below check is true, not goto failure?
>
> if (new_size < fib_info_hash_size)
> goto failure;
>
>
no, it can not.
if (fib_info_cnt >= fib_info_hash_size) {
means the hash table is full. It is going down this path to expand. If
expansion can not happen then you can not add more entries.
This is all theory hence the request for a simpler change; in reality
there should never be so many unique fib_info entries across namespaces
to hit an overflow.
prev parent reply other threads:[~2021-10-14 2:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 11:06 [PATCH] ipv4: only allow increasing fib_info_hash_size zhang kai
2021-10-12 13:55 ` David Ahern
[not found] ` <3bd88b51.6c7.17c77339c10.Coremail.zhangkaiheb@126.com>
2021-10-13 2:33 ` David Ahern
[not found] ` <5219d023.14d1.17c778a9a18.Coremail.zhangkaiheb@126.com>
[not found] ` <1e3f52c3.350f.17c78afcc56.Coremail.zhangkaiheb@126.com>
2021-10-14 2:51 ` David Ahern [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=fc1bde05-8f7b-9d1f-a55f-8c77cfd55ee3@gmail.com \
--to=dsahern@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
--cc=zhangkaiheb@126.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).