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 1c9efc05c58bc70aa1470c52a10b437a4cddae0e
Author: Paolo Abeni <[email protected]>

ms/mptcp: fix retransmission loop when csum is enabled

When MPTCP checksums are enabled, __mptcp_retrans() can send bytes past 
dfrag->already_sent. This patch advances msk->snd_nxt to cover those bytes, to 
avoid dropped ACKs and an endless retransmission loop.

Link: 
https://patch.msgid.link/20260602-net-mptcp-misc-fixes-7-1-rc7-v2-2-856831229...@kernel.org

> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index e526648a583e..9f1cc648a272 100644
> --- 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]
As reported by [email protected] on v1 [1], this isn't a
bug in the ACK handling, but should msk->bytes_sent also be advanced here?
mptcp_update_post_push() does "msk->bytes_sent += snd_nxt_new - msk->snd_nxt"
next to its snd_nxt update, and this hunk skips that step.

With csum enabled, the new bytes sent past the old already_sent are never
counted later by the push path, because the dfrag then has
already_sent == data_len. They are also counted in msk->bytes_retrans
above. So mptcpi_bytes_sent under-reports and mptcpi_bytes_retrans
over-reports on such connections.

[1] 
https://lore.kernel.org/r/010701a1aed34772-28c94ba5-5fa6-417e-9598-ebdd1dab980d-000...@eu-central-1.amazonses.com

-- 
Sashiko AI review ยท 
https://sashiko.vzint.dev/#/patchset/[email protected]?part=1

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to