Re: [PATCH net-next v3 7/7] mptcp: implemented OoO queue pruning
From: Matthieu Baerts
Date: Wed Aug 12 2026 - 10:52:31 EST
Hi Eric,
On 12/08/2026 13:39, Eric Dumazet wrote:
> On Fri, Aug 7, 2026 at 3:50 PM Matthieu Baerts (NGI0)
> <matttbe@xxxxxxxxxx> wrote:
>>
>> From: Paolo Abeni <pabeni@xxxxxxxxxx>
>>
>> When moving incoming skbs in the msk receive queue and the latter
>> is above limits, prune it as needed quite alike what TCP is doing
>> at the subflow level. The main difference relies in the stop condition:
>> since MPTCP does not perform collapsing, it's better off dropping the
>> bare minimum to fit the (newer) incoming packet.
>>
>> Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
>> Tested-by: Gang Yan <yangang@xxxxxxxxxx>
>> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
>> ---
>> v2:
>> - Uniform the new counter with the other OFO ones.
>> v3:
>> - prune only for new data
>> - reorganize the code to follow more closely TCP
>> ---
>
> ...
>
>> +
>> +/* The stack can't drop packets for fallback socket at the msk level, or the
>> + * stream will break.
>> + */
>> +static bool mptcp_can_ingest(const struct sock *sk)
>> +{
>> + return unlikely(sk_rmem_alloc_get(sk) <= READ_ONCE(sk->sk_rcvbuf)) ||
>> + __mptcp_check_fallback(mptcp_sk(sk));
>> +}
>> +
>
> This unlikely() seems inverted.
Thank you, yes it is!
Paolo already told me that before I sent the v3, but it looks like I was
in an OoM state, and the pruning was a bit too aggressive on my side...
A follow-up patch will be sent soon.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.