* [PATCH bpf-next] selftests/bpf: fix selftests build with old system-wide headers
@ 2021-06-17 4:14 Andrii Nakryiko
2021-06-17 4:38 ` Kuniyuki Iwashima
2021-06-17 11:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Andrii Nakryiko @ 2021-06-17 4:14 UTC (permalink / raw)
To: bpf, netdev, ast, daniel; +Cc: andrii, kernel-team, Kuniyuki Iwashima
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.
Cc: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Fixes: c9d0bdef89a6 ("bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
---
tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c b/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c
index 0fa3f750567d..59adb4715394 100644
--- a/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c
+++ b/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c
@@ -30,6 +30,10 @@
#include "test_migrate_reuseport.skel.h"
#include "network_helpers.h"
+#ifndef TCP_FASTOPEN_CONNECT
+#define TCP_FASTOPEN_CONNECT 30
+#endif
+
#define IFINDEX_LO 1
#define NR_SERVERS 5
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: fix selftests build with old system-wide headers
2021-06-17 4:14 [PATCH bpf-next] selftests/bpf: fix selftests build with old system-wide headers Andrii Nakryiko
@ 2021-06-17 4:38 ` Kuniyuki Iwashima
2021-06-17 11:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Kuniyuki Iwashima @ 2021-06-17 4:38 UTC (permalink / raw)
To: andrii; +Cc: ast, bpf, daniel, kernel-team, kuniyu, netdev
From: Andrii Nakryiko <andrii@kernel.org>
Date: Wed, 16 Jun 2021 21:14:46 -0700
> 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.
Acked-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: fix selftests build with old system-wide headers
2021-06-17 4:14 [PATCH bpf-next] selftests/bpf: fix selftests build with old system-wide headers Andrii Nakryiko
2021-06-17 4:38 ` Kuniyuki Iwashima
@ 2021-06-17 11:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-17 11:10 UTC (permalink / raw)
To: Andrii Nakryiko; +Cc: bpf, netdev, ast, daniel, kernel-team, kuniyu
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Wed, 16 Jun 2021 21:14:46 -0700 you wrote:
> 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.
>
> Cc: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
> Fixes: c9d0bdef89a6 ("bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.")
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
>
> [...]
Here is the summary with links:
- [bpf-next] selftests/bpf: fix selftests build with old system-wide headers
https://git.kernel.org/bpf/bpf-next/c/f20792d425d2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-17 11:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 4:14 [PATCH bpf-next] selftests/bpf: fix selftests build with old system-wide headers Andrii Nakryiko
2021-06-17 4:38 ` Kuniyuki Iwashima
2021-06-17 11:10 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.