From nobody Mon Sep 16 19:03:28 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 AF90A22EE0 for ; Wed, 13 Sep 2023 21:05:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694639112; 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=lzEV60DkiJb5dP4VdvK6JX9+EWSJ0mn/6J6VcYY01R0=; b=HDdVhG28/A+am4dDnBEo8ySRcAYcqMR31I+aqnfXa9uqfJxM7unVut0r1fhkcpw1tCkxet JhrckF6DMSkWzv6ujvR1bRyG56m/NI8jmBUJpgraktf/7GCIVy3t77WmoJ3Rjp+JvN6bby v0PXg1/MGB21uy2g2AOBTB1+edBcJr4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-572-SqIlicJVN4qYGEmazgE2tQ-1; Wed, 13 Sep 2023 17:05:10 -0400 X-MC-Unique: SqIlicJVN4qYGEmazgE2tQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 860F7800045 for ; Wed, 13 Sep 2023 21:05:10 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.45.224.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13E8463F9D for ; Wed, 13 Sep 2023 21:05:09 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Subject: [PATCH mptcp-next 2/3] mptcp: ignore notsent_lowat setting at the subflow level. Date: Wed, 13 Sep 2023 23:05:01 +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 3.1 on 10.11.54.5 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" Any latency related tuning taking action at the subflow level does not really affect the user-space, as only the main MPTCP socket is relevant. Anyway any limiting setting may foul the MPTCP scheduler, not being able to fully use the subflow-level cwin, leading to very poor b/w usage. Enforce notsent_lowat to be a no-op on every subflow. Note that TCP_NOTSENT_LOWAT is currently not supported, and properly dealing with that will require more invasive changes. Singed-off-by: Paolo Abeni --- net/mptcp/sockopt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/mptcp/sockopt.c b/net/mptcp/sockopt.c index f44b364b0055..453d6c78c25c 100644 --- a/net/mptcp/sockopt.c +++ b/net/mptcp/sockopt.c @@ -1450,6 +1450,12 @@ void mptcp_sockopt_sync_locked(struct mptcp_sock *ms= k, struct sock *ssk) =20 msk_owned_by_me(msk); =20 + /* subflows must ignore any latency-related settings: will not affect + * the user-space - only the msk is relevant - but will foul the + * mptcp scheduler + */ + tcp_sk(ssk)->notsent_lowat =3D UINT_MAX; + if (READ_ONCE(subflow->setsockopt_seq) !=3D msk->setsockopt_seq) { sync_socket_options(msk, ssk); =20 --=20 2.41.0