summaryrefslogtreecommitdiff
path: root/net/mptcp/options.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2025-07-23 16:32:23 +0200
committerJakub Kicinski <kuba@kernel.org>2025-07-25 11:29:04 -0700
commitc65c2e3bae6912b6baf8ea12eeace220e8e99b47 (patch)
tree9af001acf5192384bc9ce9f5597de5010854cd7d /net/mptcp/options.c
parent5ec9b15d8dfa4992c6f9c26c1f96e69202d8fcb1 (diff)
mptcp: track fallbacks accurately via mibs
Add the mibs required to cover the few possible fallback causes still lacking suck info. Move the relevant mib increment into the fallback helper, so that no eventual future fallback operation will miss a paired mib increment. Additionally track failed fallback via its own mib, such mib is incremented only when a fallback mandated by the protocol fails - due to racing subflow creation. While at the above, rename an existing helper to reduce long lines problems all along. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250723-net-next-mptcp-track-fallbacks-v1-1-a83cce08f2d5@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/options.c')
-rw-r--r--net/mptcp/options.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1f898888b223..6cf02344249a 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -978,8 +978,10 @@ static bool check_fully_established(struct mptcp_sock *msk, struct sock *ssk,
if (subflow->mp_join)
goto reset;
subflow->mp_capable = 0;
- if (!mptcp_try_fallback(ssk))
+ if (!mptcp_try_fallback(ssk, MPTCP_MIB_MPCAPABLEDATAFALLBACK)) {
+ MPTCP_INC_STATS(sock_net(ssk), MPTCP_MIB_FALLBACKFAILED);
goto reset;
+ }
pr_fallback(msk);
return false;
}