| Message ID | 20191112141038.19213-1-fw@strlen.de |
|---|---|
| State | Superseded, archived |
| Headers | show
Return-Path: <mptcp-bounces@lists.01.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=strlen.de Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47C8X94kmrz9sNT for <incoming@patchwork.ozlabs.org>; Wed, 13 Nov 2019 01:00:23 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A2BD2100DC418; Tue, 12 Nov 2019 06:02:07 -0800 (PST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a0a:51c0:0:12e:520::1; helo=chamillionaire.breakpoint.cc; envelope-from=fw@breakpoint.cc; receiver=<UNKNOWN> Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 17188100DC414 for <mptcp@lists.01.org>; Tue, 12 Nov 2019 06:02:05 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from <fw@breakpoint.cc>) id 1iUWiQ-0001sw-4f; Tue, 12 Nov 2019 15:00:18 +0100 From: Florian Westphal <fw@strlen.de> To: <mptcp@lists.01.org> Date: Tue, 12 Nov 2019 15:10:34 +0100 Message-Id: <20191112141038.19213-1-fw@strlen.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Message-ID-Hash: Z5AG6TAMVTRYB2N4I7IAOMMQLAXPO57E X-Message-ID-Hash: Z5AG6TAMVTRYB2N4I7IAOMMQLAXPO57E X-MailFrom: fw@breakpoint.cc X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH v2 0/4] mptcp: add and use wmem_queued accounting List-Id: Discussions regarding MPTCP upstreaming <mptcp.lists.01.org> Archived-At: <https://lists.01.org/hyperkitty/list/mptcp@lists.01.org/message/Z5AG6TAMVTRYB2N4I7IAOMMQLAXPO57E/> List-Archive: <https://lists.01.org/hyperkitty/list/mptcp@lists.01.org/> List-Help: <mailto:mptcp-request@lists.01.org?subject=help> List-Post: <mailto:mptcp@lists.01.org> List-Subscribe: <mailto:mptcp-join@lists.01.org> List-Unsubscribe: <mailto:mptcp-leave@lists.01.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
This is v2 of the wmem accouting patch set. I've dropped the ack_seq patches, we can resurrect them later on if needed. After adding wmem thresholds, mptcp can deadlock at connection level when both sides call write() at the same time and sndbuf is exhausted. This won't happen in the selftests because it only sends small amounts of data at a time and will always call read() if data is available. It could happen with code that sends large amount of data at once though, or when sndbuf is reduced via setsockopt: Unlike TCP, which acknowledges in-sequence bytes queued to the socket, MPTCP updates its ack_seq only when recv() is called. In case both peers are blocked in write, no updates of the mptcp ack sequence space occurs. This in turn can prevent both peers from making any progress: even if all data is queued on the peer, it will look like no data arrived and thus no wmem can be freed up for the write() to complete. Resolving this will need more work to get pushed into the data_ready callback, which is hard because of need to synchronize with other subflows used by same mptcp socket. The following changes since commit 6e61dd3c078fe69ac2e442a9251d771a61dcc62f: subflow: wake parent mptcp socket on subflow state change (2019-11-08 15:22:58 +0000) are available in the Git repository at: git://git.breakpoint.cc/fw/mptcp-next.git wmem_acct_06 for you to fetch changes up to eea081f8828bbe2c503873319374a7666c6b6af2: sendmsg: block until mptcp sk is writeable (2019-11-12 14:53:29 +0100) ---------------------------------------------------------------- Florian Westphal (4): mptcp: add wmem_queued accounting mptcp: allow partial cleaning of rtx head dfrag mptcp: add and use mptcp RTX flag sendmsg: block until mptcp sk is writeable net/mptcp/options.c | 2 +- net/mptcp/protocol.c | 77 +++++++++++++++++++++++++++++++++++++++++++++------- net/mptcp/protocol.h | 3 +- 3 files changed, 70 insertions(+), 12 deletions(-)