Skip to contentSkip to conversation

drivers/net/ethernet/sfc/tc_encap_actions.c:277: undefined reference to `ip_send_check'

PATCH kernel test robot 3 participants 3 messages Jun 15, 2023 Memory management

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   925294c9aa184801cc0a451b69a18dd0fe7d847d
commit: a1e82162af0b8ae9e65320ca405c6327edb99648 [8214/10326] sfc: generate encap headers for TC offload
config: riscv-buildonly-randconfig-r001-20230614 (https://download.01.org/0day-ci/archive/20230615/[email protected]/config)
compiler: riscv32-linux-gcc (GCC) 12.3.0

reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a1e82162af0b8ae9e65320ca405c6327edb99648
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout a1e82162af0b8ae9e65320ca405c6327edb99648
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=riscv olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash

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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

riscv32-linux-ld: drivers/net/ethernet/sfc/tc_encap_actions.o: in function `.L0 ':

>> drivers/net/ethernet/sfc/tc_encap_actions.c:277: undefined reference to `ip_send_check'

riscv32-linux-ld: drivers/net/ethernet/sfc/tc_encap_actions.o: in function `.L0 ':
include/linux/rhashtable.h:648: undefined reference to `arp_tbl'
riscv32-linux-ld: drivers/net/ethernet/sfc/tc_encap_actions.o: in function `.L0 ':
drivers/net/ethernet/sfc/tc_encap_actions.c:135: undefined reference to `ip_route_output_flow'

vim +277 drivers/net/ethernet/sfc/tc_encap_actions.c

261
262 static void efx_gen_tun_header_ipv4(struct efx_tc_encap_action *encap, u8 ipproto, u8 len)
263 {
264 struct efx_neigh_binder *neigh = encap->neigh;
265 struct ip_tunnel_key *key = &encap->key;
266 struct iphdr *ip;
267
268 ip = (struct iphdr *)(encap->encap_hdr + encap->encap_hdr_len);
269 encap->encap_hdr_len += sizeof(*ip);
270
271 ip->daddr = key->u.ipv4.dst;
272 ip->saddr = key->u.ipv4.src;
273 ip->ttl = neigh->ttl;
274 ip->protocol = ipproto;
275 ip->version = 0x4;
276 ip->ihl = 0x5;

 > 277		ip->tot_len = cpu_to_be16(ip->ihl * 4 + len);

278 ip_send_check(ip);
279 }
280

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 1 line · kernel test robot

config: riscv-buildonly-randconfig-r001-20230614 (https://download.01.org/0day-ci/archive/20230615/[email protected]/config)

This has:
# CONFIG_INET is not set

Quoted 8 lines

All errors (new ones prefixed by >>):

riscv32-linux-ld: drivers/net/ethernet/sfc/tc_encap_actions.o: in function `.L0 ':

Quoted 1 line
Quoted 1 line

drivers/net/ethernet/sfc/tc_encap_actions.c:277: undefined reference to `ip_send_check'

riscv32-linux-ld: drivers/net/ethernet/sfc/tc_encap_actions.o: in function `.L0 ':
include/linux/rhashtable.h:648: undefined reference to `arp_tbl'
riscv32-linux-ld: drivers/net/ethernet/sfc/tc_encap_actions.o: in function `.L0 ':
drivers/net/ethernet/sfc/tc_encap_actions.c:135: undefined reference to `ip_route_output_flow'

From which these errors follow, since these symbols are in net/ipv4/*.o. Not sure whether to put ifdefs in tc_encap_actions.c, or just make
CONFIG_SFC[_SRIOV?] depend on (or select?) CONFIG_INET. Because is there really a use case for putting an sfc NIC in a box without IP?

-ed

#2 lore raw
Quoted 4 lines · On Thu, 15 Jun 2023 15:44:14 +0100 Edward Cree wrote:

From which these errors follow, since these symbols are in net/ipv4/*.o. Not sure whether to put ifdefs in tc_encap_actions.c, or just make
CONFIG_SFC[_SRIOV?] depend on (or select?) CONFIG_INET. Because is there really a use case for putting an sfc NIC in a box without IP?

dependency on INET SGTM, FWIW.