* [PATCH] net: bridge: Fix jump_label config
@ 2021-02-24 15:38 Kefeng Wang
2021-02-24 18:54 ` Jakub Kicinski
2021-02-25 21:22 ` Cong Wang
0 siblings, 2 replies; 8+ messages in thread
From: Kefeng Wang @ 2021-02-24 15:38 UTC (permalink / raw)
To: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller, netdev, linux-kernel
Cc: Kefeng Wang
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>
---
net/bridge/br_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 222285d9dae2..065b6cfba40f 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -207,7 +207,7 @@ static int nf_hook_bridge_pre(struct sk_buff *skb, struct sk_buff **pskb)
int ret;
net = dev_net(skb->dev);
-#ifdef HAVE_JUMP_LABEL
+#ifdef CONFIG_JUMP_LABEL
if (!static_key_false(&nf_hooks_needed[NFPROTO_BRIDGE][NF_BR_PRE_ROUTING]))
goto frame_finish;
#endif
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] net: bridge: Fix jump_label config
2021-02-24 15:38 [PATCH] net: bridge: Fix jump_label config Kefeng Wang
@ 2021-02-24 18:54 ` Jakub Kicinski
2021-02-25 1:17 ` Kefeng Wang
2021-02-25 21:22 ` Cong Wang
1 sibling, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2021-02-24 18:54 UTC (permalink / raw)
To: Kefeng Wang
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller, netdev, linux-kernel
On Wed, 24 Feb 2021 23:38:03 +0800 Kefeng Wang 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>
You need to CC the authors of the commit you're blaming. Please make
use of scripts/get_maintainers.pl and repost.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: bridge: Fix jump_label config
2021-02-24 18:54 ` Jakub Kicinski
@ 2021-02-25 1:17 ` Kefeng Wang
0 siblings, 0 replies; 8+ messages in thread
From: Kefeng Wang @ 2021-02-25 1:17 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller, netdev,
linux-kernel, Florian Westphal
On 2021/2/25 2:54, Jakub Kicinski wrote:
> On Wed, 24 Feb 2021 23:38:03 +0800 Kefeng Wang 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>
> You need to CC the authors of the commit you're blaming. Please make
> use of scripts/get_maintainers.pl and repost.
Yes, I use get_maintainers.pl, but only add maintainers to the list,
thanks for your reminder,
cc the author Florian now.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: bridge: Fix jump_label config
2021-02-24 15:38 [PATCH] net: bridge: Fix jump_label config Kefeng Wang
2021-02-24 18:54 ` Jakub Kicinski
@ 2021-02-25 21:22 ` Cong Wang
2021-02-26 1:39 ` Kefeng Wang
1 sibling, 1 reply; 8+ messages in thread
From: Cong Wang @ 2021-02-25 21:22 UTC (permalink / raw)
To: Kefeng Wang
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller,
Linux Kernel Network Developers, LKML
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.
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: bridge: Fix jump_label config
2021-02-25 21:22 ` Cong Wang
@ 2021-02-26 1:39 ` Kefeng Wang
2021-02-26 20:19 ` Cong Wang
0 siblings, 1 reply; 8+ messages in thread
From: Kefeng Wang @ 2021-02-26 1:39 UTC (permalink / raw)
To: Cong Wang
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller,
Linux Kernel Network Developers, LKML
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()
>
> Thanks.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: bridge: Fix jump_label config
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
0 siblings, 2 replies; 8+ messages in thread
From: Cong Wang @ 2021-02-26 20:19 UTC (permalink / raw)
To: Kefeng Wang
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller,
Linux Kernel Network Developers, LKML
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:
#else
struct static_key {
atomic_t enabled;
};
#endif /* CONFIG_JUMP_LABEL */
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: bridge: Fix jump_label config
2021-02-26 20:19 ` Cong Wang
@ 2021-02-27 2:14 ` Kefeng Wang
2021-03-16 15:48 ` Kefeng Wang
1 sibling, 0 replies; 8+ messages in thread
From: Kefeng Wang @ 2021-02-27 2:14 UTC (permalink / raw)
To: Cong Wang
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller,
Linux Kernel Network Developers, LKML
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:
Ok, I mean that I don't change the original logic, but that's no need
this macro actually,
it could be built with or without CONFIG_JUMP_LABEL, only increased the
size a little bit.
>
> #else
> struct static_key {
> atomic_t enabled;
> };
> #endif /* CONFIG_JUMP_LABEL */
>
> Thanks.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] net: bridge: Fix jump_label config
2021-02-26 20:19 ` Cong Wang
2021-02-27 2:14 ` Kefeng Wang
@ 2021-03-16 15:48 ` Kefeng Wang
1 sibling, 0 replies; 8+ messages in thread
From: Kefeng Wang @ 2021-03-16 15:48 UTC (permalink / raw)
To: Cong Wang
Cc: Roopa Prabhu, Nikolay Aleksandrov, David S. Miller,
Linux Kernel Network Developers, LKML
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.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-16 15:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 15:38 [PATCH] net: bridge: Fix jump_label config 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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.