Skip to content

Commit

Permalink
kernel: enable MPTCP support (#3248)
Browse files Browse the repository at this point in the history
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) <matttbe@kernel.org>
  • Loading branch information
matttbe committed Mar 14, 2024
1 parent c085ff2 commit 6b062f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions buildroot-external/kernel/v6.1.y/hassos.config
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions buildroot-external/kernel/v6.6.y/hassos.config
Expand Up @@ -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
Expand Down

0 comments on commit 6b062f3

Please sign in to comment.