Skip to content

tcp: Let non-PSP and PSP share mtu and advmss.

Kuniyuki Iwashima netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2psp: Check pas->tx.spi in psp_sk_overhead().include/net/psp/functions.h+2 -22 repliesApplied
2/2tcp: Subtract psp_sk_overhead() in __tcp_mtu_to_mss() and tcp_mss_to_mtu().net/ipv4/tcp_output.c net/ipv6/ipv6_sockglue.c net/psp/psp_sock.c+10 -82 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDaniel ZahkaWillem de Bruijn
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 net-next 0/2] tcp: Let non-PSP and PSP share mtu and advmss.

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(-)
Signature · 1 line
2.56.0.385.gac671c819a-goog