All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Cong Wang <cong.wang@bytedance.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [congwang:sch_bpf 4/4] net/sched/sch_api.c:369:22: error: implicit declaration of function 'tcf_get_next_chain'
Date: Fri, 27 May 2022 18:41:16 +0800	[thread overview]
Message-ID: <202205271852.CPCyjBUG-lkp@intel.com> (raw)

tree:   https://github.com/congwang/linux.git sch_bpf
head:   d7144f4291a2882e698a6d9d83f7e614d97be9c8
commit: d7144f4291a2882e698a6d9d83f7e614d97be9c8 [4/4] net_sched: introduce helper bpf_skb_tc_classify()
config: mips-xway_defconfig (https://download.01.org/0day-ci/archive/20220527/202205271852.CPCyjBUG-lkp@intel.com/config)
compiler: mips-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/congwang/linux/commit/d7144f4291a2882e698a6d9d83f7e614d97be9c8
        git remote add congwang https://github.com/congwang/linux.git
        git fetch --no-tags congwang sch_bpf
        git checkout d7144f4291a2882e698a6d9d83f7e614d97be9c8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   net/sched/sch_api.c: In function '____bpf_skb_tc_classify':
>> net/sched/sch_api.c:369:22: error: implicit declaration of function 'tcf_get_next_chain' [-Werror=implicit-function-declaration]
     369 |         for (chain = tcf_get_next_chain(block, NULL);
         |                      ^~~~~~~~~~~~~~~~~~
   net/sched/sch_api.c:369:20: warning: assignment to 'struct tcf_chain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     369 |         for (chain = tcf_get_next_chain(block, NULL);
         |                    ^
   net/sched/sch_api.c:371:20: warning: assignment to 'struct tcf_chain *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     371 |              chain = tcf_get_next_chain(block, chain)) {
         |                    ^
   cc1: some warnings being treated as errors


vim +/tcf_get_next_chain +369 net/sched/sch_api.c

   334	
   335	BPF_CALL_3(bpf_skb_tc_classify, struct sk_buff *, skb, int, ifindex, u32, handle)
   336	{
   337		struct net *net = dev_net(skb->dev);
   338		const struct Qdisc_class_ops *cops;
   339		struct tcf_result res = {};
   340		struct tcf_block *block;
   341		struct tcf_chain *chain;
   342		struct net_device *dev;
   343		unsigned long cl = 0;
   344		struct Qdisc *q;
   345		int result;
   346	
   347		rcu_read_lock();
   348		dev = dev_get_by_index_rcu(net, ifindex);
   349		if (!dev)
   350			goto out;
   351		q = qdisc_lookup_rcu(dev, handle);
   352		if (!q)
   353			goto out;
   354	
   355		cops = q->ops->cl_ops;
   356		if (!cops)
   357			goto out;
   358		if (!cops->tcf_block)
   359			goto out;
   360		if (TC_H_MIN(handle)) {
   361			cl = cops->find(q, handle);
   362			if (cl == 0)
   363				goto out;
   364		}
   365		block = cops->tcf_block(q, cl, NULL);
   366		if (!block)
   367			goto out;
   368	
 > 369		for (chain = tcf_get_next_chain(block, NULL);
   370		     chain;
   371		     chain = tcf_get_next_chain(block, chain)) {
   372			struct tcf_proto *tp;
   373	
   374			result = tcf_classify(skb, NULL, tp, &res, false);
   375			if (result  >= 0) {
   376	#ifdef CONFIG_NET_CLS_ACT
   377				switch (result) {
   378				case TC_ACT_QUEUED:
   379				case TC_ACT_STOLEN:
   380				case TC_ACT_TRAP:
   381					fallthrough;
   382				case TC_ACT_SHOT:
   383					rcu_read_unlock();
   384					return 0;
   385				}
   386	#endif
   387			}
   388		}
   389	out:
   390		rcu_read_unlock();
   391		return res.class;
   392	}
   393	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-05-27 10:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202205271852.CPCyjBUG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cong.wang@bytedance.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 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.