From nobody Thu Sep 18 11:16:37 2025 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:cbb9:0:0:0:0:0 with SMTP id v25csp690166jap; Thu, 16 Dec 2021 14:24:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoUms5NVQiSg+EsefIpSYFzv8vleNjK0zutlI5492BZ3Hw8XJ5973nW9/lRxFENkiw8pNj X-Received: by 2002:a05:620a:148a:: with SMTP id w10mr112738qkj.277.1639693459207; Thu, 16 Dec 2021 14:24:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639693459; cv=none; d=google.com; s=arc-20160816; b=FG9aUiNuliTjnVBdqV6jM1mjV3ZBvmJtNKrKOn7+fqHJ/tIbsoJ6VH4mAX7v/dxytt QI9gfLe4f+vOoW5iRvuHT+a8Y4Fsjho2/neP84+iQQ/GxEtI+gJGxz+UWfpcfMJy8vVD CXmudIpCkSa3e98nb0teCQIPV6gn/IrxoF+mj2kNR8LUwLqVLxIvUmP+d6/MZXY1cGvT 8WbJAbacATQ0dJ7fcKaf7bAa8u50BNaH2dI6AvsDMR0VjQPG04zIXT25ZdQHZrAg22vy S9U69+qRdWS173sbCWrhIhAQXERgaiExwsDPNOp3EUHLmSTXC/2S/RSWGEs+aRApk9Pb 8aow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=T++lmI+jAgKo3cMNp4OP6DPo3ZI0DcDn6sR8dtLHJO0=; b=J4LfNDzN+oQFLYwSfAadlE607Wif9DvFBD3QqolvVQmAWBD9PHXCg9ZOOz6UGDFoAr C/tuuCzIv11TScS1GgdSsX6mQU/VSTRq/qqLRuX7B/u/FFp+rMqOCKVt5LENl8h9Q4vQ cC1h8VDWpxQ84HnlLvXtp1i/z+Pl2ECy0IMiTDE3vlA606LDZ3gzFfbFOqH6YVKjSL+1 mcY5b6kbGSTxtqMYVN4712tekb26bi25J/qVIZlqQZYPAXk9sYyzDCQeTY/QU41RL1sH +0ugvINg7yFPJ+284SL/87dUA2CkFtObcdryXcCJQPygX785VNPQs6RH07Y4R7rVwj57 cXew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RuqrBTzb; spf=pass (google.com: domain of mptcp+bounces-2798-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-2798-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ewr.edge.kernel.org (ewr.edge.kernel.org. [147.75.197.195]) by mx.google.com with ESMTPS id l16si3232313qtx.512.2021.12.16.14.24.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Dec 2021 14:24:19 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-2798-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) client-ip=147.75.197.195; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RuqrBTzb; spf=pass (google.com: domain of mptcp+bounces-2798-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-2798-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ewr.edge.kernel.org (Postfix) with ESMTPS id E366F1C0BF7 for ; Thu, 16 Dec 2021 22:24:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1ADC2CBC; Thu, 16 Dec 2021 22:24:15 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E1742CA7 for ; Thu, 16 Dec 2021 22:24:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1639693454; x=1671229454; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=aEwIQ8vPLJ/R6VD0AWYzWBRGIQKZiSeVS5swWA/ksAU=; b=RuqrBTzbcCfbtgqu9e9kqsxUmdaMlXstq/st4+f7UsaF2kQZbVna4a6l +arzRzJ1JJt6lMEbRmQFU1POYh5Eetdlcyll0bBNn+yhfueMZY3Q/0HeO 2omq4/uGijDHqZFGMR/Hg+k6zBcn+b9fZtBFeOCMhzhtZuWAg5b/+Z/Zd MTkdF/Z23NaJxgtk41PFxKQFwXi17RiMpQieOnRzTKKX6jeDkwtMKTdmk 0EjLbgEsQoFshct5nP3rYLT1Ckiwu3PBZ0rEUdaujwn11RarKaUiszgx+ i/iW09sNXlqIfO70tqJdASl88u/Sm0gAGuqvx7l1nVebzZw2GsNIRy/rg Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10200"; a="300393159" X-IronPort-AV: E=Sophos;i="5.88,212,1635231600"; d="scan'208";a="300393159" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2021 14:24:10 -0800 X-IronPort-AV: E=Sophos;i="5.88,212,1635231600"; d="scan'208";a="519461232" Received: from otc-tsn-4.jf.intel.com ([10.23.153.135]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2021 14:24:10 -0800 From: Kishen Maloor To: kishen.maloor@intel.com, mptcp@lists.linux.dev Subject: [PATCH mptcp-next 04/21] mptcp: establish subflows from either end of connection Date: Thu, 16 Dec 2021 17:22:57 -0500 Message-Id: <20211216222314.1244708-5-kishen.maloor@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211216222314.1244708-1-kishen.maloor@intel.com> References: <20211216222314.1244708-1-kishen.maloor@intel.com> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This change updates internal logic to permit subflows to be established from either the client or server ends of MPTCP connections. This symmetry and added flexibility may be harnessed by PM implementations running on either end in creating new subflows. The essence of this change lies in not relying on the "server_side" flag (which continues to be available if needed). Signed-off-by: Kishen Maloor --- net/mptcp/options.c | 3 +-- net/mptcp/protocol.c | 5 +---- net/mptcp/protocol.h | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index cceba8c7806d..ee13bb46dc38 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -920,8 +920,7 @@ static bool check_fully_established(struct mptcp_sock *= msk, struct sock *ssk, */ if (TCP_SKB_CB(skb)->seq =3D=3D subflow->ssn_offset + 1 && TCP_SKB_CB(skb)->end_seq =3D=3D TCP_SKB_CB(skb)->seq && - subflow->mp_join && (mp_opt->suboptions & OPTIONS_MPTCP_MPJ) && - READ_ONCE(msk->pm.server_side)) + subflow->mp_join && (mp_opt->suboptions & OPTIONS_MPTCP_MPJ)) tcp_send_ack(ssk); goto fully_established; } diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 4012f844eec1..408a05bff633 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -3248,15 +3248,12 @@ bool mptcp_finish_join(struct sock *ssk) return false; } =20 - if (!msk->pm.server_side) + if (!list_empty(&subflow->node)) goto out; =20 if (!mptcp_pm_allow_new_subflow(msk)) goto err_prohibited; =20 - if (WARN_ON_ONCE(!list_empty(&subflow->node))) - goto err_prohibited; - /* active connections are already on conn_list. * If we can't acquire msk socket lock here, let the release callback * handle it diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index e2a67d3469f6..c50247673c7e 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -908,10 +908,8 @@ static inline bool mptcp_check_infinite_map(struct sk_= buff *skb) static inline bool subflow_simultaneous_connect(struct sock *sk) { struct mptcp_subflow_context *subflow =3D mptcp_subflow_ctx(sk); - struct sock *parent =3D subflow->conn; =20 return sk->sk_state =3D=3D TCP_ESTABLISHED && - !mptcp_sk(parent)->pm.server_side && !subflow->conn_finished; } =20 --=20 2.31.1