Hi Paolo,
Thanks for this v4.
On Fri, 2025-10-03 at 16:01 +0200, Paolo Abeni wrote:
> This series includes RX path improvement built around backlog
> processing
>
> The main goals are improving the RX performances _and_ increase the
> long term maintainability.
>
> Patches 1-3 prepare the stack for backlog processing, removing
> assumptions that will not hold true anymore after backlog
> introduction.
>
> Patch 4 fixes a long standing issue which is quite hard to reproduce
> with the current implementation but will become very apparent with
> backlog usage.
>
> Patches 5 and 6 are more cleanups that will make the backlog patch a
> little less huge.
>
> Patch 7 is a somewhat unrelated cleanup, included here before I
> forgot
> about it.
>
> The real work is done by patch 8. There are significant changes vs
> the
> previous iteration, as it turned out we can't uset the sk_backlog, as
> the mptcp release callback can also release and re-acquire the msk-
> level
> spinlock and core backlog processing works under the assumption that
> such event is not possible.
>
> Other relevant points are:
> - skbs in the backlog are _not_ accounted. TCP does the same, and we
> can't update the fwd mem while enqueuing to the backlog as the
> caller
> does not own the msk-level socket lock nor can acquire it.
> - skbs in the backlog still use the incoming ssk rmem. This allows
> backpressure and implicitly prevent excessive memory usage for the
> backlog itself
> - [this is possibly the most critical point]: when the msk rx buf is
> full, we don't add more packets there even when the caller owns the
> msk socket lock. Instead packets are added to the backlog. Note
> that
> the amount of memory used there is still limited by the above. Also
> note that this implicitly means that such packets could stage in
> the
> backlog until the receiver flushes the rx buffer - an unbound
> amount
> of time. That is not supposed to happen for the backlog, ence the
> criticality here.
>
> This survived a few hours of selftest iterations in a loop: should
> address all functional issues observed in previous iterations (and
> possibly includes different ones ;)
This set looks good to me!
Reviewed-by: Geliang Tang <geliang@kernel.org>
Thanks,
-Geliang
>
> Paolo Abeni (8):
> mptcp: borrow forward memory from subflow
> mptcp: cleanup fallback data fin reception
> mptcp: cleanup fallback dummy mapping generation
> mptcp: fix MSG_PEEK stream corruption
> mptcp: ensure the kernel PM does not take action too late
> mptcp: do not miss early first subflow close event notification.
> mptcp: make mptcp_destroy_common() static
> mptcp: leverage the backlog for RX packet processing
>
> net/mptcp/pm.c | 4 +-
> net/mptcp/pm_kernel.c | 2 +
> net/mptcp/protocol.c | 306 +++++++++++++++++++++++++++-------------
> --
> net/mptcp/protocol.h | 7 +-
> net/mptcp/subflow.c | 12 +-
> 5 files changed, 215 insertions(+), 116 deletions(-)
>