aboutsummaryrefslogtreecommitdiffstats
path: root/net/mptcp/options.c
diff options
context:
space:
mode:
authorPaolo Abeni <[email protected]>2025-07-23 14:32:23 +0000
committerJakub Kicinski <[email protected]>2025-07-25 18:29:04 +0000
commitc65c2e3bae6912b6baf8ea12eeace220e8e99b47 (patch)
tree9af001acf5192384bc9ce9f5597de5010854cd7d /net/mptcp/options.c
parentselftests: net: Skip test if IPv6 is not configured (diff)
downloadkernel-c65c2e3bae6912b6baf8ea12eeace220e8e99b47.tar.gz
kernel-c65c2e3bae6912b6baf8ea12eeace220e8e99b47.zip
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 <[email protected]> Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20250723-net-next-mptcp-track-fallbacks-v1-1-a83cce08f2d5@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
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;
}