]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mptcp: introduce mptcp-level backlog
authorPaolo Abeni <pabeni@redhat.com>
Fri, 21 Nov 2025 17:02:12 +0000 (18:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Nov 2025 03:49:43 +0000 (19:49 -0800)
commitee458a3f314e9c669ddd227bf5ab08354d9e75cc
treed13c273353e0751d1e9de5f0868f13f5b6f07416
parent9db5b3cec4ec1c0cd3239689f5c8653d691a1754
mptcp: introduce mptcp-level backlog

We are soon using it for incoming data processing.
MPTCP can't leverage the sk_backlog, as the latter is processed
before the release callback, and such callback for MPTCP releases
and re-acquire the socket spinlock, breaking the sk_backlog processing
assumption.

Add a skb backlog list inside the mptcp sock struct, and implement
basic helper to transfer packet to and purge such list.

Packets in the backlog are memory accounted and still use the incoming
subflow receive memory, to allow back-pressure. The backlog size is
implicitly bounded to the sum of subflows rcvbuf.

When a subflow is closed, references from the backlog to such sock
are removed.

No packet is currently added to the backlog, so no functional changes
intended here.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20251121-net-next-mptcp-memcg-backlog-imp-v1-13-1f34b6c1e0b1@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/mptcp_diag.c
net/mptcp/protocol.c
net/mptcp/protocol.h