All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH RFC bpf-next 3/7] net: sched: add bpf_link API for bpf classifier
Date: Sat, 29 May 2021 06:37:58 +0800	[thread overview]
Message-ID: <202105290646.If4QumB4-lkp@intel.com> (raw)
In-Reply-To: <20210528195946.2375109-4-memxor@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 7143 bytes --]

Hi Kumar,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on bpf-next/master]

url:    https://github.com/0day-ci/linux/commits/Kumar-Kartikeya-Dwivedi/Add-bpf_link-based-TC-BPF-API/20210529-040147
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: i386-randconfig-s002-20210528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/7f3d2ad7de9869028e50b1749a8144ccb75a76b8
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Kumar-Kartikeya-Dwivedi/Add-bpf_link-based-TC-BPF-API/20210529-040147
        git checkout 7f3d2ad7de9869028e50b1749a8144ccb75a76b8
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386 

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


sparse warnings: (new ones prefixed by >>)
   net/sched/cls_api.c:270:22: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __be16 [usertype] protocol @@     got unsigned int [usertype] protocol @@
   net/sched/cls_api.c:270:22: sparse:     expected restricted __be16 [usertype] protocol
   net/sched/cls_api.c:270:22: sparse:     got unsigned int [usertype] protocol
   net/sched/cls_api.c:1675:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1675:16: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1675:16: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1776:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1776:20: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1776:20: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1737:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1737:25: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1737:25: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1757:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/sched/cls_api.c:1757:16: sparse:    struct tcf_proto *
   net/sched/cls_api.c:1757:16: sparse:    struct tcf_proto [noderef] __rcu *
   net/sched/cls_api.c:1823:25: sparse: sparse: restricted __be16 degrades to integer
   net/sched/cls_api.c:2497:50: sparse: sparse: restricted __be16 degrades to integer
>> net/sched/cls_api.c:3950:18: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] protocol @@     got restricted __be16 [usertype] @@
   net/sched/cls_api.c:3950:18: sparse:     expected unsigned int [usertype] protocol
   net/sched/cls_api.c:3950:18: sparse:     got restricted __be16 [usertype]

vim +3950 net/sched/cls_api.c

  3924	
  3925	int bpf_tc_link_attach(union bpf_attr *attr, struct bpf_prog *prog)
  3926	{
  3927		struct net *net = current->nsproxy->net_ns;
  3928		u32 chain_index, prio, protocol, parent;
  3929		struct tcf_chain_info chain_info;
  3930		struct tcf_block *block;
  3931		struct tcf_chain *chain;
  3932		struct tcf_proto *tp;
  3933		int err, tp_created;
  3934		unsigned long cl;
  3935		struct Qdisc *q;
  3936		void *fh;
  3937	
  3938		/* Caller already checks bpf_capable */
  3939		if (!ns_capable(current->nsproxy->net_ns->user_ns, CAP_NET_ADMIN))
  3940			return -EPERM;
  3941	
  3942		if (attr->link_create.flags ||
  3943		    !attr->link_create.target_ifindex ||
  3944		    !tc_flags_valid(attr->link_create.tc.gen_flags))
  3945			return -EINVAL;
  3946	
  3947	replay:
  3948		parent = attr->link_create.tc.parent;
  3949		prio = attr->link_create.tc.priority;
> 3950		protocol = htons(ETH_P_ALL);
  3951		chain_index = 0;
  3952		tp_created = 0;
  3953		prio <<= 16;
  3954		cl = 0;
  3955	
  3956		/* Address this when cls_bpf switches to RTNL_FLAG_DOIT_UNLOCKED */
  3957		rtnl_lock();
  3958	
  3959		block = tcf_block_find(net, &q, &parent, &cl,
  3960				       attr->link_create.target_ifindex, parent, NULL);
  3961		if (IS_ERR(block)) {
  3962			err = PTR_ERR(block);
  3963			goto out_unlock;
  3964		}
  3965		block->classid = parent;
  3966	
  3967		chain = tcf_chain_get(block, chain_index, true);
  3968		if (!chain) {
  3969			err = -ENOMEM;
  3970			goto out_block;
  3971		}
  3972	
  3973		mutex_lock(&chain->filter_chain_lock);
  3974	
  3975		tp = tcf_chain_tp_find(chain, &chain_info, protocol,
  3976				       prio ?: TC_H_MAKE(0x80000000U, 0U),
  3977				       !prio);
  3978		if (IS_ERR(tp)) {
  3979			err = PTR_ERR(tp);
  3980			goto out_chain_unlock;
  3981		}
  3982	
  3983		if (!tp) {
  3984			struct tcf_proto *tp_new = NULL;
  3985	
  3986			if (chain->flushing) {
  3987				err = -EAGAIN;
  3988				goto out_chain_unlock;
  3989			}
  3990	
  3991			if (!prio)
  3992				prio = tcf_auto_prio(tcf_chain_tp_prev(chain,
  3993								       &chain_info));
  3994	
  3995			mutex_unlock(&chain->filter_chain_lock);
  3996	
  3997			tp_new = tcf_proto_create("bpf", protocol, prio, chain, true,
  3998						  NULL);
  3999			if (IS_ERR(tp_new)) {
  4000				err = PTR_ERR(tp_new);
  4001				goto out_chain;
  4002			}
  4003	
  4004			tp_created = 1;
  4005			tp = tcf_chain_tp_insert_unique(chain, tp_new, protocol, prio,
  4006							true);
  4007			if (IS_ERR(tp)) {
  4008				err = PTR_ERR(tp);
  4009				goto out_chain;
  4010			}
  4011		} else {
  4012			mutex_unlock(&chain->filter_chain_lock);
  4013		}
  4014	
  4015		fh = tp->ops->get(tp, attr->link_create.tc.handle);
  4016	
  4017		if (!tp->ops->bpf_link_change)
  4018			err = -EDEADLK;
  4019		else
  4020			err = tp->ops->bpf_link_change(net, tp, prog, &fh,
  4021						       attr->link_create.tc.handle,
  4022						       attr->link_create.tc.gen_flags);
  4023		if (err >= 0 && q)
  4024			q->flags &= ~TCQ_F_CAN_BYPASS;
  4025	
  4026	out:
  4027		if (err < 0 && tp_created)
  4028			tcf_chain_tp_delete_empty(chain, tp, true, NULL);
  4029	out_chain:
  4030		if (chain) {
  4031			if (!IS_ERR_OR_NULL(tp))
  4032				tcf_proto_put(tp, true, NULL);
  4033			/* Chain reference only kept for tp creation
  4034			 * to pair with tcf_chain_put from tcf_proto_destroy
  4035			 */
  4036			if (!tp_created)
  4037				tcf_chain_put(chain);
  4038		}
  4039	out_block:
  4040		tcf_block_release(q, block, true);
  4041	out_unlock:
  4042		rtnl_unlock();
  4043		if (err == -EAGAIN)
  4044			goto replay;
  4045		return err;
  4046	out_chain_unlock:
  4047		mutex_unlock(&chain->filter_chain_lock);
  4048		goto out;
  4049	}
  4050	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37302 bytes --]

  reply	other threads:[~2021-05-28 22:37 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 19:59 [PATCH RFC bpf-next 0/7] Add bpf_link based TC-BPF API Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 1/7] net: sched: refactor cls_bpf creation code Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 2/7] bpf: export bpf_link functions for modules Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 3/7] net: sched: add bpf_link API for bpf classifier Kumar Kartikeya Dwivedi
