From patchwork Tue May 28 08:09:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13676264 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 58E5A13C67E; Tue, 28 May 2024 08:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716883792; cv=none; b=BMqGZi1vLO/aULWsg3aAu70ahzWNXpTigLEOiJU8FDxXErJ0UUFLZFBjzBune0QxkNGmAGyBHz8Xs7woOMw9MzaALVIaFSaxxsqM/yphsIBr14Lk9UywdrxRowJLTZiHvWLS81vWcjptp560rKB0b592RbYCUsKlNZuZGco4GDg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716883792; c=relaxed/simple; bh=ypvHqt2ffZwH1g8JlbofDCv9yboiuwJHzR7LWZNKd+E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=exDomITBjs7JY0UGtNIMTc9IY+IuKAiHf451rfB4oD6mvm5h6yaho6Un6yKi73pxSSbsqSJPbI9y8ZuHkgELzlZ5jC55ssZPao0vgDQwOmWj/hXLjA/y+yxnsqI4cCO7SkQMzx6e5ud3V52DAmmuZ35o8zFzgA85JTFUY58Sm6M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FHD8dPJr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FHD8dPJr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51616C32789; Tue, 28 May 2024 08:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716883792; bh=ypvHqt2ffZwH1g8JlbofDCv9yboiuwJHzR7LWZNKd+E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=FHD8dPJrkIedrPr2ZLzENUKkss6el7EBxtCxM0dYHf2ioMNvTvsvLY5aL7dicFBr9 L6DzlmhLlabqbNKUl4BMHiwaC+DJGxscW9l/4L9LB8VDGW7iWhv/ouN7EwIlAhzmyT DuQoHNbvQjRHmBZrYC7/ewX/C5Z/y2yZQtpP5IKpbp9Lhnr/N2qaRXQXLo3zVmNd79 +fRmoXqD+YTj7gjFNXE36rt8kANUPw1gVLm/oZj8Kbi82tVKrFUd7ZUmKBPJnvUsC0 A0kcTXe+wpKAEXzf6s72ZFRSyi7NI4dr7cu4dUinA9iu3z0gVnstaGt3VRDANCbKGl JWZkxdXZQcuxw== From: "Matthieu Baerts (NGI0)" Date: Tue, 28 May 2024 10:09:16 +0200 Subject: [PATCH net-next v2 1/3] doc: mptcp: add missing 'available_schedulers' entry Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240528-upstream-net-20240520-mptcp-doc-v2-1-47f2d5bc2ef3@kernel.org> References: <20240528-upstream-net-20240520-mptcp-doc-v2-0-47f2d5bc2ef3@kernel.org> In-Reply-To: <20240528-upstream-net-20240520-mptcp-doc-v2-0-47f2d5bc2ef3@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Gregory Detal Cc: netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=988; i=matttbe@kernel.org; h=from:subject:message-id; bh=ypvHqt2ffZwH1g8JlbofDCv9yboiuwJHzR7LWZNKd+E=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmVZFJaOG04fvPLvTYzxtN8Ki19Diwh+A7MKxRR bKX1m43r8aJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZlWRSQAKCRD2t4JPQmmg c8UgD/0eNQevwisbxtTVx9sq4RHlKlcaxBf2kxGg/3YZo2OYJoemJEpXc8H5f64drtEglIEGXtX Lpjq2OTZT5SVOKYa6rLrnXI7xwsOUn2gwmzXcKM688xJExJZRdJ1Zex+Unr01KSQ3vTesEd+Mwm vOJ33Og+nuYA2N/RDRnFEHFi70DFBBjc1v2U+U9Okl4a42adO+1+LNuKeE1J4t3li7XgozHA57d pCPrrU6V8ncSw3eLxrWP133GoIZSK2iHp9xoE7XAvvTzy3whWzguLAs8IYIYfaXIs8Tbu1zZ0vq eCjM1Keu8WMR/ypKN1Plgd19Dt8+TMVWM/RL4LFSTndNNnS1uM8iLAYg75s+lzXTyM8aSr4dx75 OvHKh23JYvlGTYiJJjRXpb+pgIzk5fCXvGw2vYrpeYLRk0JPO5kVygdDHq5mcKiCIYK6109Ry4f Ay04VBycLrAgEThQQJC2w7TcEaeokvZYzAFKVs1ppEF1LesFglxsN8hoV1bqEB/H/GQUlI9wd7x /5r4tGtkKhzpxTyQjrnmhwWD5lqCRXz5RoVlDpBrwbBjUjTKRqjxR6N86l7SxAGQOAbNidqgYN4 ZsIBvead2uKHZjd1+urNYBJX072uGDF4xMABWc8hL+jI71Kzp6k8pdrMVOR1fLl7I0xkcl831Jt Z9u9eqyqwSosdow== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org This sysctl knob has been added recently, but the documentation has not been updated. This knob is used to show the available schedulers choices that are registered, similar to 'net.ipv4.tcp_available_congestion_control'. Fixes: 73c900aa3660 ("mptcp: add net.mptcp.available_schedulers") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- Documentation/networking/mptcp-sysctl.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/networking/mptcp-sysctl.rst b/Documentation/networking/mptcp-sysctl.rst index 69975ce25a02..102a45e7bfa8 100644 --- a/Documentation/networking/mptcp-sysctl.rst +++ b/Documentation/networking/mptcp-sysctl.rst @@ -93,3 +93,7 @@ scheduler - STRING sysctl. Default: "default" + +available_schedulers - STRING + Shows the available schedulers choices that are registered. More packet + schedulers may be available, but not loaded. From patchwork Tue May 28 08:09:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13676265 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 941D013CA8C; Tue, 28 May 2024 08:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716883795; cv=none; b=Z4xOEnDGhd6ipbjAYiiCDN0j6vF2SjvOSNepsJeXMf55BbAzEaZRrhlUKDBqUP7DXEy0tzjg0q9aIQxlBJkdaXQoept2uejvVoGfpT0WxdheTFVSMNEKgz1HzxofedvYXeLlKczQX9PlAjuBH7NR0VIVmqbZJ5t9ZoBXpSzb5Ng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716883795; c=relaxed/simple; bh=l9P1LJpRFXGmNv34bk5f33fH/TJc9InrPPq2VO+kELI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L67Id9yoH5EufZsfrKbD4HE5EDECIxeSFVhGemSWgF6NbkPpzFgIsHVZgdzNeAM3jKgZvCVT4PgM5t2psWrLWluNOnrEjPT1qfG6ng06/5vJ1AJxaxaAWCXAzJKBEb8bj8Z54k7nJzx1a8NrBB45pZw+XoA/STcYeEPI0qfZu1w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o+UUJ2X+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o+UUJ2X+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72787C3277B; Tue, 28 May 2024 08:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716883795; bh=l9P1LJpRFXGmNv34bk5f33fH/TJc9InrPPq2VO+kELI=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=o+UUJ2X+Ddd3/u+BWP2bEp6SHDUfX+A41UkF36j5ZF2ekhbhqxeBu1qmuM6K1IO1x U9si2FzuP/RQOtXC18l/prJJptWAZZPD0LgYG9YSdJawDoT0XjbnAQ5ZoXYWB4g+vm FLyABw9zpPowBpAo3d2LjT5NRzi5J5VWNO7D3kNuSqU+eyLwVT9wujn2Yb6CK4HtDn r3XvcywQ9/WZMjN5f85ghUtOgSj4oBpf7Ufz/qwwrKda/ub3xMVavBjU+1iv3Qij8N HWKb+11+S9La2FbVOh0dfzIn189gGwBg+m7yVN4FUM3h5LSW5cjblR2wiktcKTDBfP e2WAZLvguVgSA== From: "Matthieu Baerts (NGI0)" Date: Tue, 28 May 2024 10:09:17 +0200 Subject: [PATCH net-next v2 2/3] doc: mptcp: alphabetical order Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240528-upstream-net-20240520-mptcp-doc-v2-2-47f2d5bc2ef3@kernel.org> References: <20240528-upstream-net-20240520-mptcp-doc-v2-0-47f2d5bc2ef3@kernel.org> In-Reply-To: <20240528-upstream-net-20240520-mptcp-doc-v2-0-47f2d5bc2ef3@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Gregory Detal Cc: netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4118; i=matttbe@kernel.org; h=from:subject:message-id; bh=l9P1LJpRFXGmNv34bk5f33fH/TJc9InrPPq2VO+kELI=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmVZFJvpQlEo8NIvqve/JQBzMNRft8dpovN9fQR 6+A/4u2byKJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZlWRSQAKCRD2t4JPQmmg c5BqEACwSgEs+yF0VqbkRWNSIfkNY6OPwkp2DP1W6uHUpRM3FFTE0WFVuGTj5OtzOf2W9A8YsWl xwCXU/sCMo1B8so/+J6tzPiRVMyJ0mXWZIq28GpxpwDHCsSe1RjD/zq3sghMpVLA7f+jD9j+70n P2yUVcIGrROTXcO5scCgSQyaGIUFHqhPFxnULCsYhaJz/LGrdPeX6yH1fZ+WxA+cDgc/fj1XWGC qFDQ+bOaFUYxxVLeiWYGYoKLLdK0qbJ1yLe1Jh3v5HycQevLFVlhR6CSv8Q5U2YgWvJ+KYCMcyh nww0jBVGS3ciqOGzXM5wol0iGVQXEXzgMbdlNNvlUELSfKmrLnjgiXtWnbctvppMq9jUpqRpU+m 4TUGCVHhJak/p9tW+HU3GbOHmOpkbW0nTqy8VPf7fIWhKb3GAEKnXcoi5VC7xE4zT7ii7oV/atz b6mYSdPgSFXzkOQ860zSHVpTc1ouxdNC/1dgTFG44R2NVHsxvj2aFYnQGJLUjdNsKyWWQzfefn+ RHndvLn1/oXHhS6i3HvvwD3uqiMB49s7BHzEanXNNO7kcZ0fCYDHflEeUQE4BAjiGOskFCJmfCq IKW7VK+XYYjx7muQxK6EDUuapZsoDr2GZxq6h73VEmlktzcZd+JlSAsAdVd0Tzny8VbfhkZl//f APYzihGRTjTR13A== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org Similar to what is done in other 'sysctl' pages: it looks clearer from a readability perspective. This might cause troubles in the short/mid-term with the backports, but by not putting new entries at the end, this can help to reduce conflicts in case of backports in the long term. We don't change the information here too often, so it looks OK to do that. Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- Documentation/networking/mptcp-sysctl.rst | 78 +++++++++++++++---------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/Documentation/networking/mptcp-sysctl.rst b/Documentation/networking/mptcp-sysctl.rst index 102a45e7bfa8..fd514bba8c43 100644 --- a/Documentation/networking/mptcp-sysctl.rst +++ b/Documentation/networking/mptcp-sysctl.rst @@ -7,14 +7,6 @@ MPTCP Sysfs variables /proc/sys/net/mptcp/* Variables =============================== -enabled - BOOLEAN - Control whether MPTCP sockets can be created. - - MPTCP sockets can be created if the value is 1. This is a - per-namespace sysctl. - - Default: 1 (enabled) - add_addr_timeout - INTEGER (seconds) Set the timeout after which an ADD_ADDR control message will be resent to an MPTCP peer that has not acknowledged a previous @@ -25,25 +17,6 @@ add_addr_timeout - INTEGER (seconds) Default: 120 -close_timeout - INTEGER (seconds) - Set the make-after-break timeout: in absence of any close or - shutdown syscall, MPTCP sockets will maintain the status - unchanged for such time, after the last subflow removal, before - moving to TCP_CLOSE. - - The default value matches TCP_TIMEWAIT_LEN. This is a per-namespace - sysctl. - - Default: 60 - -checksum_enabled - BOOLEAN - Control whether DSS checksum can be enabled. - - DSS checksum can be enabled if the value is nonzero. This is a - per-namespace sysctl. - - Default: 0 - allow_join_initial_addr_port - BOOLEAN Allow peers to send join requests to the IP address and port number used by the initial subflow if the value is 1. This controls a flag that is @@ -57,6 +30,37 @@ allow_join_initial_addr_port - BOOLEAN Default: 1 +available_schedulers - STRING + Shows the available schedulers choices that are registered. More packet + schedulers may be available, but not loaded. + +checksum_enabled - BOOLEAN + Control whether DSS checksum can be enabled. + + DSS checksum can be enabled if the value is nonzero. This is a + per-namespace sysctl. + + Default: 0 + +close_timeout - INTEGER (seconds) + Set the make-after-break timeout: in absence of any close or + shutdown syscall, MPTCP sockets will maintain the status + unchanged for such time, after the last subflow removal, before + moving to TCP_CLOSE. + + The default value matches TCP_TIMEWAIT_LEN. This is a per-namespace + sysctl. + + Default: 60 + +enabled - BOOLEAN + Control whether MPTCP sockets can be created. + + MPTCP sockets can be created if the value is 1. This is a + per-namespace sysctl. + + Default: 1 (enabled) + pm_type - INTEGER Set the default path manager type to use for each new MPTCP socket. In-kernel path management will control subflow @@ -74,6 +78,14 @@ pm_type - INTEGER Default: 0 +scheduler - STRING + Select the scheduler of your choice. + + Support for selection of different schedulers. This is a per-namespace + sysctl. + + Default: "default" + stale_loss_cnt - INTEGER The number of MPTCP-level retransmission intervals with no traffic and pending outstanding data on a given subflow required to declare it stale. @@ -85,15 +97,3 @@ stale_loss_cnt - INTEGER This is a per-namespace sysctl. Default: 4 - -scheduler - STRING - Select the scheduler of your choice. - - Support for selection of different schedulers. This is a per-namespace - sysctl. - - Default: "default" - -available_schedulers - STRING - Shows the available schedulers choices that are registered. More packet - schedulers may be available, but not loaded. From patchwork Tue May 28 08:09:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Baerts X-Patchwork-Id: 13676266 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C229C13D509; Tue, 28 May 2024 08:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716883798; cv=none; b=Hkv3gVY8diotrhJyEeIqdgHLzQgCPL9MEvyZTxnEig74z+aatG3hykQMvRkFe3hhQiWZ1Gs/aXN30cK/+otwUqKRI/zkQUKge2MGmSCeP9gdjxcsYyBONuyTg3POhaPQtYrQwT+XPFxw6/dt3mrzTJrC5w9XZTTem0HeKWmJjws= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716883798; c=relaxed/simple; bh=qKXzA71iQazzuaFwaRvE/GV0og5PaxKwQ3vjJNhpXjE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KGvq2cNr7Mea9B4H75LctpXaHkqXtVrJssRhQZq9tOtI+dLq7EvX6GHazvW+wLcJYUmAtSru6oIVXW0J8Hr2r3t+meX9LyrNXI8mo41sWJk/RmqmD+/w/eF+aHP/RrHzzmRukrgEKLAoXc6ZzHfsuhmuB6zrZ1h1l++t1tx06kc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W35IUspS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W35IUspS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94BCCC4AF11; Tue, 28 May 2024 08:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716883798; bh=qKXzA71iQazzuaFwaRvE/GV0og5PaxKwQ3vjJNhpXjE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=W35IUspSwyuF49bxl1m5dcTOkoeHnbXPJ3p9muwi4d4kcF9r/pgB5Ri8i+btv10iw GUBjeZVdikxX8DuobP9ePw/nWC0xIqrLlkqOyiE5YomEB4V/ItlZ8XQzuAwbwfKVLI FJfNz0RSxJ125oVtddeqjcFYcwBTWvHZTW6PFrNZ7ZE0z44c5fDSE6CwHXBezhF/Nc qgD5djV1g1+4AVt5IvuPYgJ5wnEq8hg4ERzKLG4xLTHbHQtfLWwURyvfft3q9tj/Fe cdsyQ1nt7unpHQ/GEC1tgQMuDfOwfaXw8GcUM00H8TfBXzshB3/zkEmrztb7iiTMFn plSc4SNzLPyDA== From: "Matthieu Baerts (NGI0)" Date: Tue, 28 May 2024 10:09:18 +0200 Subject: [PATCH net-next v2 3/3] doc: new 'mptcp' page in 'networking' Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240528-upstream-net-20240520-mptcp-doc-v2-3-47f2d5bc2ef3@kernel.org> References: <20240528-upstream-net-20240520-mptcp-doc-v2-0-47f2d5bc2ef3@kernel.org> In-Reply-To: <20240528-upstream-net-20240520-mptcp-doc-v2-0-47f2d5bc2ef3@kernel.org> To: mptcp@lists.linux.dev, Mat Martineau , Geliang Tang , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Gregory Detal Cc: netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, "Matthieu Baerts (NGI0)" X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=8617; i=matttbe@kernel.org; h=from:subject:message-id; bh=qKXzA71iQazzuaFwaRvE/GV0og5PaxKwQ3vjJNhpXjE=; b=owEBbQKS/ZANAwAIAfa3gk9CaaBzAcsmYgBmVZFJFGQixHB6d3jeu0DsGyE7HJqOJjptlAB5J WRZ01yikteJAjMEAAEIAB0WIQToy4X3aHcFem4n93r2t4JPQmmgcwUCZlWRSQAKCRD2t4JPQmmg cxm3EACBfK5oHE9qdXvOHHqk5OMxscBfnKth+55JAtsGifWCH69VD+nCLOaT+V9INOKOBfHptCP vQIcaFMzcu2DZXhM6xU0dsc/F3jQxp9Y/SO1FsXsW9ktsak8m6r9AOYWBgCS34aOSD2ptGk4PGX Wqu7YbY8FHFAzJHWSP3lE+Pllx99cK5OTGVAYEbhq+TOirPeXxTlj+lOpjN8qdMs/W9pc1w/5mm 1HqkbuSGMtJdRBisActQhuJUCSQAMZJSCqcEY/1m8NasXkbUt2gXwqBA2snYFqzI0801X79lWt8 Bh343rI5VB1yN4fKs8hxca5TXby5kDIU/l4OKeaScUoSE2NEqVXlgOQS3dox501MMEXIeJ7VCGj CXxhrAjlKhWsTzzgFY+i/HZkEWDu+d1efM1v/LpZr1hSPkxzdxY9y4cHw46wYeM94r/3I0jsfEd tdBmOwJPlTKNvphQsT0uMnXP/IV+wjGhf7padDtLVQW+jBPOYQFAmm4Ocswd/QgAtf6vqZgvcpI AeOdV961eTWCIVytsB6XICzIhVCEGl8ced1voP4W/ZcCvGlQh1eCTU4CMFvxQP6PBDGUVtUvL12 QM8rvNinP6ICHqgjizU0h8z38yFUNz0fJGOzR7ZdQ4bROSpH1C9peOManvgUnWO9b9/qtcAg/YZ oCdyGXpZh44XLCA== X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 X-Patchwork-Delegate: kuba@kernel.org A general documentation about MPTCP was missing since its introduction in v5.6. Most of what is there comes from our recently updated mptcp.dev website, with additional links to resources from the kernel documentation. This is a first version, mainly targeting app developers and users. Link: https://www.mptcp.dev Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) --- Notes: - v2: - Fix mptcp.dev link syntax. --- Documentation/networking/index.rst | 1 + Documentation/networking/mptcp.rst | 156 +++++++++++++++++++++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 158 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/index.rst b/Documentation/networking/index.rst index 7664c0bfe461..a6443851a142 100644 --- a/Documentation/networking/index.rst +++ b/Documentation/networking/index.rst @@ -72,6 +72,7 @@ Contents: mac80211-injection mctp mpls-sysctl + mptcp mptcp-sysctl multiqueue multi-pf-netdev diff --git a/Documentation/networking/mptcp.rst b/Documentation/networking/mptcp.rst new file mode 100644 index 000000000000..ee0ae68ca271 --- /dev/null +++ b/Documentation/networking/mptcp.rst @@ -0,0 +1,156 @@ +.. SPDX-License-Identifier: GPL-2.0 + +===================== +Multipath TCP (MPTCP) +===================== + +Introduction +============ + +Multipath TCP or MPTCP is an extension to the standard TCP and is described in +`RFC 8684 (MPTCPv1) `_. It allows a +device to make use of multiple interfaces at once to send and receive TCP +packets over a single MPTCP connection. MPTCP can aggregate the bandwidth of +multiple interfaces or prefer the one with the lowest latency, it also allows a +fail-over if one path is down, and the traffic is seamlessly reinjected on other +paths. + +For more details about Multipath TCP in the Linux kernel, please see the +official website: `mptcp.dev `_. + + +Use cases +========= + +Thanks to MPTCP, being able to use multiple paths in parallel or simultaneously +brings new use-cases, compared to TCP: + +- Seamless handovers: switching from one path to another while preserving + established connections, e.g. to be used in mobility use-cases, like on + smartphones. +- Best network selection: using the "best" available path depending on some + conditions, e.g. latency, losses, cost, bandwidth, etc. +- Network aggregation: using multiple paths at the same time to have a higher + throughput, e.g. to combine fixed and mobile networks to send files faster. + + +Concepts +======== + +Technically, when a new socket is created with the ``IPPROTO_MPTCP`` protocol +(Linux-specific), a *subflow* (or *path*) is created. This *subflow* consists of +a regular TCP connection that is used to transmit data through one interface. +Additional *subflows* can be negotiated later between the hosts. For the remote +host to be able to detect the use of MPTCP, a new field is added to the TCP +*option* field of the underlying TCP *subflow*. This field contains, amongst +other things, a ``MP_CAPABLE`` option that tells the other host to use MPTCP if +it is supported. If the remote host or any middlebox in between does not support +it, the returned ``SYN+ACK`` packet will not contain MPTCP options in the TCP +*option* field. In that case, the connection will be "downgraded" to plain TCP, +and it will continue with a single path. + +This behavior is made possible by two internal components: the path manager, and +the packet scheduler. + +Path Manager +------------ + +The Path Manager is in charge of *subflows*, from creation to deletion, and also +address announcements. Typically, it is the client side that initiates subflows, +and the server side that announces additional addresses via the ``ADD_ADDR`` and +``REMOVE_ADDR`` options. + +Path managers are controlled by the ``net.mptcp.pm_type`` sysctl knob -- see +mptcp-sysctl.rst. There are two types: the in-kernel one (type ``0``) where the +same rules are applied for all the connections (see: ``ip mptcp``) ; and the +userspace one (type ``1``), controlled by a userspace daemon (i.e. `mptcpd +`_) where different rules can be applied for each +connection. The path managers can be controlled via a Netlink API, see +netlink_spec/mptcp_pm.rst. + +To be able to use multiple IP addresses on a host to create multiple *subflows* +(paths), the default in-kernel MPTCP path-manager needs to know which IP +addresses can be used. This can be configured with ``ip mptcp endpoint`` for +example. + +Packet Scheduler +---------------- + +The Packet Scheduler is in charge of selecting which available *subflow(s)* to +use to send the next data packet. It can decide to maximize the use of the +available bandwidth, only to pick the path with the lower latency, or any other +policy depending on the configuration. + +Packet schedulers are controlled by the ``net.mptcp.scheduler`` sysctl knob -- +see mptcp-sysctl.rst. + + +Sockets API +=========== + +Creating MPTCP sockets +---------------------- + +On Linux, MPTCP can be used by selecting MPTCP instead of TCP when creating the +``socket``: + +.. code-block:: C + + int sd = socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP); + +Note that ``IPPROTO_MPTCP`` is defined as ``262``. + +If MPTCP is not supported, ``errno`` will be set to: + +- ``EINVAL``: (*Invalid argument*): MPTCP is not available, on kernels < 5.6. +- ``EPROTONOSUPPORT`` (*Protocol not supported*): MPTCP has not been compiled, + on kernels >= v5.6. +- ``ENOPROTOOPT`` (*Protocol not available*): MPTCP has been disabled using + ``net.mptcp.enabled`` sysctl knob, see mptcp-sysctl.rst. + +MPTCP is then opt-in: applications need to explicitly request it. Note that +applications can be forced to use MPTCP with different techniques, e.g. +``LD_PRELOAD`` (see ``mptcpize``), eBPF (see ``mptcpify``), SystemTAP, +``GODEBUG`` (``GODEBUG=multipathtcp=1``), etc. + +Switching to ``IPPROTO_MPTCP`` instead of ``IPPROTO_TCP`` should be as +transparent as possible for the userspace applications. + +Socket options +-------------- + +MPTCP supports most socket options handled by TCP. It is possible some less +common options are not supported, but contributions are welcome. + +Generally, the same value is propagated to all subflows, including the ones +created after the calls to ``setsockopt()``. eBPF can be used to set different +values per subflow. + +There are some MPTCP specific socket options at the ``SOL_MPTCP`` (284) level to +retrieve info. They fill the ``optval`` buffer of the ``getsockopt()`` system +call: + +- ``MPTCP_INFO``: Uses ``struct mptcp_info``. +- ``MPTCP_TCPINFO``: Uses ``struct mptcp_subflow_data``, followed by an array of + ``struct tcp_info``. +- ``MPTCP_SUBFLOW_ADDRS``: Uses ``struct mptcp_subflow_data``, followed by an + array of ``mptcp_subflow_addrs``. +- ``MPTCP_FULL_INFO``: Uses ``struct mptcp_full_info``, with one pointer to an + array of ``struct mptcp_subflow_info`` (including the + ``struct mptcp_subflow_addrs``), and one pointer to an array of + ``struct tcp_info``, followed by the content of ``struct mptcp_info``. + +Note that at the TCP level, ``TCP_IS_MPTCP`` socket option can be used to know +if MPTCP is currently being used: the value will be set to 1 if it is. + + +Design choices +============== + +A new socket type has been added for MPTCP for the userspace-facing socket. The +kernel is in charge of creating subflow sockets: they are TCP sockets where the +behavior is modified using TCP-ULP. + +MPTCP listen sockets will create "plain" *accepted* TCP sockets if the +connection request from the client didn't ask for MPTCP, making the performance +impact minimal when MPTCP is enabled by default. diff --git a/MAINTAINERS b/MAINTAINERS index 27367ad339ea..1a65444adb21 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15753,7 +15753,7 @@ B: https://github.com/multipath-tcp/mptcp_net-next/issues T: git https://github.com/multipath-tcp/mptcp_net-next.git export-net T: git https://github.com/multipath-tcp/mptcp_net-next.git export F: Documentation/netlink/specs/mptcp_pm.yaml -F: Documentation/networking/mptcp-sysctl.rst +F: Documentation/networking/mptcp*.rst F: include/net/mptcp.h F: include/trace/events/mptcp.h F: include/uapi/linux/mptcp*.h