Netdev List
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@google.com>
To: Eric Dumazet <edumazet@kernel.org>,
	Neal Cardwell <ncardwell@google.com>,
	 Daniel Zahka <daniel.zahka@gmail.com>,
	Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	 "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: David Ahern <dsahern@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>,
	 Simon Horman <horms@kernel.org>,
	Thaison Phan <thaisonphan@google.com>,
	 Kuniyuki Iwashima <kuniyu@google.com>,
	Kuniyuki Iwashima <kuni1840@gmail.com>,
	netdev@vger.kernel.org
Subject: [PATCH v1 net-next 0/2] tcp: Let non-PSP and PSP share mtu and advmss.
Date: Tue,  3 Nov 2026 00:06:01 +0000	[thread overview]
Message-ID: <20261103000712.658501-1-kuniyu@google.com> (raw)

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


             reply	other threads:[~2026-11-03  0:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  0:06 Kuniyuki Iwashima [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261103000712.658501-1-kuniyu@google.com \
    --to=kuniyu@google.com \
    --cc=daniel.zahka@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=kuni1840@gmail.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thaisonphan@google.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox