[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWArF_At1XAcviDnyXdth4cMeUSQh7RBW-JNCDUPYfA2A@mail.gmail.com>
Date: Fri, 26 Feb 2021 12:19:14 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Kefeng Wang <wangkefeng.wang@...wei.com>
Cc: Roopa Prabhu <roopa@...dia.com>,
Nikolay Aleksandrov <nikolay@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: bridge: Fix jump_label config
On Thu, Feb 25, 2021 at 5:39 PM Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
>
>
> On 2021/2/26 5:22, Cong Wang wrote:
> > On Wed, Feb 24, 2021 at 8:03 AM Kefeng Wang <wangkefeng.wang@...wei.com> wrote:
> >> HAVE_JUMP_LABLE is removed by commit e9666d10a567 ("jump_label: move
> >> 'asm goto' support test to Kconfig"), use CONFIG_JUMP_LABLE instead
> >> of HAVE_JUMP_LABLE.
> >>
> >> Fixes: 971502d77faa ("bridge: netfilter: unroll NF_HOOK helper in bridge input path")
> >> Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> > Hmm, why do we have to use a macro here? static_key_false() is defined
> > in both cases, CONFIG_JUMP_LABEL=y or CONFIG_JUMP_LABEL=n.
>
> It seems that all nf_hooks_needed related are using the macro,
>
> see net/netfilter/core.c and include/linux/netfilter.h,
>
> #ifdef CONFIG_JUMP_LABEL
> struct static_key nf_hooks_needed[NFPROTO_NUMPROTO][NF_MAX_HOOKS];
> EXPORT_SYMBOL(nf_hooks_needed);
> #endif
>
> nf_static_key_inc()/nf_static_key_dec()
Same question: why? Clearly struct static_key is defined in both cases:
#else
struct static_key {
atomic_t enabled;
};
#endif /* CONFIG_JUMP_LABEL */
Thanks.
Powered by blists - more mailing lists