Re: [PATCH v5 bpf-next 3/7] udp: seq_file: Helper function to match socket attributes

kernel test robot
2023-03-30T18:41:57Z

Hi Aditi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]

url: https://github.com/intel-lab-lkp/linux/commits/Aditi-Ghag/bpf-tcp-Avoid-taking-fast-sock-lock-in-iterator/20230330-232137
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link: https://lore.kernel.org/r/20230330151758.531170-4-aditi.ghag%40isovalent.com
patch subject: [PATCH v5 bpf-next 3/7] udp: seq_file: Helper function to match socket attributes
config: nios2-defconfig (https://download.01.org/0day-ci/archive/20230331/202303310212.8DXGg50J-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 12.1.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/intel-lab-lkp/linux/commit/66cc617bebf6cb3d2162587d6e248d86bc59c1c2
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Aditi-Ghag/bpf-tcp-Avoid-taking-fast-sock-lock-in-iterator/20230330-232137
git checkout 66cc617bebf6cb3d2162587d6e248d86bc59c1c2
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=nios2 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303310212.8DXGg50J-lkp@intel.com/

All errors (new ones prefixed by >>):

nios2-linux-ld: net/ipv4/udp.o: in function `udp_get_first':
>> net/ipv4/udp.c:3015: undefined reference to `seq_sk_match'
net/ipv4/udp.c:3015:(.text+0x4a8): relocation truncated to fit: R_NIOS2_CALL26 against `seq_sk_match'
nios2-linux-ld: net/ipv4/udp.o: in function `udp_get_next':
net/ipv4/udp.c:3036: undefined reference to `seq_sk_match'
net/ipv4/udp.c:3036:(.text+0x55c): relocation truncated to fit: R_NIOS2_CALL26 against `seq_sk_match'

vim +3015 net/ipv4/udp.c

2993
2994 static struct sock *udp_get_first(struct seq_file *seq, int start)
2995 {
2996 struct udp_iter_state *state = seq->private;
2997 struct net *net = seq_file_net(seq);
2998 struct udp_seq_afinfo *afinfo;
2999 struct udp_table *udptable;
3000 struct sock *sk;
3001
3002 afinfo = pde_data(file_inode(seq->file));
3003
3004 udptable = udp_get_table_afinfo(afinfo, net);
3005
3006 for (state->bucket = start; state->bucket <= udptable->mask;
3007 ++state->bucket) {
3008 struct udp_hslot *hslot = &udptable->hash[state->bucket];
3009
3010 if (hlist_empty(&hslot->head))
3011 continue;
3012
3013 spin_lock_bh(&hslot->lock);
3014 sk_for_each(sk, &hslot->head) {
> 3015 if (seq_sk_match(seq, sk))
3016 goto found;
3017 }
3018 spin_unlock_bh(&hslot->lock);
3019 }
3020 sk = NULL;
3021 found:
3022 return sk;
3023 }
3024

--
0-DAY CI Kernel Test Service