bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB
       [not found] ` <20250513193919.1089692-12-edumazet@google.com>
@ 2025-05-14 20:24   ` Jakub Kicinski
  2025-05-14 20:53     ` Kuniyuki Iwashima
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2025-05-14 20:24 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: Eric Dumazet, David S . Miller, Paolo Abeni, Neal Cardwell,
	Simon Horman, Rick Jones, Wei Wang, netdev, eric.dumazet, bpf

On Tue, 13 May 2025 19:39:19 +0000 Eric Dumazet wrote:
> Last change to tcp_rmem[2] happened in 2012, in commit b49960a05e32
> ("tcp: change tcp_adv_win_scale and tcp_rmem[2]")
> 
> TCP performance on WAN is mostly limited by tcp_rmem[2] for receivers.
> 
> After this series improvements, it is time to increase the default.

I think this breaks the BPF syncookie test, Kuniyuki any idea why?

https://github.com/kernel-patches/bpf/actions/runs/15016644781/job/42196471693

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB
  2025-05-14 20:24   ` [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB Jakub Kicinski
@ 2025-05-14 20:53     ` Kuniyuki Iwashima
  2025-05-14 21:20       ` Kuniyuki Iwashima
  0 siblings, 1 reply; 5+ messages in thread
From: Kuniyuki Iwashima @ 2025-05-14 20:53 UTC (permalink / raw)
  To: kuba
  Cc: bpf, davem, edumazet, eric.dumazet, horms, jonesrick, kuniyu,
	ncardwell, netdev, pabeni, weiwan

From: Jakub Kicinski <kuba@kernel.org>
Date: Wed, 14 May 2025 13:24:22 -0700
> On Tue, 13 May 2025 19:39:19 +0000 Eric Dumazet wrote:
> > Last change to tcp_rmem[2] happened in 2012, in commit b49960a05e32
> > ("tcp: change tcp_adv_win_scale and tcp_rmem[2]")
> > 
> > TCP performance on WAN is mostly limited by tcp_rmem[2] for receivers.
> > 
> > After this series improvements, it is time to increase the default.
> 
> I think this breaks the BPF syncookie test, Kuniyuki any idea why?
> 
> https://github.com/kernel-patches/bpf/actions/runs/15016644781/job/42196471693

It seems ACK was not handled by BPF at tc hook on lo.

ACK was not sent or tcp_load_headers() failed to parse it ?
both sounds unlikely though.

Will try to reproduce it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB
  2025-05-14 20:53     ` Kuniyuki Iwashima
@ 2025-05-14 21:20       ` Kuniyuki Iwashima
  2025-05-14 21:26         ` Jakub Kicinski
  0 siblings, 1 reply; 5+ messages in thread
From: Kuniyuki Iwashima @ 2025-05-14 21:20 UTC (permalink / raw)
  To: kuniyu
  Cc: bpf, davem, edumazet, eric.dumazet, horms, jonesrick, kuba,
	ncardwell, netdev, pabeni, weiwan

From: Kuniyuki Iwashima <kuniyu@amazon.com>
Date: Wed, 14 May 2025 13:53:39 -0700
> From: Jakub Kicinski <kuba@kernel.org>
> Date: Wed, 14 May 2025 13:24:22 -0700
> > On Tue, 13 May 2025 19:39:19 +0000 Eric Dumazet wrote:
> > > Last change to tcp_rmem[2] happened in 2012, in commit b49960a05e32
> > > ("tcp: change tcp_adv_win_scale and tcp_rmem[2]")
> > > 
> > > TCP performance on WAN is mostly limited by tcp_rmem[2] for receivers.
> > > 
> > > After this series improvements, it is time to increase the default.
> > 
> > I think this breaks the BPF syncookie test, Kuniyuki any idea why?
> > 
> > https://github.com/kernel-patches/bpf/actions/runs/15016644781/job/42196471693
> 
> It seems ACK was not handled by BPF at tc hook on lo.
> 
> ACK was not sent or tcp_load_headers() failed to parse it ?
> both sounds unlikely though.
> 
> Will try to reproduce it.

I hard-coded the expected TCPOPT_WINDOW to be 7, and this
series bumps it to 10, so SYN was dropped as invalid.

This fixes the failure, and I think it's not a blocker.

---8<---
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)
---8<---

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB
  2025-05-14 21:20       ` Kuniyuki Iwashima
@ 2025-05-14 21:26         ` Jakub Kicinski
  2025-05-14 21:28           ` Kuniyuki Iwashima
  0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2025-05-14 21:26 UTC (permalink / raw)
  To: Kuniyuki Iwashima
  Cc: bpf, davem, edumazet, eric.dumazet, horms, jonesrick, ncardwell,
	netdev, pabeni, weiwan

On Wed, 14 May 2025 14:20:05 -0700 Kuniyuki Iwashima wrote:
> > It seems ACK was not handled by BPF at tc hook on lo.
> > 
> > ACK was not sent or tcp_load_headers() failed to parse it ?
> > both sounds unlikely though.
> > 
> > Will try to reproduce it.  
> 
> I hard-coded the expected TCPOPT_WINDOW to be 7, and this
> series bumps it to 10, so SYN was dropped as invalid.
> 
> This fixes the failure, and I think it's not a blocker.
> 
> ---8<---
> 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)

Awesome, could you submit officially? As soon as your fix is in
patchwork I can return Eric's series into the testing branch.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB
  2025-05-14 21:26         ` Jakub Kicinski
@ 2025-05-14 21:28           ` Kuniyuki Iwashima
  0 siblings, 0 replies; 5+ messages in thread
From: Kuniyuki Iwashima @ 2025-05-14 21:28 UTC (permalink / raw)
  To: kuba
  Cc: bpf, davem, edumazet, eric.dumazet, horms, jonesrick, kuniyu,
	ncardwell, netdev, pabeni, weiwan

From: Jakub Kicinski <kuba@kernel.org>
Date: Wed, 14 May 2025 14:26:20 -0700
> On Wed, 14 May 2025 14:20:05 -0700 Kuniyuki Iwashima wrote:
> > > It seems ACK was not handled by BPF at tc hook on lo.
> > > 
> > > ACK was not sent or tcp_load_headers() failed to parse it ?
> > > both sounds unlikely though.
> > > 
> > > Will try to reproduce it.  
> > 
> > I hard-coded the expected TCPOPT_WINDOW to be 7, and this
> > series bumps it to 10, so SYN was dropped as invalid.
> > 
> > This fixes the failure, and I think it's not a blocker.
> > 
> > ---8<---
> > 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)
> 
> Awesome, could you submit officially? As soon as your fix is in
> patchwork I can return Eric's series into the testing branch.

For sure, will post a patch shortly.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-05-14 21:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250513193919.1089692-1-edumazet@google.com>
     [not found] ` <20250513193919.1089692-12-edumazet@google.com>
2025-05-14 20:24   ` [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB Jakub Kicinski
2025-05-14 20:53     ` Kuniyuki Iwashima
2025-05-14 21:20       ` Kuniyuki Iwashima
2025-05-14 21:26         ` Jakub Kicinski
2025-05-14 21:28           ` Kuniyuki Iwashima

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).