From patchwork Mon Nov 18 21:45:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 1196996 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47H2b141lLz9s4Y for ; Tue, 19 Nov 2019 08:46:21 +1100 (AEDT) Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D8025100DC2A4; Mon, 18 Nov 2019 13:47:15 -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 BE6C1100DC42F for ; Mon, 18 Nov 2019 13:47:13 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1iWoqd-0008IJ-KH; Mon, 18 Nov 2019 22:46:15 +0100 From: Florian Westphal To: Cc: Florian Westphal Date: Mon, 18 Nov 2019 22:45:32 +0100 Message-Id: <20191118214538.21931-8-fw@strlen.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191118214538.21931-1-fw@strlen.de> References: <20191118214538.21931-1-fw@strlen.de> MIME-Version: 1.0 Message-ID-Hash: RFCBBBJRGVYAMRP3EYJJU3RCCQO4TWZC X-Message-ID-Hash: RFCBBBJRGVYAMRP3EYJJU3RCCQO4TWZC 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 07/13] 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) {