Re: [PATCH net-next v3 7/7] mptcp: implemented OoO queue pruning
Eric Dumazet <[email protected]>
| Newsgroups | dev.linux.lists.mptcp,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <CANn89iL-rnJtxVxJEf3j0PX3X8A04vsf-XXQvb-_FyjMBBM5nw@mail.gmail.com> |
On Fri, Aug 7, 2026 at 3:50 PM Matthieu Baerts (NGI0) <[email protected]> wrote: > > From: Paolo Abeni <[email protected]> > > 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 <[email protected]> > Tested-by: Gang Yan <[email protected]> > Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> > Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> > --- > 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.