FAILED: patch "[PATCH] mptcp: sched: check both directions for backup" failed to apply to 5.10-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x b6a66e521a2032f7fcba2af5a9bcbaeaa19b7ca3
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024080759-deploy-send-dfa5@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
b6a66e521a20 ("mptcp: sched: check both directions for backup") 3ce0852c86b9 ("mptcp: enforce HoL-blocking estimation") ff5a0b421cb2 ("mptcp: faster active backup recovery")6da14d74e2bd ("mptcp: cleanup sysctl data and helpers") 1e1d9d6f119c ("mptcp: handle pending data on closed subflow") 71b7dec27f34 ("mptcp: less aggressive retransmission strategy") 33d41c9cd74c ("mptcp: more accurate timeout")d2f77960e5b0 ("mptcp: add sysctl allow_join_initial_addr_port") 8ce568ed06ce ("mptcp: drop tx skb cache")fc3c82eebf8e ("mptcp: add a new sysctl checksum_enabled") 752e906732c6 ("mptcp: add csum_enabled in mptcp_sock") 744ee14054c8 ("mptcp: restrict values of 'enabled' sysctl") 804c72eeecd2 ("mptcp: support SYSCTL only if enabled") ae514983f2e4 ("mptcp: remove redundant initialization in pm_nl_init_net()") 6876a18d3361 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b6a66e521a2032f7fcba2af5a9bcbaeaa19b7ca3 Mon Sep 17 00:00:00 2001
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Sat, 27 Jul 2024 12:01:23 +0200
Subject: [PATCH] mptcp: sched: check both directions for backup
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
Before this patch, the scheduler was only looking at the 'backup' flag. That can make sense in some cases, but it looks like that's not what we wanted for the general use, because either the path-manager was setting both of them when sending an MP_PRIO, or the receiver was duplicating the 'backup' flag in the subflow request.
Note that the use of these two flags in the path-manager are going to be fixed in the next commits, but this change here is needed not to modify the behaviour.
include/trace/events/mptcp.h +1 -1
@@ -34,7 +34,7 @@ TRACE_EVENT(mptcp_subflow_get_send,struct sock *ssk; __entry->active =mptcp_subflow_active (subflow); - __entry->backup = subflow->backup; + __entry->backup = subflow->backup || subflow->request_bkup;if (subflow->tcp_sock &&sk_fullsock (subflow->tcp_sock)) __entry->free =sk_stream_memory_free (subflow->tcp_sock);
net/mptcp/protocol.c +6 -4
@@ -1422,13 +1422,15 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk) }mptcp_for_each_subflow (msk, subflow) { +bool backup = subflow->backup || subflow->request_bkup; +trace_mptcp_subflow_get_send (subflow); ssk =mptcp_subflow_tcp_sock (subflow);if (!mptcp_subflow_active (subflow))continue ; tout =max (tout,mptcp_timeout_from_subflow (subflow)); - nr_active += !subflow->backup; + nr_active += !backup; pace = subflow->avg_pacing_rate;if (unlikely (!pace)) {/* init pacing rate from socket */
@@ -1439,9 +1441,9 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk) } linger_time =div_u64 ((u64 )READ_ONCE (ssk->sk_wmem_queued) <<32 , pace); -if (linger_time < send_info[subflow->backup].linger_time) { - send_info[subflow->backup].ssk = ssk; - send_info[subflow->backup].linger_time = linger_time; +if (linger_time < send_info[backup].linger_time) { + send_info[backup].ssk = ssk; + send_info[backup].linger_time = linger_time; } }__mptcp_set_timeout (sk, tout);
Matthieu Baerts (NGI0)
maintainerPATCH 1/1 mptcp: sched: check both directions for backup
commit b6a66e521a2032f7fcba2af5a9bcbaeaa19b7ca3 upstream.
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
Before this patch, the scheduler was only looking at the 'backup' flag. That can make sense in some cases, but it looks like that's not what we wanted for the general use, because either the path-manager was setting both of them when sending an MP_PRIO, or the receiver was duplicating the 'backup' flag in the subflow request.
Note that the use of these two flags in the path-manager are going to be fixed in the next commits, but this change here is needed not to modify the behaviour.
[ Conflicts in protocol.c, because the context has changed in commit
3ce0852c86b9 ("mptcp: enforce HoL-blocking estimation") and in commit 33d41c9cd74c ("mptcp: more accurate timeout"), which are not in this version. This commit is unrelated to this modification. Note that the tracepoint is not in this version, see commit e10a98920976 ("mptcp: add tracepoint in mptcp_subflow_get_send"). ]
--- net/mptcp/protocol.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
net/mptcp/protocol.c +6 -4
@@ -1124,11 +1124,13 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk, send_info[i].ratio =-1 ; }mptcp_for_each_subflow (msk, subflow) { +bool backup = subflow->backup || subflow->request_bkup; + ssk =mptcp_subflow_tcp_sock (subflow);if (!mptcp_subflow_active (subflow))continue ; - nr_active += !subflow->backup; + nr_active += !backup; *sndbuf =max (tcp_sk (ssk)->snd_wnd, *sndbuf);if (!sk_stream_memory_free (subflow->tcp_sock))continue ;
@@ -1139,9 +1141,9 @@ static struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk, ratio =div_u64 ((u64 )READ_ONCE (ssk->sk_wmem_queued) <<32 , pace); -if (ratio < send_info[subflow->backup].ratio) { - send_info[subflow->backup].ssk = ssk; - send_info[subflow->backup].ratio = ratio; +if (ratio < send_info[backup].ratio) { + send_info[backup].ssk = ssk; + send_info[backup].ratio = ratio; } }
Signature · 1 line
2.45.2
Patch "mptcp: sched: check both directions for backup" has been added to the 5.10-stable tree
This is a note to let you know that I've just added the patch titled
mptcp: sched: check both directions for backup
to the 5.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mptcp-sched-check-both-directions-for-backup.patch
and it can be found in the queue-5.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
From [email protected] Fri Aug 9 12:54:29 2024
From: "Matthieu Baerts (NGI0)" <[email protected]>
Date: Fri, 9 Aug 2024 12:54:13 +0200
Subject: mptcp: sched: check both directions for backup
To: [email protected], [email protected]
Cc: MPTCP Upstream <[email protected]>, "Matthieu Baerts (NGI0)" <[email protected]>, Mat Martineau <[email protected]>, Paolo Abeni <[email protected]>
Message-ID: <[email protected]>
From: "Matthieu Baerts (NGI0)" <[email protected]>
commit b6a66e521a2032f7fcba2af5a9bcbaeaa19b7ca3 upstream.
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
Before this patch, the scheduler was only looking at the 'backup' flag. That can make sense in some cases, but it looks like that's not what we wanted for the general use, because either the path-manager was setting both of them when sending an MP_PRIO, or the receiver was duplicating the 'backup' flag in the subflow request.
Note that the use of these two flags in the path-manager are going to be fixed in the next commits, but this change here is needed not to modify the behaviour.
[ Conflicts in protocol.c, because the context has changed in commit
3ce0852c86b9 ("mptcp: enforce HoL-blocking estimation") and in commit 33d41c9cd74c ("mptcp: more accurate timeout"), which are not in this version. This commit is unrelated to this modification. Note that the tracepoint is not in this version, see commit e10a98920976 ("mptcp: add tracepoint in mptcp_subflow_get_send"). ]
--- net/mptcp/protocol.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
net/mptcp/protocol.c +6 -4
@@ -1124,11 +1124,13 @@ static struct sock *mptcp_subflow_get_se send_info[i].ratio =-1 ; }mptcp_for_each_subflow (msk, subflow) { +bool backup = subflow->backup || subflow->request_bkup; + ssk =mptcp_subflow_tcp_sock (subflow);if (!mptcp_subflow_active (subflow))continue ; - nr_active += !subflow->backup; + nr_active += !backup; *sndbuf =max (tcp_sk (ssk)->snd_wnd, *sndbuf);if (!sk_stream_memory_free (subflow->tcp_sock))continue ;
@@ -1139,9 +1141,9 @@ static struct sock *mptcp_subflow_get_se ratio =div_u64 ((u64 )READ_ONCE (ssk->sk_wmem_queued) <<32 , pace); -if (ratio < send_info[subflow->backup].ratio) { - send_info[subflow->backup].ssk = ssk; - send_info[subflow->backup].ratio = ratio; +if (ratio < send_info[backup].ratio) { + send_info[backup].ssk = ssk; + send_info[backup].ratio = ratio; } }
Patches currently in stable-queue which might be from [email protected] are
queue-5.10/mptcp-fix-nl-pm-announced-address-accounting.patch queue-5.10/mptcp-distinguish-rcv-vs-sent-backup-flag-in-requests.patch queue-5.10/mptcp-pm-fix-backup-support-in-signal-endpoints.patch queue-5.10/mptcp-mib-count-mpj-with-backup-flag.patch queue-5.10/mptcp-sched-check-both-directions-for-backup.patch queue-5.10/mptcp-export-local_address.patch