From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Simon Horman <horms@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jozsef Kadlecsik <kadlec@netfilter.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH nf-next 0/2] netfilter: conntrack: label helpers conditional compilation updates
Date: Thu, 19 Sep 2024 10:05:04 +0200 [thread overview]
Message-ID: <ZuvbMF_1cX16GDoz@calendula> (raw)
In-Reply-To: <20240919071801.GB1044577@kernel.org>
On Thu, Sep 19, 2024 at 08:19:37AM +0100, Simon Horman wrote:
> On Wed, Sep 18, 2024 at 11:56:24PM +0200, Pablo Neira Ayuso wrote:
> > On Wed, Sep 18, 2024 at 08:01:21PM +0300, Andy Shevchenko wrote:
> > > On Wed, Sep 18, 2024 at 04:29:14PM +0200, Pablo Neira Ayuso wrote:
> > > > On Wed, Sep 18, 2024 at 04:55:15PM +0300, Andy Shevchenko wrote:
> > > > > On Wed, Sep 18, 2024 at 01:52:14PM +0200, Pablo Neira Ayuso wrote:
> > > > > > On Mon, Sep 16, 2024 at 04:14:40PM +0100, Simon Horman wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > This short series updates conditional compilation of label helpers to:
> > > > > > >
> > > > > > > 1) Compile them regardless of if CONFIG_NF_CONNTRACK_LABELS is enabled
> > > > > > > or not. It is safe to do so as the functions will always return 0 if
> > > > > > > CONFIG_NF_CONNTRACK_LABELS is not enabled. And the compiler should
> > > > > > > optimise waway the code. Which is the desired behaviour.
> > > > > > >
> > > > > > > 2) Only compile ctnetlink_label_size if CONFIG_NF_CONNTRACK_EVENTS is
> > > > > > > enabled. This addresses a warning about this function being unused
> > > > > > > in this case.
> > > > > >
> > > > > > Patch 1)
> > > > > >
> > > > > > -#ifdef CONFIG_NF_CONNTRACK_LABELS
> > > > > > static inline int ctnetlink_label_size(const struct nf_conn *ct)
> > > > > >
> > > > > > Patch 2)
> > > > > >
> > > > > > +#ifdef CONFIG_NF_CONNTRACK_EVENTS
> > > > > > static inline int ctnetlink_label_size(const struct nf_conn *ct)
> > > > > >
> > > > > > They both refer to ctnetlink_label_size(), #ifdef check is not
> > > > > > correct.
> > > > >
> > > > > But the first one touches more, no?
> > > >
> > > > Yes, it also remove a #define ctnetlink_label_size() macro in patch #1.
> > > > I am fine with this series as is.
> > >
> > > What I meant is that the original patch 1 takes care about definitions of
> > > two functions. Not just a single one.
> >
> > My understanding is that #ifdef CONFIG_NF_CONNTRACK_LABELS that wraps
> > ctnetlink_label_size() is not correct (patch 1), instead
> > CONFIG_NF_CONNTRACK_EVENTS should be used (patch 2).
> >
> > Then, as a side effect this goes away (patch 1):
> >
> > -#else
> > -#define ctnetlink_dump_labels(a, b) (0)
> > -#define ctnetlink_label_size(a) (0)
> > -#endif
> >
> > that is why I am proposing to coaleasce these two patches in one.
>
> Thanks,
>
> Just to clarify. I did think there is value in separating the two changes.
> But that was a subjective judgement on my part.
>
> Your understanding of the overall change is correct.
> And if it is preferred to have a single patch - as seems to be the case -
> then that is fine by me.
>
> Going forward, I'll try to remember not to split-up patches for netfilter
> so much.
Never mind too much, your splitting helps for reviewing.
This is also subjective judgement on my side.
next prev parent reply other threads:[~2024-09-19 8:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 15:14 [PATCH nf-next 0/2] netfilter: conntrack: label helpers conditional compilation updates Simon Horman
2024-09-16 15:14 ` [PATCH nf-next 1/2] netfilter: conntrack: compile label helpers unconditionally Simon Horman
2024-09-16 15:14 ` [PATCH nf-next 2/2] netfilter: conntrack: conditionally compile ctnetlink_label_size Simon Horman
2024-09-16 15:29 ` [PATCH nf-next 0/2] netfilter: conntrack: label helpers conditional compilation updates Andy Shevchenko
2024-09-18 11:52 ` Pablo Neira Ayuso
2024-09-18 13:55 ` Andy Shevchenko
2024-09-18 14:29 ` Pablo Neira Ayuso
2024-09-18 17:01 ` Andy Shevchenko
2024-09-18 21:56 ` Pablo Neira Ayuso
2024-09-19 7:19 ` Simon Horman
2024-09-19 8:05 ` Pablo Neira Ayuso [this message]
2024-09-18 18:37 ` Simon Horman
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=ZuvbMF_1cX16GDoz@calendula \
--to=pablo@netfilter.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=justinstitt@google.com \
--cc=kadlec@netfilter.org \
--cc=kuba@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.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).