Hi Lorenzo, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: b229b6ca5abbd63ff40c1396095b1b36b18139c3 commit: b06b45e82b59b69f5ac6b3916ac5dbd0294efc95 selftests/bpf: add tests for bpf_ct_set_nat_info kfunc date: 5 weeks ago compiler: gcc-11 (Debian 11.3.0-8) 11.3.0 reproduce: # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b06b45e82b59b69f5ac6b3916ac5dbd0294efc95 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout b06b45e82b59b69f5ac6b3916ac5dbd0294efc95 make O=/tmp/kselftest headers make O=/tmp/kselftest -C tools/testing/selftests If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): >> progs/test_bpf_nf.c:60:49: error: declaration of 'union nf_inet_addr' will not be visible outside of this function [-Werror,-Wvisibility] int bpf_ct_set_nat_info(struct nf_conn *, union nf_inet_addr *, ^ >> progs/test_bpf_nf.c:61:19: error: declaration of 'enum nf_nat_manip_type' will not be visible outside of this function [-Werror,-Wvisibility] int port, enum nf_nat_manip_type) __ksym; ^ >> progs/test_bpf_nf.c:151:22: error: variable has incomplete type 'union nf_inet_addr' union nf_inet_addr saddr = {}; ^ progs/test_bpf_nf.c:151:9: note: forward declaration of 'union nf_inet_addr' union nf_inet_addr saddr = {}; ^ progs/test_bpf_nf.c:152:22: error: variable has incomplete type 'union nf_inet_addr' union nf_inet_addr daddr = {}; ^ progs/test_bpf_nf.c:151:9: note: forward declaration of 'union nf_inet_addr' union nf_inet_addr saddr = {}; ^ progs/test_bpf_nf.c:156:5: error: incomplete definition of type 'struct nf_conn' ct->mark = 77; ~~^ progs/test_bpf_nf.c:37:8: note: forward declaration of 'struct nf_conn' struct nf_conn; ^ >> progs/test_bpf_nf.c:160:42: error: use of undeclared identifier 'NF_NAT_MANIP_SRC' bpf_ct_set_nat_info(ct, &saddr, sport, NF_NAT_MANIP_SRC); ^ >> progs/test_bpf_nf.c:163:42: error: use of undeclared identifier 'NF_NAT_MANIP_DST' bpf_ct_set_nat_info(ct, &daddr, dport, NF_NAT_MANIP_DST); ^ progs/test_bpf_nf.c:175:19: error: incomplete definition of type 'struct nf_conn' tuple = &ct_lk->tuplehash[IP_CT_DIR_REPLY].tuple; ~~~~~^ progs/test_bpf_nf.c:37:8: note: forward declaration of 'struct nf_conn' struct nf_conn; ^ >> progs/test_bpf_nf.c:175:31: error: use of undeclared identifier 'IP_CT_DIR_REPLY' tuple = &ct_lk->tuplehash[IP_CT_DIR_REPLY].tuple; ^ >> progs/test_bpf_nf.c:176:14: error: incomplete definition of type 'struct nf_conntrack_tuple' if (tuple->dst.u3.ip == saddr.ip && ~~~~~^ progs/test_bpf_nf.c:172:12: note: forward declaration of 'struct nf_conntrack_tuple' struct nf_conntrack_tuple *tuple; ^ progs/test_bpf_nf.c:177:14: error: incomplete definition of type 'struct nf_conntrack_tuple' tuple->dst.u.all == bpf_htons(sport)) ~~~~~^ progs/test_bpf_nf.c:172:12: note: forward declaration of 'struct nf_conntrack_tuple' struct nf_conntrack_tuple *tuple; ^ progs/test_bpf_nf.c:179:14: error: incomplete definition of type 'struct nf_conntrack_tuple' if (tuple->src.u3.ip == daddr.ip && ~~~~~^ progs/test_bpf_nf.c:172:12: note: forward declaration of 'struct nf_conntrack_tuple' struct nf_conntrack_tuple *tuple; ^ progs/test_bpf_nf.c:180:14: error: incomplete definition of type 'struct nf_conntrack_tuple' tuple->src.u.all == bpf_htons(dport)) ~~~~~^ progs/test_bpf_nf.c:172:12: note: forward declaration of 'struct nf_conntrack_tuple' struct nf_conntrack_tuple *tuple; ^ progs/test_bpf_nf.c:185:31: error: incomplete definition of type 'struct nf_conn' test_delta_timeout = ct_lk->timeout - bpf_jiffies64(); ~~~~~^ progs/test_bpf_nf.c:37:8: note: forward declaration of 'struct nf_conn' struct nf_conn; ^ progs/test_bpf_nf.c:187:36: error: incomplete definition of type 'struct nf_conn' test_insert_lookup_mark = ct_lk->mark; ~~~~~^ progs/test_bpf_nf.c:37:8: note: forward declaration of 'struct nf_conn' struct nf_conn; ^ progs/test_bpf_nf.c:189:12: error: use of undeclared identifier 'IPS_CONFIRMED' IPS_CONFIRMED | IPS_SEEN_REPLY); ^ progs/test_bpf_nf.c:189:28: error: use of undeclared identifier 'IPS_SEEN_REPLY' IPS_CONFIRMED | IPS_SEEN_REPLY); ^ progs/test_bpf_nf.c:190:24: error: incomplete definition of type 'struct nf_conn' test_status = ct_lk->status; ~~~~~^ progs/test_bpf_nf.c:37:8: note: forward declaration of 'struct nf_conn' struct nf_conn; ^ progs/test_bpf_nf.c:209:9: error: incomplete definition of type 'struct nf_conn' if (ct->mark == 42) { ~~^ progs/test_bpf_nf.c:37:8: note: forward declaration of 'struct nf_conn' struct nf_conn; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. -- 0-DAY CI Kernel Test Service https://01.org/lkp