2021-05-28 22:37   ` kernel test robot [this message]
2021-05-28 23:18   ` kernel test robot
2021-06-02 20:56   ` Andrii Nakryiko
2021-05-28 19:59 ` [PATCH RFC bpf-next 4/7] net: sched: add lightweight update path for cls_bpf Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 5/7] tools: bpf.h: sync with kernel sources Kumar Kartikeya Dwivedi
2021-05-28 19:59 ` [PATCH RFC bpf-next 6/7] libbpf: add bpf_link based TC-BPF management API Kumar Kartikeya Dwivedi
2021-06-02 21:03   ` Andrii Nakryiko
2021-05-28 19:59 ` [PATCH RFC bpf-next 7/7] libbpf: add selftest for " Kumar Kartikeya Dwivedi
2021-06-02 21:09 ` [PATCH RFC bpf-next 0/7] Add bpf_link based TC-BPF API Andrii Nakryiko
2021-06-02 21:45   ` Kumar Kartikeya Dwivedi
2021-06-02 23:50     ` Alexei Starovoitov
2021-06-04  6:43       ` Kumar Kartikeya Dwivedi
2021-06-06 23:37 ` Cong Wang
2021-06-07  3:37   ` Kumar Kartikeya Dwivedi
2021-06-07  5:18     ` Cong Wang
2021-06-07  6:07       ` Kumar Kartikeya Dwivedi
2021-06-08  2:00         ` Cong Wang
2021-06-08  7:19           ` Kumar Kartikeya Dwivedi
2021-06-08 15:39             ` Alexei Starovoitov
2021-06-11  2:10               ` Cong Wang
2021-06-11  2:00             ` Cong Wang
2021-06-13  2:53               ` Kumar Kartikeya Dwivedi
2021-06-13 20:27                 ` Jamal Hadi Salim
2021-06-13 20:34                   ` Kumar Kartikeya Dwivedi
2021-06-13 21:10                     ` Jamal Hadi Salim
2021-06-14 13:03                       ` Marcelo Ricardo Leitner
2021-06-15 23:07                       ` Daniel Borkmann
2021-06-16 14:40                         ` Jamal Hadi Salim
2021-06-16 15:32                           ` Kumar Kartikeya Dwivedi
2021-06-16 16:00                             ` Daniel Borkmann
2021-06-18 11:40                               ` Jamal Hadi Salim
2021-06-18 14:38                                 ` Alexei Starovoitov
2021-06-18 14:50                                   ` Jamal Hadi Salim
2021-06-18 16:23                                     ` Alexei Starovoitov
2021-06-18 16:41                                       ` Jamal Hadi Salim
2021-06-18 22:42                                 ` Daniel Borkmann
2021-06-21 13:55                                   ` Jamal Hadi Salim
2021-06-15  4:33                 ` Cong Wang
2021-06-15 11:54                   ` Toke Høiland-Jørgensen
2021-06-15 23:44                     ` Daniel Borkmann
2021-06-16 12:03                       ` Toke Høiland-Jørgensen
2021-06-16 15:33                       ` Jamal Hadi Salim
2021-06-13  3:08               ` Kumar Kartikeya Dwivedi
2021-05-28 23:44 [PATCH RFC bpf-next 3/7] net: sched: add bpf_link API for bpf classifier kernel test robot

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=202105290646.If4QumB4-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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.