+sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget$/translations/zh_CN/networking/mptcpmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/networking/mptcpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/networking/mptcpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/networking/mptcpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/networking/mptcpmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/networking/mptcpmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh>/var/lib/git/docbuild/linux/Documentation/networking/mptcp.rsthKubhsection)}(hhh](htitle)}(hMultipath TCP (MPTCP)h]hMultipath TCP (MPTCP)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Introductionh]h Introduction}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXMultipath 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.h](hOMultipath TCP or MPTCP is an extension to the standard TCP and is described in }(hhhhhNhNubh reference)}(hC`RFC 8684 (MPTCPv1) `_h]hRFC 8684 (MPTCPv1)}(hhhhhNhNubah}(h]h ]h"]h$]h&]nameRFC 8684 (MPTCPv1)refuri+https://www.rfc-editor.org/rfc/rfc8684.htmluh1hhhubhtarget)}(h. h]h}(h]rfc-8684-mptcpv1ah ]h"]rfc 8684 (mptcpv1)ah$]h&]refurihuh1h referencedKhhubhXL. 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.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hFor more details about Multipath TCP in the Linux kernel, please see the official website: `mptcp.dev `_.h](h[For more details about Multipath TCP in the Linux kernel, please see the official website: }(hjhhhNhNubh)}(h$`mptcp.dev `_h]h mptcp.dev}(hjhhhNhNubah}(h]h ]h"]h$]h&]name mptcp.devhhttps://www.mptcp.devuh1hhjubh)}(h h]h}(h] mptcp-devah ]h"] mptcp.devah$]h&]refurij*uh1hjKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h] introductionah ]h"] introductionah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Use casesh]h Use cases}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhKubh)}(hvThanks to MPTCP, being able to use multiple paths in parallel or simultaneously brings new use-cases, compared to TCP:h]hvThanks to MPTCP, being able to use multiple paths in parallel or simultaneously brings new use-cases, compared to TCP:}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJhhubh bullet_list)}(hhh](h list_item)}(hSeamless handovers: switching from one path to another while preserving established connections, e.g. to be used in mobility use-cases, like on smartphones.h]h)}(hSeamless handovers: switching from one path to another while preserving established connections, e.g. to be used in mobility use-cases, like on smartphones.h]hSeamless handovers: switching from one path to another while preserving established connections, e.g. to be used in mobility use-cases, like on smartphones.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjpubah}(h]h ]h"]h$]h&]uh1jnhjkhhhhhNubjo)}(hBest network selection: using the "best" available path depending on some conditions, e.g. latency, losses, cost, bandwidth, etc.h]h)}(hBest network selection: using the "best" available path depending on some conditions, e.g. latency, losses, cost, bandwidth, etc.h]hBest network selection: using the “best” available path depending on some conditions, e.g. latency, losses, cost, bandwidth, etc.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjkhhhhhNubjo)}(hNetwork 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. h]h)}(hNetwork 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.h]hNetwork 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjubah}(h]h ]h"]h$]h&]uh1jnhjkhhhhhNubeh}(h]h ]h"]h$]h&]bullet-uh1jihhhKhjJhhubeh}(h] use-casesah ]h"] use casesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hConceptsh]hConcepts}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK&ubh)}(hX=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.h](h3Technically, when a new socket is created with the }(hjhhhNhNubhliteral)}(h``IPPROTO_MPTCP``h]h IPPROTO_MPTCP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh protocol (Linux-specific), a }(hjhhhNhNubhemphasis)}(h *subflow*h]hsubflow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (or }(hjhhhNhNubj)}(h*path*h]hpath}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) is created. This }(hjhhhNhNubj)}(h *subflow*h]hsubflow}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhf consists of a regular TCP connection that is used to transmit data through one interface. Additional }(hjhhhNhNubj)}(h *subflows*h]hsubflows}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh 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 }(hjhhhNhNubj)}(h*option*h]hoption}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field of the underlying TCP }(hjhhhNhNubj)}(h *subflow*h]hsubflow}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/. This field contains, amongst other things, a }(hjhhhNhNubj)}(h``MP_CAPABLE``h]h MP_CAPABLE}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh 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 }(hjhhhNhNubj)}(h ``SYN+ACK``h]hSYN+ACK}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh2 packet will not contain MPTCP options in the TCP }(hjhhhNhNubj)}(h*option*h]hoption}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubht field. In that case, the connection will be “downgraded” to plain TCP, and it will continue with a single path.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK(hjhhubh)}(hfThis behavior is made possible by two internal components: the path manager, and the packet scheduler.h]hfThis behavior is made possible by two internal components: the path manager, and the packet scheduler.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjhhubh)}(hhh](h)}(h Path Managerh]h Path Manager}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK8ubh)}(hX 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.h](h!The Path Manager is in charge of }(hjhhhNhNubj)}(h *subflows*h]hsubflows}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, 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 }(hjhhhNhNubj)}(h ``ADD_ADDR``h]hADD_ADDR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``REMOVE_ADDR``h]h REMOVE_ADDR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh options.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubh)}(hXPath 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.h](h$Path managers are controlled by the }(hjhhhNhNubj)}(h``net.mptcp.pm_type``h]hnet.mptcp.pm_type}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhS sysctl knob -- see mptcp-sysctl.rst. There are two types: the in-kernel one (type }(hjhhhNhNubj)}(h``0``h]h0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhA) where the same rules are applied for all the connections (see: }(hjhhhNhNubj)}(h ``ip mptcp``h]hip mptcp}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh ) ; and the userspace one (type }(hjhhhNhNubj)}(h``1``h]h1}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh*), controlled by a userspace daemon (i.e. }(hjhhhNhNubh)}(h%`mptcpd `_h]hmptcpd}(hjRhhhNhNubah}(h]h ]h"]h$]h&]namemptcpdhhttps://mptcpd.mptcp.dev/uh1hhjubh)}(h h]h}(h]mptcpdah ]h"]mptcpdah$]h&]refurijbuh1hjKhjubh) 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK?hjhhubh)}(hTo 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.h](hETo be able to use multiple IP addresses on a host to create multiple }(hjzhhhNhNubj)}(h *subflows*h]hsubflows}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh} (paths), the default in-kernel MPTCP path-manager needs to know which IP addresses can be used. This can be configured with }(hjzhhhNhNubj)}(h``ip mptcp endpoint``h]hip mptcp endpoint}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh for example.}(hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKGhjhhubeh}(h] path-managerah ]h"] path managerah$]h&]uh1hhjhhhhhK8ubh)}(hhh](h)}(hPacket Schedulerh]hPacket Scheduler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKMubh)}(hXThe 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.h](h?The Packet Scheduler is in charge of selecting which available }(hjhhhNhNubj)}(h *subflow(s)*h]h subflow(s)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh 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.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKOhjhhubh)}(hdPacket schedulers are controlled by the ``net.mptcp.scheduler`` sysctl knob -- see mptcp-sysctl.rst.h](h(Packet schedulers are controlled by the }(hjhhhNhNubj)}(h``net.mptcp.scheduler``h]hnet.mptcp.scheduler}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh% sysctl knob -- see mptcp-sysctl.rst.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKThjhhubeh}(h]packet-schedulerah ]h"]packet schedulerah$]h&]uh1hhjhhhhhKMubeh}(h]conceptsah ]h"]conceptsah$]h&]uh1hhhhhhhhK&ubh)}(hhh](h)}(h Sockets APIh]h Sockets API}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKYubh)}(hhh](h)}(hCreating MPTCP socketsh]hCreating MPTCP sockets}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj&hhhhhK\ubh)}(h[On Linux, MPTCP can be used by selecting MPTCP instead of TCP when creating the ``socket``:h](hPOn Linux, MPTCP can be used by selecting MPTCP instead of TCP when creating the }(hj7hhhNhNubj)}(h ``socket``h]hsocket}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh:}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK^hj&hhubh literal_block)}(h8int sd = socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP);h]h8int sd = socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP);}hjYsbah}(h]h ]h"]h$]h&]hhforcelanguageChighlight_args}uh1jWhhhKahj&hhubh)}(h2Note that ``IPPROTO_MPTCP`` is defined as ``262``.h](h Note that }(hjlhhhNhNubj)}(h``IPPROTO_MPTCP``h]h IPPROTO_MPTCP}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubh is defined as }(hjlhhhNhNubj)}(h``262``h]h262}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubh.}(hjlhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKehj&hhubh)}(h4If MPTCP is not supported, ``errno`` will be set to:h](hIf MPTCP is not supported, }(hjhhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh will be set to:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKghj&hhubjj)}(hhh](jo)}(hK``EINVAL``: (*Invalid argument*): MPTCP is not available, on kernels < 5.6.h]h)}(hjh](j)}(h ``EINVAL``h]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: (}(hjhhhNhNubj)}(h*Invalid argument*h]hInvalid argument}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh,): MPTCP is not available, on kernels < 5.6.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(h]h ]h"]h$]h&]uh1jnhjhhhhhNubjo)}(h```EPROTONOSUPPORT`` (*Protocol not supported*): MPTCP has not been compiled, on kernels >= v5.6.h]h)}(h```EPROTONOSUPPORT`` (*Protocol not supported*): MPTCP has not been compiled, on kernels >= v5.6.h](j)}(h``EPROTONOSUPPORT``h]hEPROTONOSUPPORT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (}(hjhhhNhNubj)}(h*Protocol not supported*h]hProtocol not supported}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh3): MPTCP has not been compiled, on kernels >= v5.6.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jnhjhhhhhNubjo)}(h``ENOPROTOOPT`` (*Protocol not available*): MPTCP has been disabled using ``net.mptcp.enabled`` sysctl knob; see mptcp-sysctl.rst. h]h)}(h``ENOPROTOOPT`` (*Protocol not available*): MPTCP has been disabled using ``net.mptcp.enabled`` sysctl knob; see mptcp-sysctl.rst.h](j)}(h``ENOPROTOOPT``h]h ENOPROTOOPT}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh (}(hj4hhhNhNubj)}(h*Protocol not available*h]hProtocol not available}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh!): MPTCP has been disabled using }(hj4hhhNhNubj)}(h``net.mptcp.enabled``h]hnet.mptcp.enabled}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubh# sysctl knob; see mptcp-sysctl.rst.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKlhj0ubah}(h]h ]h"]h$]h&]uh1jnhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jihhhKihj&hhubh)}(hX 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.h](hMPTCP is then opt-in: applications need to explicitly request it. Note that applications can be forced to use MPTCP with different techniques, e.g. }(hjhhhNhNubj)}(h``LD_PRELOAD``h]h LD_PRELOAD}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (see }(hjhhhNhNubj)}(h ``mptcpize``h]hmptcpize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh ), eBPF (see }(hjhhhNhNubj)}(h ``mptcpify``h]hmptcpify}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh), SystemTAP, }(hjhhhNhNubj)}(h ``GODEBUG``h]hGODEBUG}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (}(hjhhhNhNubj)}(h``GODEBUG=multipathtcp=1``h]hGODEBUG=multipathtcp=1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh), etc.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohj&hhubh)}(h~Switching to ``IPPROTO_MPTCP`` instead of ``IPPROTO_TCP`` should be as transparent as possible for the userspace applications.h](h Switching to }(hjhhhNhNubj)}(h``IPPROTO_MPTCP``h]h IPPROTO_MPTCP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh instead of }(hjhhhNhNubj)}(h``IPPROTO_TCP``h]h IPPROTO_TCP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhE should be as transparent as possible for the userspace applications.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKthj&hhubeh}(h]creating-mptcp-socketsah ]h"]creating mptcp socketsah$]h&]uh1hhjhhhhhK\ubh)}(hhh](h)}(hSocket optionsh]hSocket options}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhKxubh)}(hMPTCP supports most socket options handled by TCP. It is possible some less common options are not supported, but contributions are welcome.h]hMPTCP supports most socket options handled by TCP. It is possible some less common options are not supported, but contributions are welcome.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhj"hhubh)}(hGenerally, 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.h](hgGenerally, the same value is propagated to all subflows, including the ones created after the calls to }(hjAhhhNhNubj)}(h``setsockopt()``h]h setsockopt()}(hjIhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjAubh7. eBPF can be used to set different values per subflow.}(hjAhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK}hj"hhubh)}(hThere 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:h](h4There are some MPTCP specific socket options at the }(hjahhhNhNubj)}(h ``SOL_MPTCP``h]h SOL_MPTCP}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh- (284) level to retrieve info. They fill the }(hjahhhNhNubj)}(h ``optval``h]hoptval}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh buffer of the }(hjahhhNhNubj)}(h``getsockopt()``h]h getsockopt()}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjaubh system call:}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj"hhubjj)}(hhh](jo)}(h+``MPTCP_INFO``: Uses ``struct mptcp_info``.h]h)}(hjh](j)}(h``MPTCP_INFO``h]h MPTCP_INFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: Uses }(hjhhhNhNubj)}(h``struct mptcp_info``h]hstruct mptcp_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjhhhhhNubjo)}(hc``MPTCP_TCPINFO``: Uses ``struct mptcp_subflow_data``, followed by an array of ``struct tcp_info``.h]h)}(hc``MPTCP_TCPINFO``: Uses ``struct mptcp_subflow_data``, followed by an array of ``struct tcp_info``.h](j)}(h``MPTCP_TCPINFO``h]h MPTCP_TCPINFO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: Uses }(hjhhhNhNubj)}(h``struct mptcp_subflow_data``h]hstruct mptcp_subflow_data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, followed by an array of }(hjhhhNhNubj)}(h``struct tcp_info``h]hstruct tcp_info}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jnhjhhhhhNubjo)}(hm``MPTCP_SUBFLOW_ADDRS``: Uses ``struct mptcp_subflow_data``, followed by an array of ``mptcp_subflow_addrs``.h]h)}(hm``MPTCP_SUBFLOW_ADDRS``: Uses ``struct mptcp_subflow_data``, followed by an array of ``mptcp_subflow_addrs``.h](j)}(h``MPTCP_SUBFLOW_ADDRS``h]hMPTCP_SUBFLOW_ADDRS}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh: Uses }(hj-hhhNhNubj)}(h``struct mptcp_subflow_data``h]hstruct mptcp_subflow_data}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh, followed by an array of }(hj-hhhNhNubj)}(h``mptcp_subflow_addrs``h]hmptcp_subflow_addrs}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj)ubah}(h]h ]h"]h$]h&]uh1jnhjhhhhhNubjo)}(hX ``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``. h]h)}(hX ``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``.h](j)}(h``MPTCP_FULL_INFO``h]hMPTCP_FULL_INFO}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh: Uses }(hjwhhhNhNubj)}(h``struct mptcp_full_info``h]hstruct mptcp_full_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh", with one pointer to an array of }(hjwhhhNhNubj)}(h``struct mptcp_subflow_info``h]hstruct mptcp_subflow_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh (including the }(hjwhhhNhNubj)}(h``struct mptcp_subflow_addrs``h]hstruct mptcp_subflow_addrs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh"), and one pointer to an array of }(hjwhhhNhNubj)}(h``struct tcp_info``h]hstruct tcp_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh, followed by the content of }(hjwhhhNhNubj)}(h``struct mptcp_info``h]hstruct mptcp_info}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjwubh.}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjsubah}(h]h ]h"]h$]h&]uh1jnhjhhhhhNubeh}(h]h ]h"]h$]h&]jjuh1jihhhKhj"hhubh)}(hNote 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.h](hNote that at the TCP level, }(hjhhhNhNubj)}(h``TCP_IS_MPTCP``h]h TCP_IS_MPTCP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhi socket option can be used to know if MPTCP is currently being used: the value will be set to 1 if it is.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj"hhubeh}(h]socket-optionsah ]h"]socket optionsah$]h&]uh1hhjhhhhhKxubeh}(h] sockets-apiah ]h"] sockets apiah$]h&]uh1hhhhhhhhKYubh)}(hhh](h)}(hDesign choicesh]hDesign choices}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj)hhhhhKubh)}(hA 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.h]hA 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.}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)hhubh)}(hMPTCP 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.h](h-MPTCP listen sockets will create “plain” }(hjHhhhNhNubj)}(h *accepted*h]haccepted}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjHubh 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.}(hjHhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj)hhubeh}(h]design-choicesah ]h"]design choicesah$]h&]uh1hhhhhhhhKubeh}(h]multipath-tcp-mptcpah ]h"]multipath tcp (mptcp)ah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jujrjGjDjjj4j1jjjjjjjljij jj&j#jjjjjmjju nametypes}(jujGjj4jjjjlj j&jjjmuh}(jrhjDhjhj1j+jjJjjjjjijcjjj#jjj&jj"jjj)u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.