mptcp: refine mptcp_cleanup_rbuf
authorPaolo Abeni <pabeni@redhat.com>
Tue, 22 Jun 2021 19:25:23 +0000 (12:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Jun 2021 21:36:01 +0000 (14:36 -0700)
commitfde56eea01f96b664eb63033990be0fd2a945da5
tree2d4908623c9dfadf7bcd2f9ef69662d27122e8cd
parentd8e336f77e3bce440f78432d259c9ddedada7b79
mptcp: refine mptcp_cleanup_rbuf

The current cleanup rbuf tries a bit too hard to avoid acquiring
the subflow socket lock. We may end-up delaying the needed ack,
or skip acking a blocked subflow.

Address the above extending the conditions used to trigger the cleanup
to reflect more closely what TCP does and invoking tcp_cleanup_rbuf()
on all the active subflows.

Note that we can't replicate the exact tests implemented in
tcp_cleanup_rbuf(), as MPTCP lacks some of the required info - e.g.
ping-pong mode.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c
net/mptcp/protocol.h