Netdev List
 help / color / mirror / Atom feed
* [PATCH v1 net-next 0/2] tcp: Let non-PSP and PSP share mtu and advmss.
@ 2026-11-03  0:06 Kuniyuki Iwashima
  2026-11-03  0:06 ` [PATCH v1 net-next 1/2] psp: Check pas->tx.spi in psp_sk_overhead() Kuniyuki Iwashima
  2026-11-03  0:06 ` [PATCH v1 net-next 2/2] tcp: Subtract psp_sk_overhead() in __tcp_mtu_to_mss() and tcp_mss_to_mtu() Kuniyuki Iwashima
  0 siblings, 2 replies; 5+ messages in thread
From: Kuniyuki Iwashima @ 2026-11-03  0:06 UTC (permalink / raw)
  To: Eric Dumazet, Neal Cardwell, Daniel Zahka, Willem de Bruijn,
	David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: David Ahern, Ido Schimmel, Simon Horman, Thaison Phan,
	Kuniyuki Iwashima, Kuniyuki Iwashima, netdev

Since psp_sk_overhead() is added to icsk->icsk_ext_hdr_len,
which is subtracted after clamping in __tcp_mtu_to_mss(),
it is impossible to configure a route that both PSP and
non-PSP achieve 4K MSS for TCP_ZEROCOPY_RECEIVE.

  mtu 4220 advmss 4108
  -> non-PSP gets 4K MSS, but PSP gets 4056, breaking
     TCP_ZEROCOPY_RECEIVE

  mtu 4220 advmss 4148
  -> PSP gets 4K MSS, but non-PSP gets 4136, spilling over
     4K and also breaking TCP_ZEROCOPY_RECEIVE

This series subtracts the PSP overhead before clamping to
let both flows share the same mtu and advmss to get 4K MSS.

Google's original PSP implementation has been doing that for
years to allow both flows to coexist on the same machine.


Kuniyuki Iwashima (2):
  psp: Check pas->tx.spi in psp_sk_overhead().
  tcp: Subtract psp_sk_overhead() in __tcp_mtu_to_mss() and
    tcp_mss_to_mtu().

 include/net/psp/functions.h |  4 ++--
 net/ipv4/tcp_output.c       | 14 +++++++++-----
 net/ipv6/ipv6_sockglue.c    |  2 --
 net/psp/psp_sock.c          |  2 +-
 4 files changed, 12 insertions(+), 10 deletions(-)

-- 
2.56.0.385.gac671c819a-goog


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

end of thread, other threads:[~2026-11-04 16:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03  0:06 [PATCH v1 net-next 0/2] tcp: Let non-PSP and PSP share mtu and advmss Kuniyuki Iwashima
2026-11-03  0:06 ` [PATCH v1 net-next 1/2] psp: Check pas->tx.spi in psp_sk_overhead() Kuniyuki Iwashima
2026-11-04 15:17   ` Daniel Zahka
2026-11-03  0:06 ` [PATCH v1 net-next 2/2] tcp: Subtract psp_sk_overhead() in __tcp_mtu_to_mss() and tcp_mss_to_mtu() Kuniyuki Iwashima
2026-11-04 16:42   ` Daniel Zahka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox