mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Roopa Prabhu <roopa@nvidia.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: bridge: Fix jump_label config
Date: Tue, 16 Mar 2021 23:48:18 +0800	[thread overview]
Message-ID: <2a9d5d65-bf6c-7c41-113c-6297e3826b91@huawei.com> (raw)
In-Reply-To: <CAM_iQpWArF_At1XAcviDnyXdth4cMeUSQh7RBW-JNCDUPYfA2A@mail.gmail.com>


On 2021/2/27 4:19, Cong Wang wrote:
> On Thu, Feb 25, 2021 at 5:39 PM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>
>> On 2021/2/26 5:22, Cong Wang wrote:
>>> On Wed, Feb 24, 2021 at 8:03 AM Kefeng Wang <wangkefeng.wang@huawei.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@huawei.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:

Hi Cong,  the nf_hooks_needed is wrapped up by this macro, so this place 
should use it,

or we will meet the build issue,  thanks.

../net/bridge/br_input.c: In function ‘nf_hook_bridge_pre’:
../net/bridge/br_input.c:211:25: error: ‘nf_hooks_needed’ undeclared 
(first use in this function)
   211 |  if 
(!static_key_false(&nf_hooks_needed[NFPROTO_BRIDGE][NF_BR_PRE_ROUTING]))


>
> #else
> struct static_key {
>          atomic_t enabled;
> };
> #endif  /* CONFIG_JUMP_LABEL */
>
> Thanks.
>

      parent reply	other threads:[~2021-03-16 15:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 15:38 Kefeng Wang
2021-02-24 18:54 ` Jakub Kicinski
2021-02-25  1:17   ` Kefeng Wang
2021-02-25 21:22 ` Cong Wang
2021-02-26  1:39   ` Kefeng Wang
2021-02-26 20:19     ` Cong Wang
2021-02-27  2:14       ` Kefeng Wang
2021-03-16 15:48       ` Kefeng Wang [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=2a9d5d65-bf6c-7c41-113c-6297e3826b91@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=xiyou.wangcong@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

all inboxes | Powered by JetHome®