From patchwork Wed Mar 31 00:08:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mat Martineau X-Patchwork-Id: 12174019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8408DC433E5 for ; Wed, 31 Mar 2021 00:10:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61C89619EB for ; Wed, 31 Mar 2021 00:10:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232698AbhCaAJj (ORCPT ); Tue, 30 Mar 2021 20:09:39 -0400 Received: from mga05.intel.com ([192.55.52.43]:14824 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232126AbhCaAJD (ORCPT ); Tue, 30 Mar 2021 20:09:03 -0400 IronPort-SDR: rG+uykrdJWvTlSZM8AMLvcli4jjcKNLcQQz02RT0m3Vy7ciV6veTJhLfangJDJ0D/acVK4AlcH HfQgdMQTt6KQ== X-IronPort-AV: E=McAfee;i="6000,8403,9939"; a="277058936" X-IronPort-AV: E=Sophos;i="5.81,291,1610438400"; d="scan'208";a="277058936" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 17:09:02 -0700 IronPort-SDR: apdnE05499dGXG109FX7WOBxbbi50nRzgByR9gZNyzzFxz1nlt6Lu4nRdq27Z3JWb2MtQZRs3p s8qvrysos7Rg== X-IronPort-AV: E=Sophos;i="5.81,291,1610438400"; d="scan'208";a="378682555" Received: from mjmartin-desk2.amr.corp.intel.com (HELO mjmartin-desk2.intel.com) ([10.251.25.43]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 17:09:01 -0700 From: Mat Martineau To: netdev@vger.kernel.org Cc: Mat Martineau , davem@davemloft.net, kuba@kernel.org, matthieu.baerts@tessares.net, mptcp@lists.linux.dev Subject: [PATCH net-next 0/6] MPTCP: Allow initial subflow to be disconnected Date: Tue, 30 Mar 2021 17:08:50 -0700 Message-Id: <20210331000856.117636-1-mathew.j.martineau@linux.intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org An MPTCP connection is aggregated from multiple TCP subflows, and can involve multiple IP addresses on either peer. The addresses used in the initial subflow connection are assigned address id 0 on each side of the link. More addresses can be added and shared with the peer using address IDs of 1 or larger. MPTCP in Linux shares non-zero address IDs across all MPTCP connections in a net namespace, which allows userspace to manage subflow connections across a number of sockets. However, this makes the address with id 0 a special case, since the IP address associated with id 0 is potentially different for each socket. This patch set allows the initial subflow to be disconnected when userspace specifies an address to remove using both id 0 and an IP address, or when the peer sends an RM_ADDR for id 0. Patches 1 and 3 implement the change for requests from the peer and userspace, respectively. Patch 2 consolidates some code for disconnecting subflows. Patches 4-6 update the self tests to cover removal of subflows using address id 0. Geliang Tang (5): mptcp: remove all subflows involving id 0 address mptcp: unify RM_ADDR and RM_SUBFLOW receiving mptcp: remove id 0 address selftests: mptcp: add addr argument for del_addr selftests: mptcp: remove id 0 address testcases Matthieu Baerts (1): selftests: mptcp: avoid calling pm_nl_ctl with bad IDs net/mptcp/pm_netlink.c | 129 +++++++++++------- .../testing/selftests/net/mptcp/mptcp_join.sh | 35 ++++- .../testing/selftests/net/mptcp/pm_netlink.sh | 6 +- tools/testing/selftests/net/mptcp/pm_nl_ctl.c | 34 ++++- 4 files changed, 143 insertions(+), 61 deletions(-) base-commit: cda1893e9f7c1d78e391dbb6ef1798cd32354113