net/core/filter.c:11639:17: error: no previous declaration for 'bpf_dynptr_from_skb'
From: kernel test robot
Date:  Thu Sep 07 2023 - 20:35:50 EST
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   ff6e6ded54725cd01623b9a1a86b74a523198733
commit: b5964b968ac64c2ec2debee7518499113b27c34e bpf: Add skb dynptrs
date:   6 months ago
config: x86_64-sof-customedconfig-avs-defconfig (https://download.01.org/0day-ci/archive/20230908/202309080849.4yWoDkBk-lkp@xxxxxxxxx/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230908/202309080849.4yWoDkBk-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309080849.4yWoDkBk-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
>> net/core/filter.c:11639:17: error: no previous declaration for 'bpf_dynptr_from_skb' [-Werror=missing-declarations]
    __bpf_kfunc int bpf_dynptr_from_skb(struct sk_buff *skb, u64 flags,
                    ^~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors
vim +/bpf_dynptr_from_skb +11639 net/core/filter.c
 11635	
 11636	__diag_push();
 11637	__diag_ignore_all("-Wmissing-prototypes",
 11638			  "Global functions as their definitions will be in vmlinux BTF");
 11639	__bpf_kfunc int bpf_dynptr_from_skb(struct sk_buff *skb, u64 flags,
 11640					    struct bpf_dynptr_kern *ptr__uninit)
 11641	{
 11642		if (flags) {
 11643			bpf_dynptr_set_null(ptr__uninit);
 11644			return -EINVAL;
 11645		}
 11646	
 11647		bpf_dynptr_init(ptr__uninit, skb, BPF_DYNPTR_TYPE_SKB, 0, skb->len);
 11648	
 11649		return 0;
 11650	}
 11651	__diag_pop();
 11652	
-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki