| Message ID | 20191114173225.21199-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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47DSwH3G3cz9sPF for <incoming@patchwork.ozlabs.org>; Fri, 15 Nov 2019 04:22:22 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B5019100EE8CF; Thu, 14 Nov 2019 09:23:46 -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 CD426100EE8CD for <mptcp@lists.01.org>; Thu, 14 Nov 2019 09:23:44 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from <fw@breakpoint.cc>) id 1iVIou-00061D-KK; Thu, 14 Nov 2019 18:22:12 +0100 From: Florian Westphal <fw@strlen.de> To: <mptcp@lists.01.org> Date: Thu, 14 Nov 2019 18:32:11 +0100 Message-Id: <20191114173225.21199-1-fw@strlen.de> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Message-ID-Hash: DRZ6JPRXBSJJMA4WE4JOEH3ES7GD7632 X-Message-ID-Hash: DRZ6JPRXBSJJMA4WE4JOEH3ES7GD7632 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] [RFC] mptcp: wmem accounting and nonblocking io support List-Id: Discussions regarding MPTCP upstreaming <mptcp.lists.01.org> Archived-At: <https://lists.01.org/hyperkitty/list/mptcp@lists.01.org/message/DRZ6JPRXBSJJMA4WE4JOEH3ES7GD7632/> 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 |
| Series |
[RFC] mptcp: wmem accounting and nonblocking io support
|
expand
|
This (large, sigh) series fixes poll handling in mptcp. The first patch extends the test suite with a mmap-based mode to check large, blocking writes. This uncovered a minor problem with the earlier v2 wmem accounting patch series -- we would happily take a lot more data than sndbuf allowed, as we only limited based on what the subflow could accept. So with a 4k sndbuf we could easily accept 256kb or even more. This patch doesn't change anything in the test suite behaviour however, you need to use "-b 4096" and/or "-m mmap" to enable this mode. Second patch changes test suite to move to nonblocking io, this breaks mptcp because mptcp_poll can signal EPOLLIN when it shouldn't, so userspace gets -EAGAIN even though poll told it otherwise. Patches 3/4/5/6 are an update vs. last wmem accounting series. Remaining patches fix the nonblocking io behaviour. mptcp_poll is made to be stand-alone, i.e. it no longer calls __tcp_poll on the subflow sockets and only considers mptcp_sk state. After this series the selftest works again and mptcp sk rtx queue is limited by msk wmem. The patches can't easily be rebased/merged so I propose that I would squash this myself and send a pull request when done. The following changes since commit d1dbb32dc58df543e89f4004c1a0b96fe8acf99b: subflow: wake parent mptcp socket on subflow state change (2019-11-14 13:03:44 +0000) are available in the Git repository at: git://git.breakpoint.cc/fw/mptcp-next.git tcp_poll_removal_06 for you to fetch changes up to fa583a84bcf9550783ac6a229ab584d68764659e: sendmsg: truncate source buffer if mptcp sndbuf size was set from userspace (2019-11-14 17:56:13 +0100) ---------------------------------------------------------------- Florian Westphal (14): selftest: add mmap-write support selftests: make sockets non-blocking for default poll mode 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 subflow: sk_data_ready: make wakeup on tcp sock conditional mptcp: add and use mptcp_subflow_get_retrans mptcp: sendmsg: transmit on backup if other subflows have been closed recv: make DATA_READY reflect ssk in-sequence state sendmsg: clear SEND_SPACE if write caused wmem to grow too large mptcp_poll: don't consider subflow socket state anymore sendmsg: don't restart mptcp_sendmsg_frag sendmsg: truncate source buffer if mptcp sndbuf size was set from userspace net/mptcp/options.c | 2 +- net/mptcp/protocol.c | 295 ++++++++++++++++----- net/mptcp/protocol.h | 4 +- net/mptcp/subflow.c | 12 +- tools/testing/selftests/net/mptcp/mptcp_connect.c | 268 ++++++++++++++++++- tools/testing/selftests/net/mptcp/mptcp_connect.sh | 36 ++- 6 files changed, 544 insertions(+), 73 deletions(-)