* [PATCH v1 bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
@ 2025-05-14 21:40 Kuniyuki Iwashima
2025-05-14 22:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 4+ messages in thread
From: Kuniyuki Iwashima @ 2025-05-14 21:40 UTC (permalink / raw)
To: Andrii Nakryiko, Eduard Zingerman
Cc: Mykola Lysenko, Martin KaFai Lau, Eric Dumazet, Jakub Kicinski,
Kuniyuki Iwashima, Kuniyuki Iwashima, bpf, netdev
The custom syncookie test expects TCPOPT_WINDOW to be 7 based on the
kernel’s behaviour at the time, but the upcoming series [0] will bump
it to 10.
Let's relax the test to allow any valid TCPOPT_WINDOW value in the
range 1–14.
Link: https://lore.kernel.org/netdev/20250513193919.1089692-1-edumazet@google.com/ #[0]
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c b/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
index eb5cca1fce16..7d5293de1952 100644
--- a/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
+++ b/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
@@ -294,7 +294,9 @@ static int tcp_validate_sysctl(struct tcp_syncookie *ctx)
(ctx->ipv6 && ctx->attrs.mss != MSS_LOCAL_IPV6))
goto err;
- if (!ctx->attrs.wscale_ok || ctx->attrs.snd_wscale != 7)
+ if (!ctx->attrs.wscale_ok ||
+ !ctx->attrs.snd_wscale ||
+ ctx->attrs.snd_wscale >= BPF_SYNCOOKIE_WSCALE_MASK)
goto err;
if (!ctx->attrs.tstamp_ok)
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
2025-05-14 21:40 [PATCH v1 bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c Kuniyuki Iwashima
@ 2025-05-14 22:40 ` patchwork-bot+netdevbpf
2025-05-15 17:36 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-14 22:40 UTC (permalink / raw)
To: Kuniyuki Iwashima
Cc: andrii, eddyz87, mykolal, martin.lau, edumazet, kuba, kuni1840,
bpf, netdev
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Martin KaFai Lau <martin.lau@kernel.org>:
On Wed, 14 May 2025 14:40:20 -0700 you wrote:
> The custom syncookie test expects TCPOPT_WINDOW to be 7 based on the
> kernel’s behaviour at the time, but the upcoming series [0] will bump
> it to 10.
>
> Let's relax the test to allow any valid TCPOPT_WINDOW value in the
> range 1–14.
>
> [...]
Here is the summary with links:
- [v1,bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
https://git.kernel.org/bpf/bpf-next/c/4dd372de3fde
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] 4+ messages in thread
* Re: [PATCH v1 bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
2025-05-14 22:40 ` patchwork-bot+netdevbpf
@ 2025-05-15 17:36 ` Jakub Kicinski
2025-05-15 18:31 ` Jakub Kicinski
0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2025-05-15 17:36 UTC (permalink / raw)
To: patchwork-bot+netdevbpf
Cc: Kuniyuki Iwashima, andrii, eddyz87, mykolal, martin.lau, edumazet,
kuni1840, bpf, netdev
On Wed, 14 May 2025 22:40:31 +0000 patchwork-bot+netdevbpf@kernel.org
wrote:
> Here is the summary with links:
> - [v1,bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
> https://git.kernel.org/bpf/bpf-next/c/4dd372de3fde
Per the link in the commit description we need this in net-next :(
Did it land in the non-network BPF tree? Or on the network branch?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
2025-05-15 17:36 ` Jakub Kicinski
@ 2025-05-15 18:31 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2025-05-15 18:31 UTC (permalink / raw)
To: patchwork-bot+netdevbpf
Cc: Kuniyuki Iwashima, andrii, eddyz87, mykolal, martin.lau, edumazet,
kuni1840, bpf, netdev
On Thu, 15 May 2025 10:36:42 -0700 Jakub Kicinski wrote:
> On Wed, 14 May 2025 22:40:31 +0000 patchwork-bot+netdevbpf@kernel.org
> wrote:
> > Here is the summary with links:
> > - [v1,bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
> > https://git.kernel.org/bpf/bpf-next/c/4dd372de3fde
>
> Per the link in the commit description we need this in net-next :(
> Did it land in the non-network BPF tree? Or on the network branch?
Martin pointed out off list that the CI flow merges in bpf-next
so it won't matter, all good.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-15 18:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 21:40 [PATCH v1 bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c Kuniyuki Iwashima
2025-05-14 22:40 ` patchwork-bot+netdevbpf
2025-05-15 17:36 ` Jakub Kicinski
2025-05-15 18:31 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).