]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix selftests build with old system-wide headers
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 17 Jun 2021 04:14:46 +0000 (21:14 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Jun 2021 11:05:10 +0000 (13:05 +0200)
commit7c0f083a874fc77ddf60a2d9ba76f9d93b68826e
treed313e444e47989bbd52b5d0b7b125df069cb111c
parentd777805019fdd2c5444445a50c16fb066e0a82ef
selftests/bpf: Fix selftests build with old system-wide headers

migrate_reuseport.c selftest relies on having TCP_FASTOPEN_CONNECT defined in
system-wide netinet/tcp.h. Selftests can use up-to-date uapi/linux/tcp.h, but
that one doesn't have SOL_TCP. So instead of switching everything to uapi
header, add #define for TCP_FASTOPEN_CONNECT to fix the build.

Fixes: b867c191e695 ("bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Link: https://lore.kernel.org/bpf/20210617041446.425283-1-andrii@kernel.org
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c