]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mptcp: sched: check both backup in retrans
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Mon, 26 Aug 2024 17:11:20 +0000 (19:11 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 27 Aug 2024 21:45:16 +0000 (14:45 -0700)
The 'mptcp_subflow_context' structure has two items related to the
backup flags:

 - 'backup': the subflow has been marked as backup by the other peer

 - 'request_bkup': the backup flag has been set by the host

Looking only at the 'backup' flag can make sense in some cases, but it
is not the behaviour of the default packet scheduler when selecting
paths.

As explained in the commit b6a66e521a20 ("mptcp: sched: check both
directions for backup"), the packet scheduler should look at both flags,
because that was the behaviour from the beginning: the 'backup' flag was
set by accident instead of the 'request_bkup' one. Now that the latter
has been fixed, get_retrans() needs to be adapted as well.

Fixes: b6a66e521a20 ("mptcp: sched: check both directions for backup")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20240826-net-mptcp-close-extra-sf-fin-v1-3-905199fe1172@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/protocol.c

index 151e82e2ff2e86ac6bf78f18c9688e4ab691dc4a..34fec753b9c1787fbbf30bf2bab998a5eab32a4e 100644 (file)
@@ -2326,7 +2326,7 @@ struct sock *mptcp_subflow_get_retrans(struct mptcp_sock *msk)
                        continue;
                }
 
-               if (subflow->backup) {
+               if (subflow->backup || subflow->request_bkup) {
                        if (!backup)
                                backup = ssk;
                        continue;