From patchwork Wed Jan 15 09:10:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 1223261 X-Patchwork-Delegate: matthieu.baerts@tessares.net Return-Path: 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=) 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 47yM4F5z98z9sRV for ; Wed, 15 Jan 2020 20:10:36 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DF9BF10097DC3; Wed, 15 Jan 2020 01:13:52 -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= 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 DBBC410097DBE for ; Wed, 15 Jan 2020 01:13:50 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1ireh3-0003lK-K6; Wed, 15 Jan 2020 10:10:29 +0100 From: Florian Westphal To: Cc: Florian Westphal Date: Wed, 15 Jan 2020 10:10:23 +0100 Message-Id: <20200115091023.3187-1-fw@strlen.de> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Message-ID-Hash: QFOCME7RBYTVZDWLVBTS4JU7DIE32GL6 X-Message-ID-Hash: QFOCME7RBYTVZDWLVBTS4JU7DIE32GL6 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] protocol: add comment to smb mb List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: squashto: mptcp: add subflow write space signalling and mptcp_poll v2: also add comment to subflow_write_space. Signed-off-by: Florian Westphal --- net/mptcp/protocol.c | 1 + net/mptcp/subflow.c | 1 + 2 files changed, 2 insertions(+) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 6df4eb20916c..5dfca0aa7ce4 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -547,6 +547,7 @@ static void ssk_check_wmem(struct mptcp_sock *msk, struct sock *ssk) if (sock) { clear_bit(MPTCP_SEND_SPACE, &msk->flags); smp_mb__after_atomic(); + /* set NOSPACE only after clearing SEND_SPACE flag */ set_bit(SOCK_NOSPACE, &sock->flags); } } diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index ae9173040f17..3461789ee605 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -727,6 +727,7 @@ static void subflow_write_space(struct sock *sk) if (parent && sk_stream_is_writeable(sk)) { set_bit(MPTCP_SEND_SPACE, &mptcp_sk(parent)->flags); smp_mb__after_atomic(); + /* set SEND_SPACE before sk_stream_write_space clears NOSPACE */ sk_stream_write_space(parent); } }