OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Eva Kurchatova <eva.kurchatova@virtuozzo.com>, khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v2 01/10] ms/mptcp: fix retransmission loop when csum is enabled
Date: Mon, 16 Nov 2026 03:58:24 +0000	[thread overview]
Message-ID: <010701a1e281920e-21d3c4cd-5c4c-4f19-a81f-46a868e7ca22-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261116035204.564416-2-eva.kurchatova@virtuozzo.com>

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@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

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-16  3:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  3:49 [Devel] [PATCH hci-8.1 v2 00/10] ms/mptcp: stability fixes Eva Kurchatova
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 01/10] ms/mptcp: fix retransmission loop when csum is enabled Eva Kurchatova
2026-11-16  3:58   ` no-reply [this message]
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 02/10] ms/mptcp: move the retrans loop to a separate helper Eva Kurchatova
2026-11-16  3:55   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 03/10] ms/mptcp: move the stale logic out of retrans scheduler Eva Kurchatova
2026-11-16  3:56   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 04/10] ms/mptcp: let the retrans scheduler do its job Eva Kurchatova
2026-11-16  3:59   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 05/10] ms/mptcp: close TOCTOU race while computing rcv_wnd Eva Kurchatova
2026-11-16  3:59   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 06/10] ms/mptcp: allow subflow rcv wnd to shrink Eva Kurchatova
2026-11-16  4:02   ` no-reply
2026-11-16 17:09   ` Konstantin Khorenko
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 07/10] ms/mptcp: explicitly drop over memory limits Eva Kurchatova
2026-11-16  4:03   ` no-reply
2026-11-16 17:09   ` Konstantin Khorenko
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 08/10] ms/mptcp: implemented OoO queue pruning Eva Kurchatova
2026-11-16  4:04   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 09/10] ms/mptcp: being below memory limit is a likely() condition Eva Kurchatova
2026-11-16  4:03   ` no-reply
2026-11-16  3:49 ` [Devel] [PATCH hci-8.1 v2 10/10] ms/mptcp: avoid pruning for OoW data Eva Kurchatova
2026-11-16  4:04   ` no-reply
2026-11-16 17:09 ` [Devel] [PATCH hci-8.1 v2 00/10] ms/mptcp: stability fixes Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=010701a1e281920e-21d3c4cd-5c4c-4f19-a81f-46a868e7ca22-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=eva.kurchatova@virtuozzo.com \
    --cc=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox