]> git.hungrycats.org Git - linux/commit
selftests/bpf: Rename fallback in bpf_dctcp to avoid naming conflict
authorPu Lehui <pulehui@huawei.com>
Thu, 5 Sep 2024 08:13:53 +0000 (08:13 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 5 Sep 2024 20:13:39 +0000 (13:13 -0700)
commita48a43884cdd46dba8cc4a15160c116ffd965800
tree2f742246c0cfe860de2bb47eecf7ea9adcd48c80
parentdc3a8804d790cc7dda442e5504a0c67435b356f4
selftests/bpf: Rename fallback in bpf_dctcp to avoid naming conflict

Recently, when compiling bpf selftests on RV64, the following
compilation failure occurred:

progs/bpf_dctcp.c:29:21: error: redefinition of 'fallback' as different kind of symbol
   29 | volatile const char fallback[TCP_CA_NAME_MAX];
      |                     ^
/workspace/tools/testing/selftests/bpf/tools/include/vmlinux.h:86812:15: note: previous definition is here
 86812 | typedef u32 (*fallback)(u32, const unsigned char *, size_t);

The reason is that the `fallback` symbol has been defined in
arch/riscv/lib/crc32.c, which will cause symbol conflicts when vmlinux.h
is included in bpf_dctcp. Let we rename `fallback` string to
`fallback_cc` in bpf_dctcp to fix this compilation failure.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20240905081401.1894789-3-pulehui@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
tools/testing/selftests/bpf/progs/bpf_dctcp.c