All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [kkdwivedi:fermata 410/441] drivers/nvme/host/tcp.c:4464:2: error: implicit declaration of function 'bpf_struct_ops_for_each_prog'
Date: Sun, 29 Nov 2026 13:12:29 +0100	[thread overview]
Message-ID: <20261129130419.OLepyQjg-lkp@intel.com> (raw)

tree:   https://github.com/kkdwivedi/linux fermata
head:   71012f36d1d04ec653daeebbce8dccf19aeb205d
commit: c694ea706b13a2ae779cf45a14ae9bdf18c42296 [410/441] nvme-tcp: Let a struct_ops hold a request, its frame in the request
config: arc-randconfig-2200-20261129 (https://download.01.org/0day-ci/archive/20261129/20261129130419.OLepyQjg-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 10.5.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261129/20261129130419.OLepyQjg-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261129130419.OLepyQjg-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/nvme/host/tcp.c: In function 'bpf_nvme_tcp_ops_reg':
>> drivers/nvme/host/tcp.c:4464:2: error: implicit declaration of function 'bpf_struct_ops_for_each_prog' [-Werror=implicit-function-declaration]
    4464 |  bpf_struct_ops_for_each_prog(kdata, nvme_tcp_ext_first_prog, &prog);
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/security.h:35,
                    from include/net/scm.h:9,
                    from include/linux/netlink.h:9,
                    from include/uapi/linux/neighbour.h:6,
                    from include/linux/netdevice.h:44,
                    from include/net/sock.h:46,
                    from drivers/nvme/host/tcp.c:16:
   drivers/nvme/host/tcp.c: In function 'nvme_tcp_exec_init':
   include/linux/bpf.h:2569:50: warning: statement with no effect [-Wunused-value]
    2569 | #define register_bpf_struct_ops(st_ops, type) ({ (void *)(st_ops); 0; })
         |                                                  ^~~~~~~~~~~~~~~~
   drivers/nvme/host/tcp.c:4802:6: note: in expansion of macro 'register_bpf_struct_ops'
    4802 |      register_bpf_struct_ops(&bpf_bpf_nvme_tcp_ops, bpf_nvme_tcp_ops))
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/bpf_struct_ops_for_each_prog +4464 drivers/nvme/host/tcp.c

  4453	
  4454	static int bpf_nvme_tcp_ops_reg(void *kdata, struct bpf_link *link)
  4455	{
  4456		struct nvme_tcp_ctrl *tctrl, *ctrl = NULL;
  4457		struct bpf_nvme_tcp_ops *ops = kdata;
  4458		const struct bpf_prog *prog = NULL;
  4459		struct nvme_tcp_exec *exec;
  4460		struct nvme_tcp_ext *ext;
  4461		unsigned long index;
  4462		int err = 0;
  4463	
> 4464		bpf_struct_ops_for_each_prog(kdata, nvme_tcp_ext_first_prog, &prog);
  4465		if (!prog)
  4466			return -EINVAL;
  4467		mutex_lock(&nvme_tcp_ctrl_mutex);
  4468		list_for_each_entry(tctrl, &nvme_tcp_ctrl_list, list) {
  4469			if (tctrl->ctrl.instance == ops->ctrl &&
  4470			    nvme_ctrl_state(&tctrl->ctrl) < NVME_CTRL_DELETING) {
  4471				ctrl = tctrl;
  4472				break;
  4473			}
  4474		}
  4475		if (!ctrl) {
  4476			err = -ENODEV;
  4477			goto unlock;
  4478		}
  4479		ext = kzalloc(struct_size(ext, execs, ctrl->nr_allocated_queues), GFP_KERNEL);
  4480		if (!ext) {
  4481			err = -ENOMEM;
  4482			goto unlock;
  4483		}
  4484		ext->ops = ops;
  4485		ext->ctrl = ctrl;
  4486		ext->prog = prog;
  4487		ext->held_max = ops->held_max ?: NVME_TCP_HELD_MAX;
  4488		ext->held_bound = msecs_to_jiffies(ops->held_ms ?: NVME_TCP_HELD_MS);
  4489		ext->nr_queues = ctrl->nr_allocated_queues;
  4490	
  4491		mutex_lock(&nvme_tcp_exec_mutex);
  4492		if (nvme_tcp_ext_locked()) {
  4493			err = -EBUSY;
  4494		} else {
  4495			nvme_get_ctrl(&ctrl->ctrl);
  4496			xa_for_each(&nvme_tcp_execs, index, exec)
  4497				if (exec->queue->ctrl == ctrl)
  4498					nvme_tcp_held_open(ext, exec);
  4499			static_call_update(nvme_tcp_ext_arrive_call, prog->bpf_func);
  4500			static_branch_inc(&nvme_tcp_ext_key);
  4501			rcu_assign_pointer(nvme_tcp_ext, ext);
  4502		}
  4503		mutex_unlock(&nvme_tcp_exec_mutex);
  4504		if (err)
  4505			kfree(ext);
  4506	unlock:
  4507		mutex_unlock(&nvme_tcp_ctrl_mutex);
  4508		return err;
  4509	}
  4510	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-11-29 12:13 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=20261129130419.OLepyQjg-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=memxor@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.