Re: [PATCH net v1 1/1] netfilter: conntrack: Guard possoble unused functions
From: Simon Horman
Date: Mon Sep 09 2024 - 14:30:59 EST
On Mon, Sep 09, 2024 at 06:36:07PM +0300, Andy Shevchenko wrote:
> On Mon, Sep 09, 2024 at 04:17:12PM +0100, Simon Horman wrote:
> > On Mon, Sep 09, 2024 at 12:37:51PM +0300, Andy Shevchenko wrote:
> > > On Fri, Sep 06, 2024 at 05:29:38PM +0100, Simon Horman wrote:
> > > > On Thu, Sep 05, 2024 at 11:36:12PM +0300, Andy Shevchenko wrote:
> > >
> > > > Local testing seems to show that the warning is still emitted
> > > > for ctnetlink_label_size if CONFIG_NETFILTER_NETLINK_GLUE_CT is enabled
>
> Hold on, this is not related to the patch.
> It might be another issue.
Yes, sorry, I see that now too.
Perhaps it can be fixed separately, something like this:
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 8fd2b9e392a7..fcd1b800b2c1 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -383,6 +383,7 @@ static int ctnetlink_dump_secctx(struct sk_buff *skb, const struct nf_conn *ct)
#endif
#ifdef CONFIG_NF_CONNTRACK_LABELS
+#ifdef CONFIG_NETFILTER_NETLINK_GLUE_CT
static inline int ctnetlink_label_size(const struct nf_conn *ct)
{
struct nf_conn_labels *labels = nf_ct_labels_find(ct);
@@ -391,6 +392,7 @@ static inline int ctnetlink_label_size(const struct nf_conn *ct)
return 0;
return nla_total_size(sizeof(labels->bits));
}
+#endif
static int
ctnetlink_dump_labels(struct sk_buff *skb, const struct nf_conn *ct)
>
> > > > but CONFIG_NF_CONNTRACK_EVENTS is not.
> > >
> > > Can you elaborate on this, please?
> > > I can not reproduce.
> >
> > Sure, let me retest and get back to you.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>