From nobody Fri Dec 19 16:06:45 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a9f:3ec7:0:0:0:0:0 with SMTP id n7csp2365820uaj; Wed, 24 Aug 2022 04:18:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Bug9vDT+2gHLDtAxIui3ynhZVMB31QVGkoSoafDwuM2R59isgM/I8qBTxhnUrYASXFzdv X-Received: by 2002:a65:6a49:0:b0:429:88a0:4c04 with SMTP id o9-20020a656a49000000b0042988a04c04mr23472738pgu.566.1661339911421; Wed, 24 Aug 2022 04:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661339911; cv=none; d=google.com; s=arc-20160816; b=gdRoBVWCJ1CQ6GidsninDeK+BpuqQZ+nxuIYk3zqPIWYS4miESIFv0GXiR0ibwpPut nkZW/FP4Au3Fe+GUUE5pRj28o+3tVeFiLGfXqdUTMiXLXurkrffXOOH9RwqE5UAP9ZCd TB5T6bafhgZ86ERO6232H/2rTvwEy5mzkyWTo+P9sqdjlQbjf9uSzhcmi1mKDsAUympr LiISuWMb2zWcQr5s0p0tEdDozGDj7Gjga8rvpTK/6KnveEKl7adp5vY2zMPnHLSJhJKs DeNuB9GER3opMv6zBHKMrNUDLAmQxflg1kFh5TQWDjZOcL+MbkNPdexlRDUwcUahlCzh UH6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=sA4NgqFVtLhtuschY9R88Cjx4hfhiSukNOUqbDcNRhI=; b=Y69ZookKMfi05nsFvgUZt1tVjUGRHMYD3NNkA/TWrHYnxBbg1OHuRchYfur7DNxhRc Iar7EDbkMiZr3Dll0R6Yj51GpVSlAfJ7Xsi3vb1XNueBdoLeX6i+uW3EzHPVLwVcDit5 IcO2p4EUZIwPH1E6OMTcdvtL57Jevz1iTISgqc0xws8SJFHPU9gIbe/51KKu3YfnI4Uc OKTDVO3RmA56vFxf09oevsOIWWrzAJt4ieCca+4VY2arVx0JUNm3TfPnBNfhbujsX/2K 6yDevJrv/Kc2yHildE1073WAh7+A4sTUJ3pG6y+y9IewkVCJLYNXzl3MwLiR/7eQzBNi JB8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TWYwGYbQ; spf=pass (google.com: domain of mptcp+bounces-6157-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.88.99 as permitted sender) smtp.mailfrom="mptcp+bounces-6157-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id z14-20020a170902d54e00b00172e6c66fa9si9045649plf.555.2022.08.24.04.18.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Aug 2022 04:18:31 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-6157-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TWYwGYbQ; spf=pass (google.com: domain of mptcp+bounces-6157-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 139.178.88.99 as permitted sender) smtp.mailfrom="mptcp+bounces-6157-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D3400280C87 for ; Wed, 24 Aug 2022 11:18:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1EDD139C; Wed, 24 Aug 2022 11:18:28 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4692139F for ; Wed, 24 Aug 2022 11:18:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661339905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sA4NgqFVtLhtuschY9R88Cjx4hfhiSukNOUqbDcNRhI=; b=TWYwGYbQnPjdrg6oV48kYKw/tfgJFnpJfT6Rk9lWOFhCmgENeHhVtsarJm3wJ1FDRrzij9 bhrAgeWBanzQeW6/0Uoi2+lQA+YkUwQSw9lenm4zyZm8b22/ata44Q0YVuk8KO+KpPTYK7 O/UyxNQVdi2RfEtQYqB79v+mH/yXua4= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-533-AtzR4Xi1MXa3630lbZIJCQ-1; Wed, 24 Aug 2022 07:18:24 -0400 X-MC-Unique: AtzR4Xi1MXa3630lbZIJCQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 476233C0ED55 for ; Wed, 24 Aug 2022 11:18:24 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.194.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB784492C3B for ; Wed, 24 Aug 2022 11:18:23 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH mptcp-next 2/2] mptcp: never re-inject data on a single subflow Date: Wed, 24 Aug 2022 13:18:14 +0200 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; x-default="true" If the MPTCP-level data ack is delayed WRT to the TCP-level ack, there is a single subflow and the user-space stops pushing data, the MPTCP-level retransmit may trigger in, fooling (disallowing) infinite mapping fallback. All the above is triggered quite reliably by the self-tests, once we move the MPTCP receive path under the msk socket lock - delaying the MPTCP-level acks. Plain TCP is good enough to handle retransmissions as needed. Signed-off-by: Paolo Abeni --- Note that there are a couple of sad untold stories here. The first one is as follow: with the delayed mptcp-level ack, at MPC handshake time we ha= ve: MPC + SYN -> <- MPC + SYN_ACK(1) MPC + ACK(1) -> <- DSS(n bytes) + ACK(1) DSS_ACK(1) + ACK(n+1) and no more acks from the client side, even after reading the incoming n bytes data. So a possible alternative solution would be to tweek mptcp_cleanup_rbuf() to properly handle this scenario. Additionally, possibly, still due to the mptcp-level delyated ack, we could need to tweek mptcp_cleanup_rbuf() more - e.g. do we need to force mptcp-level ack when there is a large enough amount of newly "ackable" data due to __mptcp_move_skbs() action? I don't know. I guess/hope that the condition on mptcp-level window update already implemented in mptcp_cleanup_rbuf() should also cover for the above, but I'm not sure. The other point is that I can't recall the previous discussion about avoiding re-injection with a single subflow. I now think that is bad, at least with delayed mptcp-level ack, and I don't see a need for that, but possibly/likely I'm forgetting something?!? --- net/mptcp/sched.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mptcp/sched.c b/net/mptcp/sched.c index 044c5ec8bbfb..409e832085c2 100644 --- a/net/mptcp/sched.c +++ b/net/mptcp/sched.c @@ -162,6 +162,10 @@ struct sock *mptcp_sched_get_retrans(struct mptcp_sock= *msk) if (__mptcp_check_fallback(msk)) return NULL; =20 + /* never retransmit when there is a single subflow */ + if (list_is_singular(&msk->conn_list) && list_empty(&msk->join_list)) + return NULL; + if (!msk->sched) return mptcp_subflow_get_retrans(msk); =20 --=20 2.37.1