Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3106486rwl; Tue, 27 Dec 2022 04:34:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsKQeMm5G6WiMWSdO0my6muUZqfgdazq02lL1NdDPY9q8460Ij67lJlRtXW250l1LVSBiPH X-Received: by 2002:a17:906:3707:b0:828:76a3:e6bf with SMTP id d7-20020a170906370700b0082876a3e6bfmr23702906ejc.50.1672144443930; Tue, 27 Dec 2022 04:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672144443; cv=none; d=google.com; s=arc-20160816; b=PC4/AHq1p+Ex5OChVJJt1KmkztXexB6kqWIn+7x8EU/7CWj42JRn1uVqRMjo9RaOU1 N+wwCrEmhH6kw8Ku+PjeYMim8PO1rtnpGgG7soeTDCvOhO0efRaCIAxdmsPRKBsZtNIs vsDYeezlRtluyzocUNPpVXA/RGC6RVOm7e8p71I9xbXwmkNdofi8BG34sj+TmP/Kl6hT P6BmwoEAMHa98L5GS5z7g98W2/KpEVFaWoa0Zt+Mt9zStEwzukz4Ei+neQKPP08c/5AA r9fT1iDVpEDnBLGgMHiH996MJeCvzjVh29E+ILDGuUvld0waM9slE6MMLFKGcM9Wievn aHxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=dV8isNUppacynWpg45DwTWA/VWjEAGzXX+K9/4Lkct8=; b=vbiNVdncwZAgDkSiqAMrFkx0eHdgteay80DmIMGgCLqhiur9n8YKPyKdhwl6K0yGMA SfVM6vujUFpChuikm3HafSSuWS1IF/Ew2TKCgijoPILOyvsanGt7ICBqJTrq0yo5tdR8 e+TRV2GaCxuivPP6Fd+LvNy6rHy6EcsLAbkHAKuN0zbHYDdilonZLvvPiuKFHovUeQkG HqoezucNP1SgAEgEassJ7OTq9UIXOqVfaS5zZls7F+B3mRdUw3b/KhpvdK6PiHwN9AAl O7k7d/D0+7H8zVuVJ8rlYc2AKGodT0BRdM2Agjps2YpsiSe67BzJYwUDxUTS0VmZNkv7 Oe4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mojatatu-com.20210112.gappssmtp.com header.s=20210112 header.b="f/t4KgC7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg11-20020a170907320b00b007c14e98e3a1si11064169ejb.752.2022.12.27.04.33.48; Tue, 27 Dec 2022 04:34:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mojatatu-com.20210112.gappssmtp.com header.s=20210112 header.b="f/t4KgC7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231215AbiL0MZp (ORCPT + 66 others); Tue, 27 Dec 2022 07:25:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232230AbiL0MZC (ORCPT ); Tue, 27 Dec 2022 07:25:02 -0500 Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C6137662 for ; Tue, 27 Dec 2022 04:24:27 -0800 (PST) Received: by mail-ot1-x336.google.com with SMTP id e17-20020a9d7311000000b00678202573f1so8092437otk.8 for ; Tue, 27 Dec 2022 04:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mojatatu-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dV8isNUppacynWpg45DwTWA/VWjEAGzXX+K9/4Lkct8=; b=f/t4KgC7HXwvjrgBON1ICJtbFLbtYnJ2nherC2JR9NUcExu5ff+BgHVgj4o3OXLQsY Mn6f8wfgXRGyF+04P283Mg7rUnYeLvXKjeVQHQ4lr5p69FWd893lW8b0ij1+Zsi734A5 JcnU1ith+6I6Y8q9iuTjrjrqYssm+ol/Nj5XdUsPtaYMfD2xN7sa2TGezWYBr9AzYMaj 98se/PLLZwNinK5LxUUmlAXkP/WlUgOGPYxhxE62+LkuXg6DF4yxsyR6gwgfDzcoO0om mmY7VzoEr/CzpxjWdbO61mmpuAcGalOMO2rgn9RSxcTZmBMaHh5l7lcL0EAbcfpTiXGq 4Xdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dV8isNUppacynWpg45DwTWA/VWjEAGzXX+K9/4Lkct8=; b=56EqslPzHLiZzze8fa6mZFqjotJN96sDS1Fh9I95fu9srpvDCYTLYiMaRE4E7FTDWy Nfxf1PNHpm4puIUOCUXErlqq7t7yvR/gAkkmWg6p9S3rTJ0ncXB3WNnCTKDNjpdmMvae GkVltg4U/TsvLtF5yv0HVRQ5NhMr/uEI8BLVEvChDf1rL8JBuYgCu78VMk5d/a3Kr/ae IJxDTlF86ql1jZGBGqDNJvxiQFC2FrlnvGCaFH43Fw6CjQPWHjgPyvA9s51Hh44aL7c7 B6xJBwL8fxRWtzGhTTmPnJ04IquMU53f0BzaoaWSdpvAJ3fUjxmsE5yFT6DFH5FBfT/u tbpw== X-Gm-Message-State: AFqh2krEIoctVbkCpxmpPiuhnMHi6vsOuLwm0ccBkgcYm3MS56tbGQvU uvvR3D6eaauJ7+Xm80sdueQhtg9Q/7H+4IqK X-Received: by 2002:a05:6830:1251:b0:670:7865:133c with SMTP id s17-20020a056830125100b006707865133cmr10578090otp.13.1672143866971; Tue, 27 Dec 2022 04:24:26 -0800 (PST) Received: from ?IPV6:2804:14d:5c5e:4698:e4b6:5a8e:5e17:7db3? ([2804:14d:5c5e:4698:e4b6:5a8e:5e17:7db3]) by smtp.gmail.com with ESMTPSA id s6-20020a9d7586000000b0066ca61230casm6471717otk.8.2022.12.27.04.24.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Dec 2022 04:24:26 -0800 (PST) Message-ID: Date: Tue, 27 Dec 2022 09:24:22 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH net-next v6 0/4] net/sched: retpoline wrappers for tc Content-Language: en-US To: Rudi Heitbaum , netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, kuniyu@amazon.com, linux-kernel@vger.kernel.org References: <20221206135513.1904815-1-pctammela@mojatatu.com> <20221227083317.GA1025927@82a1e6c4c19b> From: Pedro Tammela In-Reply-To: <20221227083317.GA1025927@82a1e6c4c19b> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/12/2022 05:33, Rudi Heitbaum wrote: > Hi Pedro, > > Compiling kernel 6.2-rc1 fails on x86_64 when CONFIG_NET_CLS or > CONFIG_NET_CLS_ACT is not set, when CONFIG_RETPOLINE=y is set. > > Does tc_wrapper RETPOLINE need a dependency on NET_CLS/NET_CLS_ACT > to be added? Or a default? > > net/sched/sch_api.c: In function 'pktsched_init': > net/sched/sch_api.c:2306:9: error: implicit declaration of function > 'tc_wrapper_init' [-Werror=implicit-function-declaration] > 2306 | tc_wrapper_init(); > | ^~~~~~~~~~~~~~~ > cc1: some warnings being treated as errors > make[3]: *** [scripts/Makefile.build:252: net/sched/sch_api.o] Error 1 > make[2]: *** [scripts/Makefile.build:504: net/sched] Error 2 > make[1]: *** [scripts/Makefile.build:504: net] Error 2 > > below is the relevent lines from the .config file. > > $ grep -e RETPOLINE -e NET_CLS projects/Generic/linux/linux.x86_64.conf > CONFIG_RETPOLINE=y > # CONFIG_NET_CLS_BASIC is not set > # CONFIG_NET_CLS_TCINDEX is not set > # CONFIG_NET_CLS_ROUTE4 is not set > # CONFIG_NET_CLS_FW is not set > # CONFIG_NET_CLS_U32 is not set > # CONFIG_NET_CLS_RSVP is not set > # CONFIG_NET_CLS_RSVP6 is not set > # CONFIG_NET_CLS_FLOW is not set > # CONFIG_NET_CLS_CGROUP is not set > # CONFIG_NET_CLS_BPF is not set > # CONFIG_NET_CLS_FLOWER is not set > # CONFIG_NET_CLS_MATCHALL is not set > # CONFIG_NET_CLS_ACT is not set > Hi Rudi, Thanks for the report. Could you try the following patch? diff --git a/include/net/tc_wrapper.h b/include/net/tc_wrapper.h index ceed2fc089ff..d323fffb839a 100644 --- a/include/net/tc_wrapper.h +++ b/include/net/tc_wrapper.h @@ -216,6 +216,8 @@ static inline int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp, return tp->classify(skb, tp, res); } +#endif /* CONFIG_NET_CLS */ + static inline void tc_wrapper_init(void) { #ifdef CONFIG_X86 @@ -224,8 +226,6 @@ static inline void tc_wrapper_init(void) #endif } -#endif /* CONFIG_NET_CLS */ - #else #define TC_INDIRECT_SCOPE static