From patchwork Thu Nov 14 17:32:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 1194989 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=198.145.21.10; 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 [198.145.21.10]) (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 47DSwl21Rmz9sP6 for ; Fri, 15 Nov 2019 04:22:47 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 044AA100EEBB6; Thu, 14 Nov 2019 09:24:14 -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 51B36100EE8CD for ; Thu, 14 Nov 2019 09:24:12 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1iVIpN-00062A-MV; Thu, 14 Nov 2019 18:22:41 +0100 From: Florian Westphal To: Cc: Florian Westphal Date: Thu, 14 Nov 2019 18:32:18 +0100 Message-Id: <20191114173225.21199-8-fw@strlen.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191114173225.21199-1-fw@strlen.de> References: <20191114173225.21199-1-fw@strlen.de> MIME-Version: 1.0 Message-ID-Hash: ZFLOZ5JYI46WMRJ27YTDUHI5TFF6J445 X-Message-ID-Hash: ZFLOZ5JYI46WMRJ27YTDUHI5TFF6J445 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 07/14] subflow: sk_data_ready: make wakeup on tcp sock conditional List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: No need for this unless we don't have a parent or the socket is not mp capable. Only the mptcp socket will be waiting for events. In case the mptcp socket connected to a tcp-only peer, we're in fallback mode and need to wakeup the parent too. Signed-off-by: Florian Westphal --- net/mptcp/subflow.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index ff38d54392cd..976e49349276 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -646,10 +646,13 @@ static void subflow_data_ready(struct sock *sk) struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(sk); struct sock *parent = subflow->conn; - subflow->tcp_sk_data_ready(sk); + if (!parent || !(subflow->mp_capable || subflow->mp_join)) { + subflow->tcp_sk_data_ready(sk); - if (!parent || !(subflow->mp_capable || subflow->mp_join)) + if (parent) + parent->sk_data_ready(parent); return; + } /* always propagate the EoF */ if (mptcp_subflow_data_available(sk) || subflow->rx_eof) {