From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Florian Westphal <fw@strlen.de>,
netfilter-devel@vger.kernel.org, Fabio <pedretti.fabio@gmail.com>
Subject: Re: [nf-next PATCH v2 1/2] netfilter: xt_recent: Reduce size of struct recent_entry::nstamps
Date: Thu, 27 Jun 2024 02:06:09 +0200 [thread overview]
Message-ID: <Znys8VUURMRnUfxd@orbyte.nwl.cc> (raw)
In-Reply-To: <Znymv6czZP4M4zuc@calendula>
On Thu, Jun 27, 2024 at 01:39:43AM +0200, Pablo Neira Ayuso wrote:
> On Thu, Jun 27, 2024 at 12:40:58AM +0200, Phil Sutter wrote:
> > On Wed, Jun 26, 2024 at 06:12:43PM +0200, Pablo Neira Ayuso wrote:
> > > Hi Phil,
> > >
> > > On Fri, Jun 14, 2024 at 05:16:40PM +0200, Phil Sutter wrote:
> > > > There is no point in this change besides presenting its possibility
> > > > separate from a follow-up patch extending the size of both 'index' and
> > > > 'nstamps' fields.
> > > >
> > > > The value of 'nstamps' is initialized to 1 in recent_entry_init() and
> > > > adjusted in recent_entry_update() to match that of 'index' if it becomes
> > > > larger after being incremented. Since 'index' is of type u8, it will at
> > > > max become 255 (and wrap to 0 afterwards). Therefore, 'nstamps' will
> > > > also never exceed the value 255.
> > >
> > > Series LGTM.
> >
> > Thanks for your review.
> >
> > > I'd suggest you collapse these two patches while keeping the
> > > description above, because nstamps is shrinked here in 1/2 then it
> > > gets back to original u16 in 2/2.
> >
> > ACK, that was the plan right from the start. :)
>
> Thanks, I have to admit splitting the patch in two helped me
> understand a lot better when reviewing.
Cool! When restructuring patches for netfilter, I noticed a few times
how I suddenly was able to split things into surprisingly small sets
of changes which were much easier to explain in the commit message. So
we both benefit from this practice. :)
Cheers, Phil
next prev parent reply other threads:[~2024-06-27 0:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 15:16 [nf-next PATCH v2 0/2] netfilter: xt_recent: Allow for larger hitcount values Phil Sutter
2024-06-14 15:16 ` [nf-next PATCH v2 1/2] netfilter: xt_recent: Reduce size of struct recent_entry::nstamps Phil Sutter
2024-06-26 16:12 ` Pablo Neira Ayuso
2024-06-26 22:40 ` Phil Sutter
2024-06-26 23:39 ` Pablo Neira Ayuso
2024-06-27 0:06 ` Phil Sutter [this message]
2024-06-14 15:16 ` [nf-next PATCH v2 2/2] netfilter: xt_recent: Lift restrictions on max hitcount value Phil Sutter
2024-06-14 15:24 ` Pablo Neira Ayuso
2024-06-14 15:58 ` Fabio Pedretti
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=Znys8VUURMRnUfxd@orbyte.nwl.cc \
--to=phil@nwl.cc \
--cc=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pedretti.fabio@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