From: Nikolay Borisov <nik.borisov@suse.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: davem@davemloft.net, kuba@kernel.org, dsahern@kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] ipv4: fib_rules: Switch to using a for loop in fib_empty_table
Date: Tue, 24 Nov 2026 13:11:09 +0200 [thread overview]
Message-ID: <ffdd26d1-4316-47ad-9ab2-9a62b94bd2e3@suse.com> (raw)
In-Reply-To: <20261124110317.GA3761951@shredder>
On 24.11.26 г. 13:03 ч., Ido Schimmel wrote:
> On Fri, Nov 20, 2026 at 10:12:42AM +0200, Nikolay Borisov wrote:
>> Since commit efdfb1e27a33 ("ipv4: fib: bound automatic table ID allocation")
>> added a sane bound to the loop looking for a table id the concerns in
>> 58075ff523af ("ipv4: fib_rules: Fix possible infinite loop in fib_empty_table")
>> are rendered moot. Just revert the code back to a "for" loop, using the
>> new bound. This makes the code's flow and terminating condition a
>> lot clearer.
>
> I disagree with "a lot clearer". The function is tiny.
>
> Please read:
>
> https://docs.kernel.org/next/process/maintainer-netdev.html#clean-up-patches
You are the maintainer, it's your say. However, I disagree that this
patch falls within the "cleanup patches" described in the aforementioned
link.
That function is a linear scan in a [1-4096] space. I see no reason why
a linear scan should be implemented via an infinite while(1) loop with a
terminating condition in the body, when a 'for' loop construct is the
right tool for the job. Anyway, as I said it's up to the maintainers.
Regards,
Nikolay
prev parent reply other threads:[~2026-11-24 11:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 8:12 [PATCH] ipv4: fib_rules: Switch to using a for loop in fib_empty_table Nikolay Borisov
2026-11-24 11:03 ` Ido Schimmel
2026-11-24 11:11 ` Nikolay Borisov [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=ffdd26d1-4316-47ad-9ab2-9a62b94bd2e3@suse.com \
--to=nik.borisov@suse.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=idosch@idosch.org \
--cc=kuba@kernel.org \
--cc=netdev@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