Let's set libbpf 1.0 API mode explicitly, then we can get rid of the included bpf_rlimit.h.
Signed-off-by: Yafang Shao laoar.shao@gmail.com --- tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c b/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c index b9e991d43155..b57f3f0467e5 100644 --- a/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c +++ b/tools/testing/selftests/bpf/test_tcp_check_syncookie_user.c @@ -15,7 +15,6 @@ #include <bpf/bpf.h> #include <bpf/libbpf.h>
-#include "bpf_rlimit.h" #include "cgroup_helpers.h"
static int start_server(const struct sockaddr *addr, socklen_t len) @@ -214,6 +213,9 @@ int main(int argc, char **argv) exit(1); }
+ /* Use libbpf 1.0 API mode */ + libbpf_set_strict_mode(LIBBPF_STRICT_ALL); + results = get_map_fd_by_prog_id(atoi(argv[1]), &xdp); if (results < 0) { log_err("Can't get map");