From 492208ab50fe4573a74b724b91e1a295e3fec5c4 Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Thu, 14 Mar 2024 11:00:59 +0100 Subject: [PATCH] kernel: enable MPTCP support The official description says: Multipath TCP (MPTCP) connections send and receive data over multiple subflows in order to utilize multiple network paths. Each subflow uses the TCP protocol, and TCP options carry header information for MPTCP. Thanks to MPTCP, being able to use multiple paths in parallel or simultaneously brings new use-cases: - Seamless handovers: switching from one path to another while preserving established connections -- Apple is using it for this reason since 2013. - Best network selection: using the "best" available path (latency, losses, cost, bandwidth) -- one path can be used as a "backup" one. - Network aggregation: using multiple paths at the same time to have a higher throughput -- e.g. to combine a fixed an mobile network to send files faster. For example, for HA, it is possible to keep a SSH connection alive when switching from one network to another (e.g. while travelling). To be able to use MPTCP, both ends need to support it. An application has to request it, by creating an MPTCP socket instead of a TCP one. The rest in unchanged. An alternative is to use 'mptcpize' tool, which relies on LD_PRELOAD to create an MPTCP socket instead of a TCP one. Note that a MPTCP-enabled server continues to accept regular TCP connections that do not use the Multipath TCP extension without any performance impact. When a connection request is received, and is linked to a listening socket with MPTCP support, the kernel will simply check if MPTCP options are present. If not, the accepted socket will be a "plain" TCP one, with the same impact as before. To use multiple paths at the same time, additional IP addresses need to be configured, e.g. via the 'ip' tool (IPRoute2). MPTCP in the kernel is enabled in most main Linux distributions (Debian, Ubuntu, RedHat, Fedora, etc.), but in more specific ones like Raspbian. It is available in the Linux kernel since v5.6. Signed-off-by: Matthieu Baerts (NGI0) --- buildroot-external/kernel/v6.1.y/hassos.config | 3 +++ buildroot-external/kernel/v6.6.y/hassos.config | 3 +++ 2 files changed, 6 insertions(+) diff --git a/buildroot-external/kernel/v6.1.y/hassos.config b/buildroot-external/kernel/v6.1.y/hassos.config index 45972db5ec0..82bea7a05a4 100644 --- a/buildroot-external/kernel/v6.1.y/hassos.config +++ b/buildroot-external/kernel/v6.1.y/hassos.config @@ -93,6 +93,9 @@ CONFIG_IP_MROUTE=y CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_MROUTE=y +CONFIG_MPTCP=y +CONFIG_MPTCP_IPV6=y + CONFIG_NF_TABLES=m CONFIG_NF_TABLES_INET=y CONFIG_NF_TABLES_NETDEV=y diff --git a/buildroot-external/kernel/v6.6.y/hassos.config b/buildroot-external/kernel/v6.6.y/hassos.config index cf3723be223..826d0b382f1 100644 --- a/buildroot-external/kernel/v6.6.y/hassos.config +++ b/buildroot-external/kernel/v6.6.y/hassos.config @@ -93,6 +93,9 @@ CONFIG_IP_MROUTE=y CONFIG_IPV6_MULTIPLE_TABLES=y CONFIG_IPV6_MROUTE=y +CONFIG_MPTCP=y +CONFIG_MPTCP_IPV6=y + CONFIG_NF_TABLES=m CONFIG_NF_TABLES_INET=y CONFIG_NF_TABLES_NETDEV=y