linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pedro Tammela <pctammela@mojatatu.com>
To: Rudi Heitbaum <rudi@heitbaum.com>, 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
Subject: Re: [PATCH net-next v6 0/4] net/sched: retpoline wrappers for tc
Date: Tue, 27 Dec 2022 09:24:22 -0300	[thread overview]
Message-ID: <e527f418-1cfc-df4d-614f-873128bb1368@mojatatu.com> (raw)
In-Reply-To: <20221227083317.GA1025927@82a1e6c4c19b>

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



  reply	other threads:[~2022-12-27 12:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221206135513.1904815-1-pctammela@mojatatu.com>
2022-12-27  8:33 ` [PATCH net-next v6 0/4] net/sched: retpoline wrappers for tc Rudi Heitbaum
2022-12-27 12:24   ` Pedro Tammela [this message]
2022-12-27 13:47     ` Rudi Heitbaum

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=e527f418-1cfc-df4d-614f-873128bb1368@mojatatu.com \
    --to=pctammela@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rudi@heitbaum.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;
as well as URLs for NNTP newsgroup(s).