[Devel] [PATCH hci-8.1 v2 01/10] ms/mptcp: fix retransmission loop when csum is enabled
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Mon Nov 16 06:58:24 MSK 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mptcp: __mptcp_retrans() advances snd_nxt without updating
bytes_sent
--
commit 4b630c7fb7662178dcb7db9d5474ad6ca408c6e0
Author: Paolo Abeni <pabeni at redhat.com>
ms/mptcp: fix retransmission loop when csum is enabled
This commit makes __mptcp_retrans() advance msk->snd_nxt after a retransmission that, with csum enabled, can send past dfrag->already_sent. The aim is to stop incoming ACKs being dropped, which caused an endless retransmission loop.
Link: https://patch.msgid.link/20260602-net-mptcp-misc-fixes-7-1-rc7-v2-2-856831229976@kernel.org
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -2666,6 +2666,10 @@ static void __mptcp_retrans(struct sock *sk)
> msk->bytes_retrans += len;
> dfrag->already_sent = max(dfrag->already_sent, len);
>
> + /* With csum enabled retransmission can send new data. */
> + if (after64(dfrag->already_sent + dfrag->data_seq, msk->snd_nxt))
> + WRITE_ONCE(msk->snd_nxt, dfrag->already_sent + dfrag->data_seq);
> +
[Severity: Low]
Should msk->bytes_sent also be advanced here by the new-data delta?
mptcp_update_post_push() updates the two together:
msk->bytes_sent += snd_nxt_new - msk->snd_nxt;
WRITE_ONCE(msk->snd_nxt, snd_nxt_new);
Here snd_nxt moves forward without a matching bytes_sent update. Once the dfrag has already_sent == data_len, the push path sees len == 0 and skips it, so those bytes are never counted. With csum enabled, mptcpi_bytes_sent therefore under-reports after such a retransmit.
The earlier "msk->bytes_retrans += len" also counts those new bytes as retransmitted, so mptcpi_bytes_retrans over-reports. This is a statistics-only effect.
The upstream commit has the same gap.
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261116035204.564416-1-eva.kurchatova@virtuozzo.com?part=1
More information about the Devel
mailing list