MPTCP architecture proposal
Subsystems (3)
Mat Martineau
v5 cover MPTCP architecture proposal
Hello everyone,
Peter and I have been working on this patch set to show how how MPTCP can fit in to the Linux networking stack using these design ideas:
* Applications opt-in to MPTCP using IPPROTO_MPTCP, regular TCP sockets are still the default. A socket created with socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP) will attempt to form a MPTCP connection. IPPROTO_MPTCP == 99 as a placeholder.
* Subflows exist within the kernel as separate sockets, owned by a MPTCP connection-level socket that is visible to userspace.
* Adds private pointers to struct sk_buff to store MPTCP metadata.
* Adds the CONFIG_MPTCP option to Kconfig.
This now makes use of Florian's skb extensions, as posted to netdev.
The following patches can form an MPTCP connection with the multipath-tcp.org kernel (tested with v0.94), and send DSS mappings that are accepted for the initial data packet. It is an early implementation, and I don't represent it as being upstreamable as-is or being everyone's idea of what an eventual upstream implementation will necessarily look like. It has significant limitations:
* Only one subflow is supported, no joins, and only ipv4.
* Does not support DSS checksums. Checksums must be disabled on the remote stack (for multipath-tcp.org, 'sudo sysctl -w net.mptcp.mptcp_checksum=0')
* Lots of debug statements (although they use dynamic debug and are disabled by default) and TODOs.
* It's only been tested sending small amounts of data for each send
Hopefully there are are some interesting concepts to discuss, and this code helps us assess how workable the above design principles are. Thanks in advance for your feedback on the benefits or drawbacks of this code, how it might be improved, or how other approaches might compare.
The patch set applies to Florian Westphal's skb_ext_both_03 branch
(https://git.breakpoint.cc/cgit/fw/net-next.git/log/?h=skb_ext_both_03),
commit id b363a92ec92a7af53e254f1ac0555567fbf790d1.
I have also pushed the commits to:
https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git
(mptcp-proposal branch)
v5 changes: Rebase on Florian's skb extensions. Fix !CONFIG_MPTCP build.
v4 changes: Refine skb extension (remove copy hook), change rx path to use skb extension instead of error queue,
v3 changes: Change skb extension technique, change rx path to use error queue, add foundational code for multiple subflows, and many bug fixes.
v2 changes: Added receive path implementation (last two patches). Reworked TCP option writing. Miscellaneous bug fixes including header dependency cleanup.
Mat Martineau (7):
tcp: Add MPTCP option number
tcp: Define IPPROTO_MPTCP
mptcp: Add MPTCP to skb extensions
tcp: Prevent coalesce and collapse when skb->priv is used
tcp: Export low-level TCP functions
mptcp: Write MPTCP DSS headers to outgoing data packets
mptcp: Implement MPTCP receive path
Peter Krystad (10):
mptcp: Add MPTCP socket stubs
mptcp: Handle MPTCP TCP options
tcp: Add IPPROTO_SUBFLOW
tcp: expose tcp routines and structs for MPTCP
mptcp: Create SUBFLOW socket for outgoing connections
mptcp: Create SUBFLOW socket for incoming connections
mptcp: Add key generation and token tree
mptcp: Add shutdown() socket operation
mptcp: Add setsockopt()/getsockopt() socket operations
mptcp: Make connection_list a real list of subflows
include/linux/skbuff.h | 3 + include/linux/tcp.h | 26 ++ include/net/inet_common.h | 3 + include/net/mptcp.h | 235 ++++++++++ include/net/tcp.h | 17 + include/uapi/linux/in.h | 4 + net/Kconfig | 1 + net/Makefile | 1 + net/core/skbuff.c | 7 + net/ipv4/af_inet.c | 2 +- net/ipv4/tcp.c | 12 +- net/ipv4/tcp_input.c | 23 +- net/ipv4/tcp_ipv4.c | 4 +- net/ipv4/tcp_output.c | 243 ++++++++++- net/mptcp/Kconfig | 11 + net/mptcp/Makefile | 3 + net/mptcp/crypto.c | 215 +++++++++ net/mptcp/options.c | 301 +++++++++++++ net/mptcp/protocol.c | 895 ++++++++++++++++++++++++++++++++++++++ net/mptcp/subflow.c | 377 ++++++++++++++++ net/mptcp/token.c | 256 +++++++++++ 21 files changed, 2612 insertions(+), 27 deletions(-) create mode 100644 include/net/mptcp.h create mode 100644 net/mptcp/Kconfig create mode 100644 net/mptcp/Makefile create mode 100644 net/mptcp/crypto.c create mode 100644 net/mptcp/options.c create mode 100644 net/mptcp/protocol.c create mode 100644 net/mptcp/subflow.c create mode 100644 net/mptcp/token.c
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 1/17 tcp: Add MPTCP option number
TCP option 30 is allocated for MPTCP by the IANA.
--- include/net/tcp.h | 1 + 1 file changed, 1 insertion(+)
include/net/tcp.h +1 -0
@@ -183,6 +183,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOPT_SACK 5/* SACK Block */ #define TCPOPT_TIMESTAMP 8/* Better RTT estimations/PAWS */ #define TCPOPT_MD5SIG 19/* MD5 Signature (RFC2385) */ +#define TCPOPT_MPTCP 30/* Multipath TCP (RFC6824) */ #define TCPOPT_FASTOPEN 34/* Fast open (RFC7413) */ #define TCPOPT_EXP 254/* Experimental */ /* Magic number to be after the option value for sharing TCP
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 2/17 tcp: Define IPPROTO_MPTCP
In reply to Mat MartineauTo open a MPTCP socket with socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP), IPPROTO_MPTCP needs a value that differs from IPPROTO_TCP. The existing IPPROTO numbers mostly map directly to IANA-specified protocol numbers. MPTCP does not have a protocol number allocated because MPTCP packets use the TCP protocol number. Use private number not used OTA.
--- include/uapi/linux/in.h | 2 ++ 1 file changed, 2 insertions(+)
include/uapi/linux/in.h +2 -0
@@ -64,6 +64,8 @@ enum {#define IPPROTO_BEETPH IPPROTO_BEETPH IPPROTO_ENCAP = 98, /* Encapsulation Header */#define IPPROTO_ENCAP IPPROTO_ENCAP + IPPROTO_MPTCP = 99, /* Multipath TCP connection */ +#define IPPROTO_MPTCP IPPROTO_MPTCP IPPROTO_PIM = 103, /* Protocol Independent Multicast */#define IPPROTO_PIM IPPROTO_PIM IPPROTO_COMP = 108, /* Compression Header Protocol */
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 3/17 mptcp: Add MPTCP socket stubs
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
Implements the infrastructure for MPTCP sockets.
MPTCP sockets open one in-kernel TCP socket per subflow. These subflow sockets are only managed by the MPTCP socket that owns them and are not visible from userspace. This commit allows a userspace program to open an MPTCP socket with:
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP);
The resulting socket is simply a wrapper around a single regular TCP socket, without any of the MPTCP protocol implemented over the wire.
--- include/net/mptcp.h | 33 ++++++++++ net/Kconfig | 1 + net/Makefile | 1 + net/mptcp/Kconfig | 10 ++++ net/mptcp/Makefile | 3 + net/mptcp/protocol.c | 139 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 187 insertions(+) create mode 100644 include/net/mptcp.h create mode 100644 net/mptcp/Kconfig create mode 100644 net/mptcp/Makefile create mode 100644 net/mptcp/protocol.c
include/net/mptcp.h new file +33 -0
@@ -0,0 +1,33 @@ +/* +* Multipath TCP +* +* Copyright (c) 2017, Intel Corporation. +* +* This program is free software; you can redistribute it and/or modify it +* under the terms and conditions of the GNU General Public License, +* version 2, as published by the Free Software Foundation. +* +* This program is distributed in the hope it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +* more details. +*/ + +#ifndef __NET_MPTCP_H +#define __NET_MPTCP_H + +#include <linux/tcp.h> + +/* MPTCP connection sock */ +struct mptcp_sock { +/* inet_connection_sock must be the first member */ +struct inet_connection_sock sk; +struct socket *subflow; +}; + +static inline struct mptcp_sock *mptcp_sk (const struct sock *sk) +{ +return (struct mptcp_sock *)sk; +} + +#endif /* __NET_MPTCP_H */
net/Kconfig +1 -0
@@ -92,6 +92,7 @@ if INET source "net/ipv4/Kconfig" source "net/ipv6/Kconfig" source "net/netlabel/Kconfig" +source "net/mptcp/Kconfig" endif # if INET
net/Makefile +1 -0
@@ -87,3 +87,4 @@ endif obj-$(CONFIG_QRTR) += qrtr/ obj-$(CONFIG_NET_NCSI) += ncsi/ obj-$(CONFIG_XDP_SOCKETS) += xdp/ +obj-$(CONFIG_MPTCP) += mptcp/
net/mptcp/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ + +config MPTCP + bool "Multipath TCP" + depends on INET + ---help--- + 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. +
net/mptcp/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-$(CONFIG_MPTCP) += mptcp.o + +mptcp-y := protocol.o
net/mptcp/protocol.c new file +139 -0
139 lines not on this page · raw message
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 4/17 mptcp: Handle MPTCP TCP options
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
--- include/linux/tcp.h | 11 +++ include/net/mptcp.h | 35 ++++++++++ include/net/tcp.h | 2 + net/ipv4/tcp_input.c | 5 ++ net/ipv4/tcp_output.c | 69 +++++++++++++++---- net/mptcp/Makefile | 2 +- net/mptcp/options.c | 151 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 262 insertions(+), 13 deletions(-) create mode 100644 net/mptcp/options.c
include/linux/tcp.h +11 -0
@@ -104,6 +104,16 @@ struct tcp_options_received {u8 num_sacks;/* Number of SACK blocks */ u16 user_mss;/* mss requested by user in ioctl */ u16 mss_clamp;/* Maximal mss, negotiated at connection setup */ +struct { +u8 mp_capable :1 , + mp_join :1 , + dss :1 , + version :4 ; +u8 flags; +u64 sndr_key; +u64 rcvr_key; + } mptcp; + };static inline void tcp_clear_options (struct tcp_options_received *rx_opt)
@@ -113,6 +123,7 @@ static inline void tcp_clear_options(struct tcp_options_received *rx_opt)#if IS_ENABLED (CONFIG_SMC ) rx_opt->smc_ok =0 ;#endif + rx_opt->mptcp.mp_capable = rx_opt->mptcp.mp_join = rx_opt->mptcp.dss =0 ; }/* This is the max number of SACKS that we'll generate and process. It's safe
include/net/mptcp.h +35 -0
@@ -18,6 +18,23 @@#include <linux/tcp.h> +/* MPTCP option subtypes */ + +#define MPTCPOPT_MP_CAPABLE 0 +#define MPTCPOPT_MP_JOIN 1 +#define MPTCPOPT_DSS 2 +#define MPTCPOPT_ADD_ADDR 3 +#define MPTCPOPT_REMOVE_ADDR 4 +#define MPTCPOPT_MP_PRIO 5 +#define MPTCPOPT_MP_FAIL 6 +#define MPTCPOPT_MP_FASTCLOSE 7 + +/* MPTCP handshake flags */ + +#define MPTCP_CAP_CHECKSUM_REQD (1 << 7) +#define MPTCP_CAP_EXTENSIBILITY (1 << 6) +#define MPTCP_CAP_HMAC_SHA1 (1 << 0) +/* MPTCP connection sock */ struct mptcp_sock {/* inet_connection_sock must be the first member */
@@ -30,4 +47,22 @@ static inline struct mptcp_sock *mptcp_sk(const struct sock *sk) return (struct mptcp_sock *)sk; } +#ifdef CONFIG_MPTCP + +void mptcp_parse_option (const unsigned char *ptr,int opsize, +struct tcp_options_received *opt_rx); + +void mptcp_get_options (const struct sk_buff *skb, +struct tcp_options_received *options); + +#else + +static inline void mptcp_parse_option (const unsigned char *ptr,int opsize, +struct tcp_options_received *opt_rx) +{ +} + + + +#endif /* CONFIG_MPTCP */ #endif /* __NET_MPTCP_H */
include/net/tcp.h +2 -0
@@ -215,6 +215,8 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_MD5SIG_ALIGNED 20#define TCPOLEN_MSS_ALIGNED 4#define TCPOLEN_EXP_SMC_BASE_ALIGNED 8 +#define TCPOLEN_MPTCP_MPC_SYN 12 +#define TCPOLEN_MPTCP_MPC_SYNACK 20/* Flags in tp->nonagle */ #define TCP_NAGLE_OFF 1/* Nagle's algo is disabled */
net/ipv4/tcp_input.c +5 -0
@@ -79,6 +79,7 @@#include <trace/events/tcp.h> #include <linux/static_key.h> #include <net/busy_poll.h> +#include <net/mptcp.h> int sysctl_tcp_max_orphans__read_mostly =NR_FILE ;
@@ -3858,6 +3859,10 @@ void tcp_parse_options(const struct net *net,*/ break ;#endif +case TCPOPT_MPTCP : +mptcp_parse_option (ptr, opsize, opt_rx); +break ; +case TCPOPT_FASTOPEN : tcp_parse_fastopen_option( opsize - TCPOLEN_FASTOPEN_BASE,
net/ipv4/tcp_output.c +57 -12
99 lines not on this page · raw message
net/mptcp/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-$(CONFIG_MPTCP) += mptcp.o -mptcp-y := protocol.o +mptcp-y := protocol.o options.o
net/mptcp/options.c new file +151 -0
151 lines not on this page · raw message
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 5/17 tcp: Add IPPROTO_SUBFLOW
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
IANA protocol numbers fit in a single byte, however the protocol field of struct inet_protosw is an unsigned short so defining IPPROTO_SUBFLOW as a 16-bit value greater than 0xFF with the same LSB as IPPROTO_TCP is convenient for registering a unique protocol with inet_register_protosw() that still transmits packets with IPPROTO_TCP as the protocol number.
--- include/uapi/linux/in.h | 2 ++ 1 file changed, 2 insertions(+)
include/uapi/linux/in.h +2 -0
@@ -78,6 +78,8 @@ enum {#define IPPROTO_MPLS IPPROTO_MPLS IPPROTO_RAW = 255, /* Raw IP packets */#define IPPROTO_RAW IPPROTO_RAW + IPPROTO_SUBFLOW = 262, /* Multipath TCP (IPPROTO_TCP | 0x100) */ +#define IPPROTO_SUBFLOW IPPROTO_SUBFLOWIPPROTO_MAX };#endif
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 6/17 tcp: expose tcp routines and structs for MPTCP
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
tcp_v4_init_sock(), inet_compat_ioctl()tcp_request_sock_ipv4_ops
This function is needed for MPTCP subflow initialization.
--- include/net/inet_common.h | 3 +++ include/net/mptcp.h | 2 ++ include/net/tcp.h | 1 + net/ipv4/af_inet.c | 2 +- net/ipv4/tcp_ipv4.c | 4 ++-- 5 files changed, 9 insertions(+), 3 deletions(-)
include/net/inet_common.h +3 -0
@@ -37,6 +37,9 @@ int __inet_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len,int inet_getname (struct socket *sock,struct sockaddr *uaddr,int peer);int inet_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg); +#ifdef CONFIG_COMPAT +int inet_compat_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg); +#endif int inet_ctl_sock_create (struct sock **sk,unsigned short family,unsigned short type,unsigned char protocol,struct net *net);
include/net/mptcp.h +2 -0
@@ -55,6 +55,8 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize,void mptcp_get_options (const struct sk_buff *skb,struct tcp_options_received *options); +extern const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops; +#else static inline void mptcp_parse_option(const unsigned char *ptr, int opsize,
include/net/tcp.h +1 -0
@@ -436,6 +436,7 @@ struct sock *tcp_v4_syn_recv_sock(const struct sock *sk, struct sk_buff *skb,int tcp_v4_do_rcv (struct sock *sk,struct sk_buff *skb);int tcp_v4_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len);int tcp_connect (struct sock *sk); +int tcp_v4_init_sock (struct sock *sk);enum tcp_synack_type {TCP_SYNACK_NORMAL ,TCP_SYNACK_FASTOPEN ,
net/ipv4/af_inet.c +1 -1
@@ -965,7 +965,7 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)EXPORT_SYMBOL (inet_ioctl);#ifdef CONFIG_COMPAT -static int inet_compat_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg) +int inet_compat_ioctl (struct socket *sock,unsigned int cmd,unsigned long arg) {struct sock *sk = sock->sk;int err = -ENOIOCTLCMD ;
net/ipv4/tcp_ipv4.c +2 -2
@@ -1363,7 +1363,7 @@ struct request_sock_ops tcp_request_sock_ops __read_mostly = { .syn_ack_timeout = tcp_syn_ack_timeout, }; -static const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { +const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { .mss_clamp =TCP_MSS_DEFAULT , #ifdef CONFIG_TCP_MD5SIG .req_md5_lookup = tcp_v4_md5_lookup,
@@ -2038,7 +2038,7 @@ static const struct tcp_sock_af_ops tcp_sock_ipv4_specific = {/* NOTE: A lot of things set to zero explicitly by call to * sk_alloc() so need not be done here. */ -static int tcp_v4_init_sock (struct sock *sk) +int tcp_v4_init_sock (struct sock *sk) {struct inet_connection_sock *icsk =inet_csk (sk);
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 7/17 mptcp: Create SUBFLOW socket for outgoing connections
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
Add subflow_sock type that extends tcp_sock and add an is_mptcp flag to tcp_sock to distinguish them.
Override the bind() and connect() methods of the MPTCP socket proto_ops so they may act on the subflow socket instead, and use the .sk_rx_dst_set() handler in the subflow proto to capture when the responding SYN-ACK is received.
Add handling in tcp_output.c to add MP_CAPABLE to an outgoing SYN request for a subflow_sock and to the final ACK of the three-way handshake.
--- include/linux/tcp.h | 2 + include/net/mptcp.h | 47 ++++++++++- include/net/tcp.h | 2 +- net/ipv4/tcp_input.c | 3 + net/ipv4/tcp_output.c | 33 ++++++-- net/mptcp/Makefile | 2 +- net/mptcp/options.c | 40 +++++++++ net/mptcp/protocol.c | 161 +++++++++++++++++++++++++++++------ net/mptcp/subflow.c | 192 ++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 448 insertions(+), 34 deletions(-) create mode 100644 net/mptcp/subflow.c
include/linux/tcp.h +2 -0
@@ -412,6 +412,8 @@ struct tcp_sock {*/ struct request_sock *fastopen_rsk;u32 *saved_syn; + +bool is_mptcp; };enum tsq_enum {
include/net/mptcp.h +46 -1
70 lines not on this page · raw message
include/net/tcp.h +1 -1
@@ -216,7 +216,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_MSS_ALIGNED 4#define TCPOLEN_EXP_SMC_BASE_ALIGNED 8#define TCPOLEN_MPTCP_MPC_SYN 12 -#define TCPOLEN_MPTCP_MPC_SYNACK 20 +#define TCPOLEN_MPTCP_MPC_ACK 20/* Flags in tp->nonagle */ #define TCP_NAGLE_OFF 1/* Nagle's algo is disabled */
net/ipv4/tcp_input.c +3 -0
@@ -5872,6 +5872,9 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb,tcp_sync_mss (sk, icsk->icsk_pmtu_cookie);tcp_initialize_rcv_mss (sk); +if (tp->is_mptcp) +mptcp_rcv_synsent (sk); +/* Remember, tcp_poll() does not lock socket! * Change state from SYN-SENT only after copied_seq * is initialized. */
net/ipv4/tcp_output.c +28 -5
@@ -416,7 +416,6 @@ static inline bool tcp_urg_mode(const struct tcp_sock *tp)/* MPTCP option subtypes */ #define OPTION_MPTCP_MPC_SYN (1 << 0) -#define OPTION_MPTCP_MPC_SYNACK (1 << 1)#define OPTION_MPTCP_MPC_ACK (1 << 2)struct tcp_out_options {
@@ -440,7 +439,6 @@ static void mptcp_options_write(__be32 *ptr, struct tcp_out_options *opts)return ;if ((OPTION_MPTCP_MPC_SYN | -OPTION_MPTCP_MPC_SYNACK |OPTION_MPTCP_MPC_ACK ) & opts->suboptions) {u8 len;__be64 key;
@@ -448,7 +446,7 @@ static void mptcp_options_write(__be32 *ptr, struct tcp_out_options *opts)if (OPTION_MPTCP_MPC_SYN & opts->suboptions) len =TCPOLEN_MPTCP_MPC_SYN ;else - len =TCPOLEN_MPTCP_MPC_SYNACK ; + len =TCPOLEN_MPTCP_MPC_ACK ; *ptr++ = htonl((0x1e << 24) | // TCP option: Multipath TCP (len << 16) | // length
@@ -457,8 +455,7 @@ static void mptcp_options_write(__be32 *ptr, struct tcp_out_options *opts) key =cpu_to_be64 (opts->sndr_key);memcpy ((u8 *) ptr, (u8 *) &key,8 ); ptr +=2 ; -if ((OPTION_MPTCP_MPC_SYNACK | -OPTION_MPTCP_MPC_ACK ) & opts->suboptions) { +if (OPTION_MPTCP_MPC_ACK & opts->suboptions) { key =cpu_to_be64 (opts->rcvr_key);memcpy ((u8 *) ptr, (u8 *) &key,8 ); ptr +=2 ;
@@ -696,6 +693,16 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,smc_set_option (tp, opts, &remaining); +if (tp->is_mptcp) { +u64 local_key; +if (mptcp_syn_options (sk, &local_key)) { + opts->options |=OPTION_MPTCP ; + opts->suboptions =OPTION_MPTCP_MPC_SYN ; + opts->sndr_key = local_key; + remaining -=TCPOLEN_MPTCP_MPC_SYN ; + } + } +return MAX_TCP_OPTION_SPACE - remaining; }
@@ -804,6 +811,22 @@ static unsigned int tcp_established_options(struct sock *sk, struct sk_buff *skb opts->num_sack_blocks *TCPOLEN_SACK_PERBLOCK ; } +if (tp->is_mptcp) { +unsigned int remaining =MAX_TCP_OPTION_SPACE - size; +u64 local_key; +u64 remote_key; + +if (mptcp_established_options (sk, &local_key, &remote_key)) { +if (remaining >=TCPOLEN_MPTCP_MPC_ACK ) { + opts->options |=OPTION_MPTCP ; + opts->suboptions =OPTION_MPTCP_MPC_ACK ; + opts->sndr_key = local_key; + opts->rcvr_key = remote_key; + size +=TCPOLEN_MPTCP_MPC_ACK ; + } + } + } +return size; }
net/mptcp/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-$(CONFIG_MPTCP) += mptcp.o -mptcp-y := protocol.o options.o +mptcp-y := protocol.o subflow.o options.o
net/mptcp/options.c +40 -0
@@ -149,3 +149,43 @@ void mptcp_get_options(const struct sk_buff *skb, } } } + +unsigned int mptcp_syn_options (struct sock *sk,u64 *local_key) +{ +struct subflow_sock *subflow =subflow_sk (sk); + +if (subflow->request_mptcp) { +pr_debug ("local_key=%llu" , subflow->local_key); + *local_key = subflow->local_key; + } +return subflow->request_mptcp; +} + +void mptcp_rcv_synsent (struct sock *sk) +{ +struct tcp_sock *tp =tcp_sk (sk); +struct subflow_sock *subflow =subflow_sk (sk); + +pr_debug ("subflow=%p" , subflow); +if (subflow->request_mptcp && tp->rx_opt.mptcp.mp_capable) { + subflow->mp_capable =1 ; + subflow->remote_key = tp->rx_opt.mptcp.sndr_key; + } +} + +unsigned int mptcp_established_options (struct sock *sk,u64 *local_key, +u64 *remote_key) +{ +struct subflow_sock *subflow =subflow_sk (sk); + +pr_debug ("subflow=%p" , subflow); +if (subflow->mp_capable && !subflow->fourth_ack) { + subflow->fourth_ack =1 ; + *local_key = subflow->local_key; + *remote_key = subflow->remote_key; +pr_debug ("local_key=%llu" , *local_key); +pr_debug ("remote_key=%llu" , *remote_key); +return 1 ; + } +return 0 ; +}
net/mptcp/protocol.c +135 -26
237 lines not on this page · raw message
net/mptcp/subflow.c new file +192 -0
192 lines not on this page · raw message
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 8/17 mptcp: Create SUBFLOW socket for incoming connections
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
Add subflow_request_sock type that extends tcp_request_sock and add an is_mptcp flag to tcp_request_sock distinguish them.
Override the listen() and accept() methods of the MPTCP socket proto_ops so they may act on the subflow socket.
Override the conn_request() and syn_recv_sock() handlers in the inet_connection_sock to handle incoming MPTCP SYNs and the ACK to the response SYN.
Add handling in tcp_output.c to add MP_CAPABLE to an outgoing SYN-ACK response for a subflow_request_sock.
--- include/linux/tcp.h | 1 + include/net/mptcp.h | 26 ++++++++++ include/net/tcp.h | 1 + net/ipv4/tcp_input.c | 1 + net/ipv4/tcp_output.c | 21 +++++++- net/mptcp/options.c | 15 ++++++ net/mptcp/protocol.c | 102 ++++++++++++++++++++++++++++++++++--- net/mptcp/subflow.c | 115 ++++++++++++++++++++++++++++++++++++++++-- 8 files changed, 271 insertions(+), 11 deletions(-)
include/linux/tcp.h +1 -0
@@ -148,6 +148,7 @@ struct tcp_request_sock {* FastOpen it's the seq# * after data-in-SYN. */ +bool is_mptcp; };static inline struct tcp_request_sock *tcp_rsk (const struct request_sock *req)
include/net/mptcp.h +26 -0
@@ -69,6 +69,23 @@ static inline struct subflow_sock *subflow_sk(const struct sock *sk)return (struct subflow_sock *)sk; } +struct subflow_request_sock { +struct tcp_request_sock sk; +u8 mp_capable :1 , + mp_join :1 , + checksum :1 , + backup :1 , + version :4 ; +u64 local_key; +u64 remote_key; +}; + +static inline +struct subflow_request_sock *subflow_rsk (const struct request_sock *rsk) +{ +return (struct subflow_request_sock *)rsk; +} +#ifdef CONFIG_MPTCP void mptcp_parse_option(const unsigned char *ptr, int opsize,
@@ -77,6 +94,8 @@ unsigned int mptcp_syn_options(struct sock *sk, u64 *local_key);void mptcp_rcv_synsent (struct sock *sk);unsigned int mptcp_established_options (struct sock *sk,u64 *local_key,u64 *remote_key); +unsigned int mptcp_synack_options (struct request_sock *req, +u64 *local_key,u64 *remote_key);void mptcp_finish_connect (struct sock *sk,int mp_capable);
@@ -104,6 +123,13 @@ static inline void mptcp_rcv_synsent(struct sock *sk) { } +static inline unsigned int mptcp_synack_options (struct request_sock *sk, +u64 *local_key, +u64 *remote_key) +{ +return 0 ; +} +static inline unsigned int mptcp_established_options (struct sock *sk,u64 *local_key,u64 *remote_key)
include/net/tcp.h +1 -0
@@ -216,6 +216,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo);#define TCPOLEN_MSS_ALIGNED 4#define TCPOLEN_EXP_SMC_BASE_ALIGNED 8#define TCPOLEN_MPTCP_MPC_SYN 12 +#define TCPOLEN_MPTCP_MPC_SYNACK 20#define TCPOLEN_MPTCP_MPC_ACK 20/* Flags in tp->nonagle */
net/ipv4/tcp_input.c +1 -0
@@ -6453,6 +6453,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,tcp_rsk (req)->af_specific = af_ops;tcp_rsk (req)->ts_off =0 ; +tcp_rsk (req)->is_mptcp =0 ;tcp_clear_options (&tmp_opt); tmp_opt.mss_clamp = af_ops->mss_clamp;
net/ipv4/tcp_output.c +20 -1
@@ -416,6 +416,7 @@ static inline bool tcp_urg_mode(const struct tcp_sock *tp)/* MPTCP option subtypes */ #define OPTION_MPTCP_MPC_SYN (1 << 0) +#define OPTION_MPTCP_MPC_SYNACK (1 << 1)#define OPTION_MPTCP_MPC_ACK (1 << 2)struct tcp_out_options {
@@ -439,12 +440,15 @@ static void mptcp_options_write(__be32 *ptr, struct tcp_out_options *opts)return ;if ((OPTION_MPTCP_MPC_SYN | +OPTION_MPTCP_MPC_SYNACK |OPTION_MPTCP_MPC_ACK ) & opts->suboptions) {u8 len;__be64 key;if (OPTION_MPTCP_MPC_SYN & opts->suboptions) len =TCPOLEN_MPTCP_MPC_SYN ; +else if (OPTION_MPTCP_MPC_SYNACK & opts->suboptions) + len =TCPOLEN_MPTCP_MPC_SYNACK ;else len =TCPOLEN_MPTCP_MPC_ACK ;
@@ -455,7 +459,8 @@ static void mptcp_options_write(__be32 *ptr, struct tcp_out_options *opts) key =cpu_to_be64 (opts->sndr_key);memcpy ((u8 *) ptr, (u8 *) &key,8 ); ptr +=2 ; -if (OPTION_MPTCP_MPC_ACK & opts->suboptions) { +if ((OPTION_MPTCP_MPC_SYNACK | +OPTION_MPTCP_MPC_ACK ) & opts->suboptions) { key =cpu_to_be64 (opts->rcvr_key);memcpy ((u8 *) ptr, (u8 *) &key,8 ); ptr +=2 ;
@@ -763,6 +768,20 @@ static unsigned int tcp_synack_options(const struct sock *sk, remaining -= need; } } +if (tcp_rsk (req)->is_mptcp) { +u64 local_key; +u64 remote_key; +if (mptcp_synack_options (req, &local_key, &remote_key)) { +if (remaining >=TCPOLEN_MPTCP_MPC_SYNACK ) { + opts->options |=OPTION_MPTCP ; + opts->suboptions =OPTION_MPTCP_MPC_SYNACK ; + opts->sndr_key = local_key; + opts->rcvr_key = remote_key; + remaining -=TCPOLEN_MPTCP_MPC_SYNACK ; + } + } + } +smc_set_option_cond (tcp_sk (sk), ireq, opts, &remaining);return MAX_TCP_OPTION_SPACE - remaining;
net/mptcp/options.c +15 -0
@@ -189,3 +189,18 @@ unsigned int mptcp_established_options(struct sock *sk, u64 *local_key, }return 0 ; } + +unsigned int mptcp_synack_options (struct request_sock *req,u64 *local_key, +u64 *remote_key) +{ +struct subflow_request_sock *subflow_req =subflow_rsk (req); + +pr_debug ("subflow_req=%p" , subflow_req); +if (subflow_req->mp_capable) { + *local_key = subflow_req->local_key; + *remote_key = subflow_req->remote_key; +pr_debug ("local_key=%llu" , *local_key); +pr_debug ("remote_key=%llu" , *remote_key); + } +return subflow_req->mp_capable; +}
net/mptcp/protocol.c +95 -7
135 lines not on this page · raw message
net/mptcp/subflow.c +112 -3
151 lines not on this page · raw message
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 9/17 mptcp: Add key generation and token tree
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
Generate the local keys, IDSN, and token when creating a new socket. Introduce the token tree to track all tokens in use using a radix tree with the MPTCP token itself as the index.
--- include/net/mptcp.h | 26 +++++ net/mptcp/Makefile | 2 +- net/mptcp/crypto.c | 215 ++++++++++++++++++++++++++++++++++++ net/mptcp/protocol.c | 18 +++ net/mptcp/subflow.c | 31 +++++- net/mptcp/token.c | 255 +++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 545 insertions(+), 2 deletions(-) create mode 100644 net/mptcp/crypto.c create mode 100644 net/mptcp/token.c
include/net/mptcp.h +26 -0
@@ -41,6 +41,7 @@ struct mptcp_sock {struct inet_connection_sock sk;u64 local_key;u64 remote_key; +u32 token;struct socket *connection_list;/* @@ needs to be a list */ struct socket *subflow;/* outgoing connect, listener or !mp_capable */ };
@@ -56,6 +57,7 @@ struct subflow_sock {struct tcp_sock sk;u64 local_key;u64 remote_key; +u32 token;bool request_mptcp;// send MP_CAPABLE bool checksum;bool version;
@@ -78,6 +80,7 @@ struct subflow_request_sock { version :4 ;u64 local_key;u64 remote_key; +u32 token; }; static inline
@@ -107,6 +110,29 @@ void mptcp_get_options(const struct sk_buff *skb,extern const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops; +void token_init (void ); +void token_new_request (struct request_sock *req,const struct sk_buff *skb); +void token_destroy_request (u32 token); +void token_new_connect (struct sock *sk); +void token_new_accept (struct sock *sk); +void token_update_accept (struct sock *sk,struct sock *conn); +void token_destroy (u32 token); + +void crypto_init (void ); +u32 crypto_v4_get_nonce (__be32 saddr,__be32 daddr, +__be16 sport,__be16 dport); +u64 crypto_v4_get_key (__be32 saddr,__be32 daddr, +__be16 sport,__be16 dport); +u64 crypto_v6_get_key (const struct in6_addr *saddr, +const struct in6_addr *daddr, +__be16 sport,__be16 dport); +u32 crypto_v6_get_nonce (const struct in6_addr *saddr, +const struct in6_addr *daddr, +__be16 sport,__be16 dport); +void crypto_key_sha1 (u64 key,u32 *token,u64 *idsn); +void crypto_hmac_sha1 (u64 key1,u64 key2,u32 *hash_out, +int arg_num, ...); +#else static inline void mptcp_parse_option(const unsigned char *ptr, int opsize,
net/mptcp/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-$(CONFIG_MPTCP) += mptcp.o -mptcp-y := protocol.o subflow.o options.o +mptcp-y := protocol.o subflow.o options.o token.o crypto.o
net/mptcp/crypto.c new file +215 -0
215 lines not on this page · raw message
net/mptcp/protocol.c +18 -0
@@ -111,6 +111,9 @@ static struct sock *mptcp_accept(struct sock *sk, int flags, int *err,if (subflow->mp_capable) { msk->remote_key = subflow->remote_key; msk->local_key = subflow->local_key; + msk->token = subflow->token; +pr_debug ("token=%u" , msk->token); +token_update_accept (new_sock->sk, mp->sk); msk->connection_list = new_sock; }else { msk->subflow = new_sock;
@@ -119,6 +122,15 @@ static struct sock *mptcp_accept(struct sock *sk, int flags, int *err,return mp->sk; } +static void mptcp_destroy (struct sock *sk) +{ +struct mptcp_sock *msk =mptcp_sk (sk); + +pr_debug ("msk=%p, subflow=%p" , sk, msk->subflow->sk); + +token_destroy (msk->token); +} +static int mptcp_get_port (struct sock *sk,unsigned short snum) {struct mptcp_sock *msk =mptcp_sk (sk);
@@ -139,6 +151,8 @@ void mptcp_finish_connect(struct sock *sk, int mp_capable)if (mp_capable) { msk->remote_key = subflow->remote_key; msk->local_key = subflow->local_key; + msk->token = subflow->token; +pr_debug ("token=%u" , msk->token); msk->connection_list = msk->subflow; msk->subflow =NULL ; }
@@ -248,6 +262,7 @@ static struct proto mptcp_prot = { .close = mptcp_close, .accept = mptcp_accept, .shutdown = tcp_shutdown, + .destroy = mptcp_destroy, .sendmsg = mptcp_sendmsg, .recvmsg = mptcp_recvmsg, .hash = inet_hash,
@@ -300,6 +315,9 @@ static int __init mptcp_init(void) mptcp_prot.h.hashinfo = tcp_prot.h.hashinfo; +token_init (); +crypto_init (); + err =mptcp_subflow_init ();if (err) goto subflow_failed;
net/mptcp/subflow.c +30 -1
@@ -53,6 +53,29 @@ static int subflow_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,return tcp_recvmsg (sk, msg, len, nonblock, flags, addr_len); } +static int subflow_rebuild_header (struct sock *sk) +{ +struct subflow_sock *subflow =subflow_sk (sk); + +if (subflow->request_mptcp && !subflow->token) { +pr_debug ("subflow=%p" , sk); +token_new_connect (sk); + } + +return inet_sk_rebuild_header (sk); +} + +static void subflow_req_destructor (struct request_sock *req) +{ +struct subflow_request_sock *subflow_req =subflow_rsk (req); + +pr_debug ("subflow_req=%p" , subflow_req); + +if (subflow_req->mp_capable) +token_destroy_request (subflow_req->token); + tcp_request_sock_ops.destructor (req); +} +static void subflow_v4_init_req (struct request_sock *req,const struct sock *sk_listener,struct sk_buff *skb)
@@ -82,6 +105,8 @@ static void subflow_v4_init_req(struct request_sock *req, listener->checksum) subflow_req->checksum =1 ; subflow_req->remote_key = rx_opt.mptcp.sndr_key; +pr_debug ("remote_key=%llu" , subflow_req->remote_key); +token_new_request (req, skb); }else { subflow_req->mp_capable =0 ; }
@@ -147,6 +172,9 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk, subflow->fourth_ack =1 ; subflow->remote_key = subflow_req->remote_key; subflow->local_key = subflow_req->local_key; + subflow->token = subflow_req->token; +pr_debug ("token=%u" , subflow->token); +token_new_accept (child); }else { subflow->mp_capable =0 ; }
@@ -158,7 +186,7 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk,const struct inet_connection_sock_af_ops subflow_specific = { .queue_xmit = ip_queue_xmit, .send_check = tcp_v4_send_check, - .rebuild_header = inet_sk_rebuild_header, + .rebuild_header = subflow_rebuild_header, .sk_rx_dst_set = subflow_finish_connect, .conn_request = subflow_conn_request, .syn_recv_sock = subflow_syn_recv_sock,
@@ -273,6 +301,7 @@ int mptcp_subflow_init(void) subflow_request_sock_ops = tcp_request_sock_ops; subflow_request_sock_ops.obj_size =sizeof (struct subflow_request_sock ), + subflow_request_sock_ops.destructor = subflow_req_destructor; subflow_request_sock_ipv4_ops = tcp_request_sock_ipv4_ops; subflow_request_sock_ipv4_ops.init_req = subflow_v4_init_req;
net/mptcp/token.c new file +255 -0
255 lines not on this page · raw message
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 10/17 mptcp: Add shutdown() socket operation
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
--- net/mptcp/protocol.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
net/mptcp/protocol.c +20 -1
@@ -255,6 +255,25 @@ int mptcp_stream_accept(struct socket *sock, struct socket *newsock, int flags,return inet_accept (sock, newsock, flags, kern); } +int mptcp_stream_shutdown (struct socket *sock,int how) +{ +struct mptcp_sock *msk =mptcp_sk (sock->sk); +int ret =0 ; + +pr_debug ("sk=%p, how=%d" , msk, how); + +if (msk->subflow) { +pr_debug ("subflow=%p" , msk->subflow->sk); + ret =kernel_sock_shutdown (msk->subflow, how); + } +if (msk->connection_list) { +pr_debug ("conn_list->subflow=%p" , msk->connection_list->sk); + ret =kernel_sock_shutdown (msk->connection_list, how); + } + +return ret; +} +static struct proto mptcp_prot = { .name ="MPTCP" , .owner =THIS_MODULE ,
@@ -284,7 +303,7 @@ const struct proto_ops mptcp_stream_ops = { .poll = tcp_poll, .ioctl = inet_ioctl, .listen = mptcp_stream_listen, - .shutdown = inet_shutdown, + .shutdown = mptcp_stream_shutdown, .setsockopt = sock_common_setsockopt, .getsockopt = sock_common_getsockopt, .sendmsg = inet_sendmsg,
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 11/17 mptcp: Add setsockopt()/getsockopt() socket operations
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
--- net/mptcp/protocol.c | 48 ++++++++++++++++++++++++++++++++++++++++++++ net/mptcp/subflow.c | 22 ++++++++++++++++++++ 2 files changed, 70 insertions(+)
net/mptcp/protocol.c +48 -0
@@ -131,6 +131,52 @@ static void mptcp_destroy(struct sock *sk)token_destroy (msk->token); } +static int mptcp_setsockopt (struct sock *sk,int level,int optname, +char __user *uoptval,unsigned int optlen) +{ +struct mptcp_sock *msk =mptcp_sk (sk); +struct socket *subflow; +char __kernel *optval; + +pr_debug ("msk=%p" , msk); +if (msk->connection_list) { + subflow = msk->connection_list; +pr_debug ("conn_list->subflow=%p" , subflow->sk); + }else { + subflow = msk->subflow; +pr_debug ("subflow=%p" , subflow->sk); + } + +/* will be treated as __user in subflow_setsockopt */ + optval = (char __kernel __force *) uoptval; + +return kernel_setsockopt (subflow, level, optname, optval, optlen); +} + +static int mptcp_getsockopt (struct sock *sk,int level,int optname, +char __user *uoptval,int __user *uoption) +{ +struct mptcp_sock *msk =mptcp_sk (sk); +struct socket *subflow; +char __kernel *optval; +int __kernel *option; + +pr_debug ("msk=%p" , msk); +if (msk->connection_list) { + subflow = msk->connection_list; +pr_debug ("conn_list->subflow=%p" , subflow->sk); + }else { + subflow = msk->subflow; +pr_debug ("subflow=%p" , subflow->sk); + } + +/* will be treated as __user in subflow_getsockopt */ + optval = (char __kernel __force *) uoptval; + option = (int __kernel __force *) uoption; + +return kernel_getsockopt (subflow, level, optname, optval, option); +} +static int mptcp_get_port (struct sock *sk,unsigned short snum) {struct mptcp_sock *msk =mptcp_sk (sk);
@@ -282,6 +328,8 @@ static struct proto mptcp_prot = { .accept = mptcp_accept, .shutdown = tcp_shutdown, .destroy = mptcp_destroy, + .setsockopt = mptcp_setsockopt, + .getsockopt = mptcp_getsockopt, .sendmsg = mptcp_sendmsg, .recvmsg = mptcp_recvmsg, .hash = inet_hash,
net/mptcp/subflow.c +22 -0
@@ -249,6 +249,26 @@ static void subflow_destroy(struct sock *sk)tcp_v4_destroy_sock (sk); } +static int subflow_setsockopt (struct sock *sk,int level,int optname, +char __user *optval,unsigned int optlen) +{ +struct subflow_sock *subflow =subflow_sk (sk); + +pr_debug ("subflow=%p" , subflow); + +return tcp_setsockopt (sk, level, optname, optval, optlen); +} + +static int subflow_getsockopt (struct sock *sk,int level,int optname, +char __user *optval,int __user *option) +{ +struct subflow_sock *subflow =subflow_sk (sk); + +pr_debug ("subflow=%p" , subflow); + +return tcp_getsockopt (sk, level, optname, optval, option); +} +static struct proto subflow_prot = { .name ="SUBFLOW" , .owner =THIS_MODULE ,
@@ -260,6 +280,8 @@ static struct proto subflow_prot = { .init = subflow_init_sock, .destroy = subflow_destroy, .shutdown = tcp_shutdown, + .setsockopt = subflow_setsockopt, + .getsockopt = subflow_getsockopt, .keepalive = tcp_set_keepalive, .recvmsg = subflow_recvmsg, .sendmsg = subflow_sendmsg,
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 12/17 mptcp: Add MPTCP to skb extensions
In reply to Mat MartineauAdd enum value for MPTCP and update config dependencies
--- include/linux/skbuff.h | 3 +++ include/net/mptcp.h | 17 +++++++++++++++++ net/core/skbuff.c | 7 +++++++ net/mptcp/Kconfig | 1 + 4 files changed, 28 insertions(+)
include/linux/skbuff.h +3 -0
@@ -3907,6 +3907,9 @@ enum skb_ext_id {#endif #ifdef CONFIG_XFRM SKB_EXT_SEC_PATH, +#endif +#if IS_ENABLED (CONFIG_MPTCP ) +SKB_EXT_MPTCP , #endif SKB_EXT_NUM, /* must be last */ };
include/net/mptcp.h +17 -0
@@ -51,6 +51,23 @@ static inline struct mptcp_sock *mptcp_sk(const struct sock *sk)return (struct mptcp_sock *)sk; } +/* MPTCP sk_buff private control buffer */ +struct mptcp_skb_cb { +refcount_t refcnt; +u64 data_ack; +u64 data_seq; +u32 subflow_seq; +u16 dll; +__sum16 checksum; +u8 use_map:1 , + dsn64:1 , + use_checksum:1 , + data_fin:1 , + use_ack:1 , + ack64:1 , + __unused:2 ; +}; +/* MPTCP subflow sock structure */ struct subflow_sock {/* tcp_sock must be the first member */
net/core/skbuff.c +7 -0
@@ -70,6 +70,7 @@#include <net/checksum.h> #include <net/ip6_checksum.h> #include <net/xfrm.h> +#include <net/mptcp.h> #include <linux/uaccess.h> #include <trace/events/skb.h>
@@ -5561,6 +5562,9 @@ static const u8 skb_ext_type_len[] = { #ifdef CONFIG_XFRM [SKB_EXT_SEC_PATH] = SKB_EXT_CHUNKSIZEOF(struct sec_path), #endif +#if IS_ENABLED(CONFIG_MPTCP) + [SKB_EXT_MPTCP] = sizeof(struct mptcp_skb_cb), +#endif };static void *skb_ext_get_ptr (struct skb_ext *ext,enum skb_ext_id id)
@@ -5607,6 +5611,9 @@ static __always_inline unsigned int skb_ext_total_length(void)#endif #ifdef CONFIG_XFRM skb_ext_type_len[SKB_EXT_SEC_PATH] + +#endif +#if IS_ENABLED (CONFIG_MPTCP ) + skb_ext_type_len[SKB_EXT_MPTCP] +#endif 0 ; }
net/mptcp/Kconfig +1 -0
@@ -2,6 +2,7 @@ config MPTCP bool "Multipath TCP" depends on INET + select SKB_EXTENSIONS ---help--- Multipath TCP (MPTCP) connections send and receive data over multiple subflows in order to utilize multiple network paths. Each subflow
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 13/17 tcp: Prevent coalesce and collapse when skb->priv is used
In reply to Mat MartineauThe extended private data attached to an skb needs to be preserved as it passes through the TCP stack. Make sure that these skbs are not appended to others during coalesce or collapse, so the private data remains associated with the payload of the given skb.
--- include/net/mptcp.h | 12 ++++++++++-- include/net/tcp.h | 8 ++++++++ net/ipv4/tcp_input.c | 10 ++++++++-- net/ipv4/tcp_output.c | 2 +- 4 files changed, 27 insertions(+), 5 deletions(-)
include/net/mptcp.h +10 -2
@@ -16,8 +16,6 @@#ifndef __NET_MPTCP_H#define __NET_MPTCP_H -#include <linux/tcp.h> -/* MPTCP option subtypes */ #define MPTCPOPT_MP_CAPABLE 0
@@ -125,6 +123,11 @@ void mptcp_subflow_exit(void);void mptcp_get_options (const struct sk_buff *skb,struct tcp_options_received *options); +static inline bool mptcp_skb_ext_exist (const struct sk_buff *skb) +{ +return skb_ext_exist (skb,SKB_EXT_MPTCP ); +} +extern const struct tcp_request_sock_ops tcp_request_sock_ipv4_ops;void token_init (void );
@@ -180,5 +183,10 @@ static inline unsigned int mptcp_established_options(struct sock *sk,return 0 ; } +static inline bool mptcp_skb_ext_exist (const struct sk_buff *skb) +{ +return false; +} +#endif /* CONFIG_MPTCP */ #endif /* __NET_MPTCP_H */
include/net/tcp.h +8 -0
@@ -43,6 +43,7 @@#include <net/tcp_states.h> #include <net/inet_ecn.h> #include <net/dst.h> +#include <net/mptcp.h> #include <linux/seq_file.h> #include <linux/memcontrol.h>
@@ -954,6 +955,13 @@ static inline bool tcp_skb_can_collapse_to(const struct sk_buff *skb)return likely (!TCP_SKB_CB (skb)->eor); } +static inline bool tcp_skb_can_collapse (const struct sk_buff *to, +const struct sk_buff *from) +{ +return likely (tcp_skb_can_collapse_to (to) && + !mptcp_skb_ext_exist (from)); +} +/* Events passed to congestion control interface */ enum tcp_ca_event {CA_EVENT_TX_START ,/* first transmit when no packets in flight */
net/ipv4/tcp_input.c +8 -2
@@ -1396,7 +1396,7 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,if ((TCP_SKB_CB (prev)->sacked &TCPCB_TAGBITS ) !=TCPCB_SACKED_ACKED ) goto fallback; -if (!tcp_skb_can_collapse_to (prev)) +if (!tcp_skb_can_collapse (prev, skb)) goto fallback; in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) &&
@@ -4363,6 +4363,9 @@ static bool tcp_try_coalesce(struct sock *sk,if (TCP_SKB_CB (from)->seq !=TCP_SKB_CB (to)->end_seq)return false; +if (mptcp_skb_ext_exist (from)) +return false; +#ifdef CONFIG_TLS_DEVICE if (from->decrypted != to->decrypted)return false;
@@ -4880,10 +4883,12 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list, struct rb_root *root,/* The first skb to collapse is: * - not SYN/FIN and +* - does not use priv_data * - bloated or contains data before "start" or * overlaps to the next one. */ if (!(TCP_SKB_CB (skb)->tcp_flags & (TCPHDR_SYN |TCPHDR_FIN )) && + !mptcp_skb_ext_exist (skb) && (tcp_win_from_space (sk, skb->truesize) > skb->len ||before (TCP_SKB_CB (skb)->seq, start))) { end_of_skbs = false;
@@ -4899,7 +4904,7 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list, struct rb_root *root,/* Decided to skip this, advance start seq. */ start =TCP_SKB_CB (skb)->end_seq; } -if (end_of_skbs || +if (end_of_skbs ||mptcp_skb_ext_exist (skb) || (TCP_SKB_CB (skb)->tcp_flags & (TCPHDR_SYN |TCPHDR_FIN )))return ;
@@ -4942,6 +4947,7 @@ tcp_collapse(struct sock *sk, struct sk_buff_head *list, struct rb_root *root, skb =tcp_collapse_one (sk, skb, list, root);if (!skb || skb == tail || +mptcp_skb_ext_exist (skb) || (TCP_SKB_CB (skb)->tcp_flags & (TCPHDR_SYN |TCPHDR_FIN ))) goto end;#ifdef CONFIG_TLS_DEVICE
net/ipv4/tcp_output.c +1 -1
@@ -2901,7 +2901,7 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to,if (!tcp_can_collapse (sk, skb))break ; -if (!tcp_skb_can_collapse_to (to)) +if (!tcp_skb_can_collapse (to, skb))break ; space -= skb->len;
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 14/17 tcp: Export low-level TCP functions
In reply to Mat Martineau--- include/net/tcp.h | 4 ++++ net/ipv4/tcp.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-)
include/net/tcp.h +4 -0
@@ -334,6 +334,10 @@ int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset, size_t size, int flags);ssize_t do_tcp_sendpages (struct sock *sk,struct page *page,int offset,size_t size,int flags); +int tcp_send_mss (struct sock *sk,int *size_goal,int flags); +void tcp_skb_entail (struct sock *sk,struct sk_buff *skb); +void tcp_push (struct sock *sk,int flags,int mss_now,int nonagle, +int size_goal);void tcp_release_cb (struct sock *sk);void tcp_wfree (struct sk_buff *skb);void tcp_write_timer_handler (struct sock *sk);
net/ipv4/tcp.c +6 -6
@@ -657,7 +657,7 @@ static inline bool forced_push(const struct tcp_sock *tp)return after (tp->write_seq, tp->pushed_seq + (tp->max_window >>1 )); } -static void skb_entail (struct sock *sk,struct sk_buff *skb) +void tcp_skb_entail (struct sock *sk,struct sk_buff *skb) {struct tcp_sock *tp =tcp_sk (sk);struct tcp_skb_cb *tcb =TCP_SKB_CB (skb);
@@ -701,8 +701,8 @@ static bool tcp_should_autocork(struct sock *sk, struct sk_buff *skb,refcount_read (&sk->sk_wmem_alloc) > skb->truesize; } -static void tcp_push (struct sock *sk,int flags,int mss_now, -int nonagle,int size_goal) +void tcp_push (struct sock *sk,int flags,int mss_now, +int nonagle,int size_goal) {struct tcp_sock *tp =tcp_sk (sk);struct sk_buff *skb;
@@ -924,7 +924,7 @@ static unsigned int tcp_xmit_size_goal(struct sock *sk, u32 mss_now,return max (size_goal, mss_now); } -static int tcp_send_mss (struct sock *sk,int *size_goal,int flags) +int tcp_send_mss (struct sock *sk,int *size_goal,int flags) {int mss_now;
@@ -979,7 +979,7 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,if (!skb) goto wait_for_memory; -skb_entail (sk, skb); +tcp_skb_entail (sk, skb); copy = size_goal; }
@@ -1291,7 +1291,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) process_backlog = true; skb->ip_summed =CHECKSUM_PARTIAL ; -skb_entail (sk, skb); +tcp_skb_entail (sk, skb); copy = size_goal;/* All packets are restored as if they have
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 15/17 mptcp: Write MPTCP DSS headers to outgoing data packets
In reply to Mat MartineauPer-packet metadata required to write the MPTCP DSS option is written to the skb shared control buffer. One write to the socket may contain more than one packet of data, in which case the DSS option in the first packet will have a mapping covering all of the data in that write. Packets after the first do not have a DSS option. This is complicated to handle under memory pressure, since the first packet (with the DSS mapping) is pushed to the TCP core before the remaining skbs are allocated.
The current implementation is limited. If a non-blocking write only succeeds in sending part of the data, the mapping that was in the first packet will cover data that was not sent and is not buffered within the kernel. There's no guarantee that the socket user will write the same (or any) data when the socket becomes writable again.
The MPTCP DSS checksum is not yet implemented.
--- include/net/mptcp.h | 14 +++- net/ipv4/tcp_output.c | 153 +++++++++++++++++++++++++++++++++++++----- net/mptcp/protocol.c | 116 ++++++++++++++++++++++++++++---- net/mptcp/token.c | 13 ++-- 4 files changed, 259 insertions(+), 37 deletions(-)
include/net/mptcp.h +12 -2
@@ -39,6 +39,8 @@ struct mptcp_sock {struct inet_connection_sock sk;u64 local_key;u64 remote_key; +u64 write_seq; +u64 ack_seq;u32 token;struct socket *connection_list;/* @@ needs to be a list */ struct socket *subflow;/* outgoing connect, listener or !mp_capable */
@@ -71,8 +73,10 @@ struct subflow_sock {/* tcp_sock must be the first member */ struct tcp_sock sk;u64 local_key; -u64 remote_key;u32 token; +u64 idsn; +u64 remote_key; +u32 rel_write_seq;bool request_mptcp;// send MP_CAPABLE bool checksum;bool version;
@@ -94,8 +98,9 @@ struct subflow_request_sock { backup :1 , version : 4;u64 local_key; -u64 remote_key;u32 token; +u64 idsn; +u64 remote_key; }; static inline
@@ -106,6 +111,11 @@ struct subflow_request_sock *subflow_rsk(const struct request_sock *rsk)#ifdef CONFIG_MPTCP +static inline struct mptcp_skb_cb *mptcp_skb_priv_cb (struct sk_buff *skb) +{ +return (struct mptcp_skb_cb *)skb_ext_find (skb,SKB_EXT_MPTCP ); +} +void mptcp_parse_option (const unsigned char *ptr,int opsize,struct tcp_options_received *opt_rx);unsigned int mptcp_syn_options (struct sock *sk,u64 *local_key);
net/ipv4/tcp_output.c +136 -17
217 lines not on this page · raw message
net/mptcp/protocol.c +104 -12
142 lines not on this page · raw message
net/mptcp/token.c +7 -6
@@ -81,10 +81,11 @@ static void new_req_token(struct request_sock *req, ireq->ir_rmt_port);#endif } -pr_debug ("local_key=%llu:%llx" , local_key, local_key); subflow_req->local_key = local_key; -crypto_key_sha1 (subflow_req->local_key, &subflow_req->token,NULL ); -pr_debug ("token=%u" , subflow_req->token); +crypto_key_sha1 (subflow_req->local_key, &subflow_req->token, + &subflow_req->idsn); +pr_debug ("local_key=%llu, token=%u, idsn=%llu" , subflow_req->local_key, + subflow_req->token, subflow_req->idsn); }static void new_token (const struct sock *sk)
@@ -105,9 +106,9 @@ static void new_token(const struct sock *sk) isk->inet_dport);#endif } -pr_debug ("local_key=%llu:%llx" , subflow->local_key, subflow->local_key); -crypto_key_sha1 (subflow->local_key, &subflow->token,NULL ); -pr_debug ("token=%u" , subflow->token); +crypto_key_sha1 (subflow->local_key, &subflow->token, &subflow->idsn); +pr_debug ("local_key=%llu, token=%u, idsn=%llu" , subflow->local_key, + subflow->token, subflow->idsn); }static int insert_req_token (u32 token)
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 16/17 mptcp: Implement MPTCP receive path
In reply to Mat MartineauParses incoming DSS options and populates outgoing MPTCP ACK fields. Clone incoming skbs containing MPTCP headers and propagate them to the MMPTCP socket using the error queue. This avoids the need for TCP coalesce/collapse bypass for MPTCP, although cloning incoming skbs does prevent some coalescing.
Keeping DSS map handling separate from data reading makes it easier to add multiple-subflow receiving, since the receive code can determine which subflow contains relevant data or data that needs to be purged without touching the subflow data queues.
MPTCP ACK values are now populated from an atomic value stored in the connection socket rather than carried in the extended control block, which makes use of the most up-to-date sequence number and allows the MPTCP ACK to be populated on TCP ACK packets that have no payload.
--- include/linux/tcp.h | 12 ++ include/net/mptcp.h | 42 ++++- net/ipv4/tcp_input.c | 4 + net/ipv4/tcp_output.c | 109 ++++++------- net/mptcp/options.c | 97 +++++++++++- net/mptcp/protocol.c | 350 +++++++++++++++++++++++++++++++++++++++--- net/mptcp/subflow.c | 29 +++- 7 files changed, 558 insertions(+), 85 deletions(-)
include/linux/tcp.h +12 -0
@@ -112,6 +112,18 @@ struct tcp_options_received {u8 flags;u64 sndr_key;u64 rcvr_key; +u64 ack; +u64 seq; +u32 subflow_seq; +u16 dll; +__sum16 checksum; + u8 use_ack:1, + ack64:1, + use_map:1, + dsn64:1, + use_checksum:1, + data_fin:1, + __unused:2; } mptcp; };
include/net/mptcp.h +34 -8
88 lines not on this page · raw message
net/ipv4/tcp_input.c +4 -0
@@ -5663,6 +5663,10 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb)/* Process urgent data. */ tcp_urg (sk, skb, th); +/* Prepare MPTCP sequence data */ +if (tcp_sk (sk)->is_mptcp) +mptcp_attach_dss (sk, skb, &tp->rx_opt); +/* step 7: process the segment text */ tcp_data_queue (sk, skb);
net/ipv4/tcp_output.c +57 -52
170 lines not on this page · raw message
net/mptcp/options.c +96 -1
113 lines not on this page · raw message
net/mptcp/protocol.c +328 -22
415 lines not on this page · raw message
net/mptcp/subflow.c +27 -2
@@ -107,6 +107,8 @@ static void subflow_v4_init_req(struct request_sock *req, subflow_req->remote_key = rx_opt.mptcp.sndr_key;pr_debug ("remote_key=%llu" , subflow_req->remote_key);token_new_request (req, skb); +pr_debug ("syn seq=%u" ,TCP_SKB_CB (skb)->seq); + subflow_req->ssn_offset =TCP_SKB_CB (skb)->seq; }else { subflow_req->mp_capable =0 ; }
@@ -120,10 +122,15 @@ static void subflow_finish_connect(struct sock *sk, const struct sk_buff *skb)pr_debug ("subflow=%p" , subflow); -if (subflow->conn) { +if (!subflow->conn_finished) {pr_debug ("remote_key=%llu" , subflow->remote_key);mptcp_finish_connect (subflow->conn, subflow->mp_capable); - subflow->conn =NULL ; + subflow->conn_finished =1 ; + +if (skb) { +pr_debug ("synack seq=%u" ,TCP_SKB_CB (skb)->seq); + subflow->ssn_offset =TCP_SKB_CB (skb)->seq; + } } }
@@ -172,7 +179,9 @@ static struct sock *subflow_syn_recv_sock(const struct sock *sk, subflow->fourth_ack =1 ; subflow->remote_key = subflow_req->remote_key; subflow->local_key = subflow_req->local_key; + subflow->ssn_offset = subflow_req->ssn_offset; subflow->token = subflow_req->token; + subflow->idsn = subflow_req->idsn;pr_debug ("token=%u" , subflow->token);token_new_accept (child); }else {
@@ -202,6 +211,20 @@ const struct inet_connection_sock_af_ops subflow_specific = { .mtu_reduced = tcp_v4_mtu_reduced, }; +static void subflow_data_ready (struct sock *sk) +{ +struct subflow_sock *subflow =subflow_sk (sk); +struct sock *parent = subflow->conn; + +pr_debug ("sk=%p" , sk); + subflow->tcp_sk_data_ready (sk); + +if (parent) { +pr_debug ("parent=%p" , parent); + parent->sk_data_ready (parent); + } +} +static int subflow_init_sock (struct sock *sk) {struct subflow_sock *subflow =subflow_sk (sk);
@@ -215,6 +238,8 @@ static int subflow_init_sock(struct sock *sk)if (!err) {// @@ AND mptcp is enabled tsk->is_mptcp =1 ; icsk->icsk_af_ops = &subflow_specific; + subflow->tcp_sk_data_ready = sk->sk_data_ready; + sk->sk_data_ready = subflow_data_ready; }return err;
Signature · 1 line
2.20.0
Mat Martineau
RFC PATCH v5 17/17 mptcp: Make connection_list a real list of subflows
In reply to Mat MartineauFrom: Peter Krystad <peter.krystad(a)intel.com>
--- include/net/mptcp.h | 9 +- net/mptcp/protocol.c | 190 ++++++++++++++++++++++++++++++------------- 2 files changed, 141 insertions(+), 58 deletions(-)
include/net/mptcp.h +8 -1
@@ -16,6 +16,8 @@#ifndef __NET_MPTCP_H#define __NET_MPTCP_H +#include <linux/spinlock.h> +/* MPTCP option subtypes */ #define MPTCPOPT_MP_CAPABLE 0
@@ -42,10 +44,14 @@ struct mptcp_sock {u64 write_seq;atomic64_t ack_seq;u32 token; -struct socket *connection_list;/* @@ needs to be a list */ +spinlock_t conn_list_lock; +struct hlist_head conn_list;struct socket *subflow;/* outgoing connect, listener or !mp_capable */ }; +#define mptcp_for_each_subflow (__msk, __subflow) \ + hlist_for_each_entry_rcu(__subflow, &((__msk)->conn_list), node) +static inline struct mptcp_sock *mptcp_sk (const struct sock *sk) {return (struct mptcp_sock *)sk;
@@ -72,6 +78,7 @@ struct mptcp_skb_cb {struct subflow_sock {/* tcp_sock must be the first member */ struct tcp_sock sk; +struct hlist_node node;// conn_list of subflows u64 local_key;u64 map_seq;u32 map_subflow_seq;
net/mptcp/protocol.c +133 -57
337 lines not on this page · raw message
Signature · 1 line
2.20.0
Matthieu Baerts
Hello everyone,
Here is a short notification to say that, as discussed with Mat, we decided to put this patch-set on Gerrit to help reviewers.
The v4 has first been uploaded (on Gerrit: v1), followed by a rebase (on Gerrit: v2) and then this v5 (on Gerrit: v3). Feel free to then compare Gerrit versions 2 and 3 to see the differences between the v4 and this v5, e.g.
https://review.gerrithub.io/c/multipath-tcp/mptcp_net-next/+/437388/2..3
If you want to see all opened Changes for this project, please have a look there:
https://review.gerrithub.io/q/project:multipath-tcp%252Fmptcp_net-next+status:open
Cheers,
Matt
Quoted 125 lines · Mat Martineau
Hello everyone,
Peter and I have been working on this patch set to show how how MPTCP can fit in to the Linux networking stack using these design ideas:
* Applications opt-in to MPTCP using
IPPROTO_MPTCP, regular TCP sockets are still the default. A socket created withsocket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP)will attempt to form a MPTCP connection.IPPROTO_MPTCP== 99 as a placeholder.* Subflows exist within the kernel as separate sockets, owned by a MPTCP connection-level socket that is visible to userspace.
* Adds private pointers to struct
sk_buffto store MPTCP metadata.* Adds the
CONFIG_MPTCPoption toKconfig.This now makes use of Florian's skb extensions, as posted to netdev.
The following patches can form an MPTCP connection with the multipath-tcp.org kernel (tested with v0.94), and send DSS mappings that are accepted for the initial data packet. It is an early implementation, and I don't represent it as being upstreamable as-is or being everyone's idea of what an eventual upstream implementation will necessarily look like. It has significant limitations:
* Only one subflow is supported, no joins, and only ipv4.
* Does not support DSS checksums. Checksums must be disabled on the remote stack (for multipath-tcp.org, 'sudo sysctl -w net.mptcp.mptcp_checksum=0')
* Lots of debug statements (although they use dynamic debug and are disabled by default) and TODOs.
* It's only been tested sending small amounts of data for each send
Hopefully there are are some interesting concepts to discuss, and this code helps us assess how workable the above design principles are. Thanks in advance for your feedback on the benefits or drawbacks of this code, how it might be improved, or how other approaches might compare.
The patch set applies to Florian Westphal's
skb_ext_both_03branch
(https://git.breakpoint.cc/cgit/fw/net-next.git/log/?h=skb_ext_both_03),
commit idb363a92ec92a7af53e254f1ac0555567fbf790d1.I have also pushed the commits to:
https://git.kernel.org/pub/scm/linux/kernel/git/martineau/linux.git
(mptcp-proposal branch)v5 changes: Rebase on Florian's skb extensions. Fix !CONFIG_MPTCP build.
v4 changes: Refine skb extension (remove copy hook), change rx path to use skb extension instead of error queue,
v3 changes: Change skb extension technique, change rx path to use error queue, add foundational code for multiple subflows, and many bug fixes.
v2 changes: Added receive path implementation (last two patches). Reworked TCP option writing. Miscellaneous bug fixes including header dependency cleanup.
Mat Martineau (7):
tcp: Add MPTCP option number
tcp: DefineIPPROTO_MPTCP
mptcp: Add MPTCP to skb extensions
tcp: Prevent coalesce and collapse whenskb->privis used
tcp: Export low-level TCP functions
mptcp: Write MPTCP DSS headers to outgoing data packets
mptcp: Implement MPTCP receive pathPeter Krystad (10):
mptcp: Add MPTCP socket stubs
mptcp: Handle MPTCP TCP options
tcp: AddIPPROTO_SUBFLOW
tcp: expose tcp routines and structs for MPTCP
mptcp: Create SUBFLOW socket for outgoing connections
mptcp: Create SUBFLOW socket for incoming connections
mptcp: Add key generation and token tree
mptcp: Addshutdown()socket operation
mptcp: Add setsockopt()/getsockopt() socket operations
mptcp: Makeconnection_lista real list of subflowsinclude/linux/skbuff.h | 3 + include/linux/tcp.h | 26 ++ include/net/inet_common.h | 3 + include/net/mptcp.h | 235 ++++++++++ include/net/tcp.h | 17 + include/uapi/linux/in.h | 4 + net/Kconfig | 1 + net/Makefile | 1 + net/core/skbuff.c | 7 + net/ipv4/af_inet.c | 2 +- net/ipv4/tcp.c | 12 +- net/ipv4/tcp_input.c | 23 +- net/ipv4/tcp_ipv4.c | 4 +- net/ipv4/tcp_output.c | 243 ++++++++++- net/mptcp/Kconfig | 11 + net/mptcp/Makefile | 3 + net/mptcp/crypto.c | 215 +++++++++ net/mptcp/options.c | 301 +++++++++++++ net/mptcp/protocol.c | 895 ++++++++++++++++++++++++++++++++++++++ net/mptcp/subflow.c | 377 ++++++++++++++++ net/mptcp/token.c | 256 +++++++++++ 21 files changed, 2612 insertions(+), 27 deletions(-) create mode 100644 include/net/mptcp.h create mode 100644 net/mptcp/Kconfig create mode 100644 net/mptcp/Makefile create mode 100644 net/mptcp/crypto.c create mode 100644 net/mptcp/options.c create mode 100644 net/mptcp/protocol.c create mode 100644 net/mptcp/subflow.c create mode 100644 net/mptcp/token.c--
2.20.0_______________________________________________
mptcp mailing list
mptcp(a)lists.01.org
https://lists.01.org/mailman/listinfo/mptcp
Signature · 7 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium Disclaimer: https://www.tessares.net/mail-disclaimer/