Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1671251pxb; Fri, 26 Feb 2021 18:20:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCPF3cAClGRQP0nkY7J7oDS+zjMj2cPh6JwftRVWRN6VErJmBs9hCzR0arrSURkXF766PN X-Received: by 2002:a05:6402:216:: with SMTP id t22mr6373657edv.168.1614392440103; Fri, 26 Feb 2021 18:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614392440; cv=none; d=google.com; s=arc-20160816; b=HGfjDKHQqEZn+ryIio3H2ICRVxsNo5QrKW3gHSPZ5xr7YF1jIUbsDAi3x+EGcbTWUG Jw069xBExhZAcPaTGcend2Qou2ab8fKV7xU47HRO4BC/HbKGRbwOuBov3lHplvX3MTB6 ZuFZ5Esnk0Zg1vcRP/sftnrewMk5juzHrXCNLCHKEstJNYJ6mJhB361P02DdmKm9QroT +m4Q1xppKV6ETd7sspD/YTL1y1f/YEiqdBx185YIVGEd7L7q5kV0UNuNETR3d46WIsXW aHvKlnczHzgR7uuQLOQamQgREIWp3xu4syCHie/ZxHlH9r9PrAqQACjoaiuMGUBwPWse SvmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=kDrU2+6s3dal7Rhq1uXBldfH5u0yNlTrSGr8/QtFTBE=; b=sTk/OY8rQmVu/iLkPxxtDufZoHNBzRx+8ird+qozY1kyKqR2NujsG2KD5ZWziPbzVH QoqRol8xvsLnYHxcPMQXqDk6EaeO9FFDc7agJN2sGh0tox/WEDuIQSSlDEHeDSNLG4qS QeEDPU6bF3k74v7HcwNOruDFX6KVLpCrWOqgc1yGLZ7X0yCKYVZopx2nQfDbv4Kw7yiz NAmTdGWbVljLgI/XlP37NrasxttSS579J46r9+8kCFhOuVN9M/DoCQ8ZmaPuJCvbQ0sD Azu610K3SaIuqNXLErg9EXJO6AaCJWzBH5rTwuXoKsg10tapTX9G3tWt1becOTHD1/Fd uGnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ap16si7165318ejc.684.2021.02.26.18.20.17; Fri, 26 Feb 2021 18:20:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbhB0CPb (ORCPT + 99 others); Fri, 26 Feb 2021 21:15:31 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12210 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbhB0CPa (ORCPT ); Fri, 26 Feb 2021 21:15:30 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DnVRH27m5zlQRP; Sat, 27 Feb 2021 10:12:43 +0800 (CST) Received: from [10.174.177.244] (10.174.177.244) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.498.0; Sat, 27 Feb 2021 10:14:43 +0800 Subject: Re: [PATCH] net: bridge: Fix jump_label config To: Cong Wang CC: Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" , Linux Kernel Network Developers , LKML References: <20210224153803.91194-1-wangkefeng.wang@huawei.com> <1cf51ae7-3bce-3b9f-f6aa-c20499eedf7a@huawei.com> From: Kefeng Wang Message-ID: <6482713d-2b02-4ebe-8963-912e79b3bc99@huawei.com> Date: Sat, 27 Feb 2021 10:14:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.174.177.244] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/2/27 4:19, Cong Wang wrote: > On Thu, Feb 25, 2021 at 5:39 PM Kefeng Wang wrote: >> >> On 2021/2/26 5:22, Cong Wang wrote: >>> On Wed, Feb 24, 2021 at 8:03 AM 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 >>> 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. >