mptcp: restore zero window probe
Subsystems (2)
Paolo Abeni
maintainerv2 cover mptcp: restore zero window probe
It turns out that the issue reported by Geliang on the pending backlog patches is actually on older one that the new code made more easy reproducible.
The first patch in the series addresses it[1], the 2nd one introduce new mibs to hopefully catch this problem sooned.
I have a pktdrill to validate this scenario. I'll share that soon.
@Geliang could you please validate the above in your testbed, on top of the backlog and splice patches?
[1] at least here, at least with the packet drill reproducer ;)
---
v1 -> v2:
- drop unneeded delta in patch 1/2
Paolo Abeni (2):
mptcp: restore window probe
mptcp: zero window probe mib
net/mptcp/mib.c | 1 + net/mptcp/mib.h | 1 + net/mptcp/protocol.c | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-)
Signature · 1 line
2.51.0
Paolo Abeni
maintainerPATCH v2 1/2 mptcp: restore window probe
Since commit 72377ab2d671 ("mptcp: more conservative check for zero probes") the MPTCP-level zero window probe check is always disabled, as the TCP-level write queue always contains at least the newly allocated skb.
Refine the relevant check tacking in account that the above condition and that such skb can have zero length.
---
v1 -> v2:
- drop unneeded changes (Mat)
--- net/mptcp/protocol.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
net/mptcp/protocol.c +6 -1
@@ -1339,7 +1339,12 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,if (copy ==0 ) {u64 snd_una =READ_ONCE (msk->snd_una); -if (snd_una != msk->snd_nxt ||tcp_write_queue_tail (ssk)) { +/* No need for zero probe if there are any data pending +* either at the msk or ssk level; skb is the current write +* queue tail and can be empty at this point. +*/ +if (snd_una != msk->snd_nxt || skb->len || + skb !=tcp_send_head (ssk)) {tcp_remove_empty_skb (ssk);return 0 ; }
Signature · 1 line
2.51.0
Paolo Abeni
maintainerPATCH v2 2/2 mptcp: zero window probe mib
In reply to Paolo AbeniExplicitly account for MPTCP-level zero windows probe, to catch hopefully earlier issues alike the one addressed by the previous patch.
--- net/mptcp/mib.c | 1 + net/mptcp/mib.h | 1 + net/mptcp/protocol.c | 1 + 3 files changed, 3 insertions(+)
net/mptcp/mib.c +1 -0
@@ -85,6 +85,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {SNMP_MIB_ITEM ("DssFallback" ,MPTCP_MIB_DSSFALLBACK ),SNMP_MIB_ITEM ("SimultConnectFallback" ,MPTCP_MIB_SIMULTCONNFALLBACK ),SNMP_MIB_ITEM ("FallbackFailed" ,MPTCP_MIB_FALLBACKFAILED ), + SNMP_MIB_ITEM("MPTcpWinProbe", MPTCP_MIB_MPTCPWINPROBE), };/* mptcp_mib_alloc - allocate percpu mib counters
net/mptcp/mib.h +1 -0
@@ -88,6 +88,7 @@ enum linux_mptcp_mib_field {MPTCP_MIB_DSSFALLBACK ,/* Bad or missing DSS */ MPTCP_MIB_SIMULTCONNFALLBACK ,/* Simultaneous connect */ MPTCP_MIB_FALLBACKFAILED ,/* Can't fallback due to msk status */ +MPTCP_MIB_MPTCPWINPROBE ,/* MPTCP-level zero window probe */ __MPTCP_MIB_MAX };
net/mptcp/protocol.c +1 -0
@@ -1395,6 +1395,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk, mpext->dsn64);if (zero_window_probe) { +MPTCP_INC_STATS (sock_net (ssk),MPTCP_MIB_MPTCPWINPROBE );mptcp_subflow_ctx (ssk)->rel_write_seq += copy; mpext->frozen =1 ;if (READ_ONCE (msk->csum_enabled))
Signature · 1 line
2.51.0
Hi Paolo,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/18709417366
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/5d3c078227a8
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1014382
If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normalFor more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Geliang Tang
reviewerHi Paolo,
Quoted 9 lines · Paolo Abeni
It turns out that the issue reported by Geliang on the pending backlog
patches is actually on older one that the new code made more easy reproducible.The first patch in the series addresses it[1], the 2nd one introduce new
mibs to hopefully catch this problem sooned.
Quoted 5 lines
I have a pktdrill to validate this scenario. I'll share that soon.
@Geliang could you please validate the above in your testbed, on top of
the backlog and splice patches?
Thanks very much. I've already started testing, and so far everything is running smoothly. I'll let it run loop tests overnight and will have the results by tomorrow morning. I'll provide you with feedback then.
Thanks,
-Geliang
Quoted 15 lines
[1] at least here, at least with the packet drill reproducer ;)
---
v1 -> v2:
- drop unneeded delta in patch 1/2Paolo Abeni (2):
mptcp: restore window probe
mptcp: zero window probe mibnet/mptcp/mib.c | 1 +
net/mptcp/mib.h | 1 +
net/mptcp/protocol.c | 8 +++++++-3 files changed, 9 insertions(+), 1 deletion(-)
Geliang Tang
reviewerHi Paolo,
Quoted 20 lines · Geliang Tang
Hi Paolo,
Quoted 10 lines · Paolo Abeni
It turns out that the issue reported by Geliang on the pending backlog
patches is actually on older one that the new code made more easy reproducible.The first patch in the series addresses it[1], the 2nd one introduce
new
mibs to hopefully catch this problem sooned.Quoted 6 lines
I have a pktdrill to validate this scenario. I'll share that soon.
@Geliang could you please validate the above in your testbed, on top
of
the backlog and splice patches?
Quoted 4 lines
Thanks very much. I've already started testing, and so far everything is running smoothly. I'll let it run loop tests overnight and will have
the results by tomorrow morning. I'll provide you with feedback then.
Thank you so much! This fix really works. I've run hundreds of splice test loops with the following three patchsets applied, and no test failures occurred:
mptcp: restore zero window probe, v2
mptcp: introduce backlog processing, v6
implement mptcp read_sock, v13
Please add my tag for this set:
Quoted 9 lines
Thanks,
-GeliangQuoted 5 lines
[1] at least here, at least with the packet drill reproducer ;)
---
v1 -> v2:
- drop unneeded delta in patch 1/2
This change in v1 is valid. Later I will send a dedicated cleanup patch for -next to use tcp_sk() in mptcp_sendmsg_frag() with your "Suggested- by" tag.
Thanks,
-Geliang
Quoted 12 lines
Quoted 10 lines
Paolo Abeni (2):
mptcp: restore window probe
mptcp: zero window probe mibnet/mptcp/mib.c | 1 +
net/mptcp/mib.h | 1 +
net/mptcp/protocol.c | 8 +++++++-3 files changed, 9 insertions(+), 1 deletion(-)
Matthieu Baerts
maintainerHi Geliang,
Quoted 32 lines · Geliang Tang
Hi Paolo,
Quoted 20 lines · Geliang Tang
Hi Paolo,
Quoted 10 lines · Paolo Abeni
It turns out that the issue reported by Geliang on the pending backlog
patches is actually on older one that the new code made more easy reproducible.The first patch in the series addresses it[1], the 2nd one introduce
new
mibs to hopefully catch this problem sooned.Quoted 6 lines
I have a pktdrill to validate this scenario. I'll share that soon.
@Geliang could you please validate the above in your testbed, on top
of
the backlog and splice patches?Quoted 4 lines
Thanks very much. I've already started testing, and so far everything is running smoothly. I'll let it run loop tests overnight and will have
the results by tomorrow morning. I'll provide you with feedback then.Thank you so much! This fix really works. I've run hundreds of splice test loops with the following three patchsets applied, and no test failures occurred:
Quoted 7 lines
mptcp: restore zero window probe, v2
mptcp: introduce backlog processing, v6
implement mptcpread_sock, v13Please add my tag for this set:
Reported-and-tested-by Geliang Tang <[email protected]>
Thank you for the test!
To avoid issues with checkpatch and to be consistent, I'm going to add this on the first patch:
Reported-by: (...)
Closes:
https://lore.kernel.org/[email protected]
(...)
Tested-by: (...)
And only the Tested-by on the second one. I hope that's OK!
Quoted 4 lines
Quoted 4 lines
Thanks,
-GeliangQuoted 1 line
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
[1] at least here, at least with the packet drill reproducer ;)
---
v1 -> v2:
- drop unneeded delta in patch 1/2This change in v1 is valid. Later I will send a dedicated cleanup patch for -next to use
tcp_sk()inmptcp_sendmsg_frag()with your "Suggested- by" tag.
Please only add such patch when we modify code around in net-next.
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Matthieu Baerts
maintainerHi Paolo, Geliang, Mat,
Quoted 8 lines · Paolo Abeni
It turns out that the issue reported by Geliang on the pending backlog patches is actually on older one that the new code made more easy reproducible.
The first patch in the series addresses it[1], the 2nd one introduce new mibs to hopefully catch this problem sooned.
I have a pktdrill to validate this scenario. I'll share that soon.
Thank you for the new pktdrill. I don't know if you saw my question:
https://github.com/multipath-tcp/packetdrill/pull/179
I also just did a quick review and test while at it
Quoted 2 lines
@Geliang could you please validate the above in your testbed, on top of the backlog and splice patches?
Thank you for the patches and the reviews! I already applied the patches, I guess the issues with Packetdrill are in the test, not the kernel modifications.
New patches for t/upstream-net and t/upstream:
- b7749bb6ab95: mptcp: restore window probe
- 5d8d442266f9: mptcp: zero window probe mib
- Results: 94b2567634ae..affaafb5552e (export-net)
- Results: 5d6d50a980ff..ed6f82a81575 (export)
Tests are now in progress:
- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/5db161c8d173fc05a4d26fd5df5e8c6e90ac8c19/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/785e3842513ff5993f32c918f90dbee62244ed63/checks
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Matthieu Baerts
maintainerRe: [PATCH v2 mptcp-net 2/2] mptcp: zero window probe mib
In reply to Paolo AbeniHi Paolo,
Quoted 17 lines · Paolo Abeni
Explicitly account for MPTCP-level zero windows probe, to catch hopefully earlier issues alike the one addressed by the previous patch.
Reviewed-by Mat Martineau <[email protected]>Signed-off-by Paolo Abeni <[email protected]>--- net/mptcp/mib.c | 1 + net/mptcp/mib.h | 1 + net/mptcp/protocol.c | 1 + 3 files changed, 3 insertions(+)net/mptcp/mib.c +0
-0
net/mptcp/mib.c static const struct snmp_mib mptcp_snmp_list[] = { · line 88
Quoted 4 lines
net/mptcp/mib.c +1
-0@@ -85,6 +85,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {SNMP_MIB_ITEM ("DssFallback" ,MPTCP_MIB_DSSFALLBACK ),SNMP_MIB_ITEM ("SimultConnectFallback" ,MPTCP_MIB_SIMULTCONNFALLBACK ),SNMP_MIB_ITEM ("FallbackFailed" ,MPTCP_MIB_FALLBACKFAILED ), + SNMP_MIB_ITEM("MPTcpWinProbe", MPTCP_MIB_MPTCPWINPROBE),
Detail: I just noticed that after having applied the patch: Do we need to double the 'MPTCP' keyword here? The full MIB counter name is:
MPTcpExtMPTcpWinProbe
Maybe just WinProbe is enough? → MPTcpExtWinProbe
Or the second MPTCP using capital letters, similar to "MPTCPRetrans"?
(I can fix that directly in the tree.)
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Paolo Abeni
maintainerRe: [PATCH v2 mptcp-net 2/2] mptcp: zero window probe mib
Quoted 26 lines · Matthieu Baerts
Quoted 17 lines · Paolo Abeni
Explicitly account for MPTCP-level zero windows probe, to catch hopefully earlier issues alike the one addressed by the previous patch.
Reviewed-by Mat Martineau <[email protected]>Signed-off-by Paolo Abeni <[email protected]>--- net/mptcp/mib.c | 1 + net/mptcp/mib.h | 1 + net/mptcp/protocol.c | 1 + 3 files changed, 3 insertions(+)net/mptcp/mib.c +0
-0net/mptcp/mib.c static const struct snmp_mib mptcp_snmp_list[] = { · line 88
Quoted 4 lines
net/mptcp/mib.c +1
-0@@ -85,6 +85,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {SNMP_MIB_ITEM ("DssFallback" ,MPTCP_MIB_DSSFALLBACK ),SNMP_MIB_ITEM ("SimultConnectFallback" ,MPTCP_MIB_SIMULTCONNFALLBACK ),SNMP_MIB_ITEM ("FallbackFailed" ,MPTCP_MIB_FALLBACKFAILED ), + SNMP_MIB_ITEM("MPTcpWinProbe", MPTCP_MIB_MPTCPWINPROBE),Detail: I just noticed that after having applied the patch: Do we need to double the 'MPTCP' keyword here? The full MIB counter name is:
Quoted 3 lines
MPTcpExtMPTcpWinProbe
Maybe just WinProbe is enough? → MPTcpExtWinProbe
I'm sorry for the late reply. Yes WinProbe -> MPTcpExtWinProbe is the correct/intended name, if you could fix that in the tree would be great, thanks!
Paolo
Matthieu Baerts
maintainerRe: [PATCH v2 mptcp-net 2/2] mptcp: zero window probe mib
Hi Paolo,
Quoted 27 lines · Paolo Abeni
Quoted 26 lines · Matthieu Baerts
Quoted 17 lines · Paolo Abeni
Explicitly account for MPTCP-level zero windows probe, to catch hopefully earlier issues alike the one addressed by the previous patch.
Reviewed-by Mat Martineau <[email protected]>Signed-off-by Paolo Abeni <[email protected]>--- net/mptcp/mib.c | 1 + net/mptcp/mib.h | 1 + net/mptcp/protocol.c | 1 + 3 files changed, 3 insertions(+)net/mptcp/mib.c +0
-0net/mptcp/mib.c static const struct snmp_mib mptcp_snmp_list[] = { · line 88
Quoted 4 lines
net/mptcp/mib.c +1
-0@@ -85,6 +85,7 @@ static const struct snmp_mib mptcp_snmp_list[] = {SNMP_MIB_ITEM ("DssFallback" ,MPTCP_MIB_DSSFALLBACK ),SNMP_MIB_ITEM ("SimultConnectFallback" ,MPTCP_MIB_SIMULTCONNFALLBACK ),SNMP_MIB_ITEM ("FallbackFailed" ,MPTCP_MIB_FALLBACKFAILED ), + SNMP_MIB_ITEM("MPTcpWinProbe", MPTCP_MIB_MPTCPWINPROBE),Detail: I just noticed that after having applied the patch: Do we need to double the 'MPTCP' keyword here? The full MIB counter name is:
Quoted 7 lines
Quoted 3 lines
MPTcpExtMPTcpWinProbe
Maybe just WinProbe is enough? → MPTcpExtWinProbe
I'm sorry for the late reply. Yes WinProbe -> MPTcpExtWinProbe is the correct/intended name, if you could fix that in the tree would be great, thanks!
Thanks! Just did! I also renamed the enum
MPTCP_MIB_MPTCPWINPROBE → MPTCP_MIB_WINPROBE:
New patches for t/upstream-net and t/upstream:
- 9525948cb5cc: Squash to "mptcp: zero window probe mib"
- Results: f6c0967d41d1..628a66ff3d17 (export-net)
- Results: 8416614a1e27..6354d0b32825 (export)
Tests are now in progress:
- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/60ce52cf453b5182b993d2420d01422355ebbd67/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/a76c4725014b6c51385d301f1027a7891714a6bb/checks
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Geliang Tang
reviewerHi Matt,
Quoted 73 lines · Matthieu Baerts
Hi Geliang,
Quoted 39 lines · Geliang Tang
Hi Paolo,
Quoted 23 lines · Geliang Tang
Hi Paolo,
Quoted 11 lines · Paolo Abeni
It turns out that the issue reported by Geliang on the pending backlog
patches is actually on older one that the new code made more easy
reproducible.The first patch in the series addresses it[1], the 2nd one introduce
new
mibs to hopefully catch this problem sooned.Quoted 8 lines
I have a pktdrill to validate this scenario. I'll share that soon.
@Geliang could you please validate the above in your testbed, on
top
of
the backlog and splice patches?Quoted 7 lines
Thanks very much. I've already started testing, and so far everything
is running smoothly. I'll let it run loop tests overnight and will
have
the results by tomorrow morning. I'll provide you with feedback then.Thank you so much! This fix really works. I've run hundreds of splice
test loops with the following three patchsets applied, and no test failures occurred:Quoted 7 lines
mptcp: restore zero window probe, v2
mptcp: introduce backlog processing, v6
implement mptcpread_sock, v13Please add my tag for this set:
Reported-and-tested-by Geliang Tang <[email protected]>Thank you for the test!
To avoid issues with checkpatch and to be consistent, I'm going to add
this on the first patch:Reported-by: (...)
Closes:
https://lore.kernel.org/[email protected]
(...)
Tested-by: (...)And only the Tested-by on the second one. I hope that's OK!
Quoted 9 lines
Quoted 8 lines
Thanks,
-GeliangQuoted 5 lines
[1] at least here, at least with the packet drill reproducer ;)
---
v1 -> v2:
- drop unneeded delta in patch 1/2
Quoted 7 lines
Quoted 5 lines
This change in v1 is valid. Later I will send a dedicated cleanup patch
for -next to usetcp_sk()inmptcp_sendmsg_frag()with your "Suggested-
by" tag.Please only add such patch when we modify code around in net-next.
Sure, I'll send it out together once I modify mptcp_sendmsg_frag in the future.
Thanks,
-Geliang
Quoted 3 lines
Cheers,
Matt