mptcp: skip to next candidate if subflow has unacked data
authorFlorian Westphal <fw@strlen.de>
Thu, 19 Nov 2020 19:45:56 +0000 (11:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Feb 2021 14:53:23 +0000 (15:53 +0100)
[ Upstream commit 860975c6f80adae9d2c7654bde04a99dd28bc94f ]

In case a subflow path is blocked, MPTCP-level retransmit may not take
place anymore because such subflow is likely to have unacked data left
in its write queue.

Ignore subflows that have experienced loss and test next candidate.

Fixes: 3b1d6210a95773691 ("mptcp: implement and use MPTCP-level retransmission")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mptcp/protocol.c

index 967ce9ccfc0da3ed4c91636a5bdb619f8f862fb6..f56b2e331bb6b576af6df8f7b5a96301632c2630 100644 (file)
@@ -1648,8 +1648,11 @@ static struct sock *mptcp_subflow_get_retrans(const struct mptcp_sock *msk)
                        continue;
 
                /* still data outstanding at TCP level?  Don't retransmit. */
-               if (!tcp_write_queue_empty(ssk))
+               if (!tcp_write_queue_empty(ssk)) {
+                       if (inet_csk(ssk)->icsk_ca_state >= TCP_CA_Loss)
+                               continue;
                        return NULL;
+               }
 
                if (subflow->backup) {
                        if (!backup)