Skip to contentSkip to conversation

Code-removal out of mptcp-net-next

PATCH Superseded Christoph Paasch 2 participants 17 messages Dec 6, 2018 – Dec 15, 2018

Subsystems (4)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Christoph Paasch

author
#0 lore raw

cover Code-removal out of mptcp-net-next

Series removing a lot of code out of mptcp-net-next.

Before:

$ git diff --shortstat  1464193107da..mptcp-net-next/master
 54 files changed, 14663 insertions(+), 375 deletions(-)
$ git diff --shortstat  1464193107da..HEAD
 50 files changed, 12286 insertions(+), 349 deletions(-)

Christoph Paasch (12):
mptcp: Remove support for DSS-checksums
mptcp: Remove some left-over cruft
mptcp: Remove RPS-recording for flow-steering in MPTCP
mptcp: Remove support for subflow-priorities (aka backup)
mptcp: Remove support for sendpage()
mptcp: Remove reinjection of data across subflows
mptcp: Remove support for TCP SYN-cookies
mptcp: Remove support for TCP Fast Open
mptcp: Remove MPTCP-code out of do_ip_setsockopt
mptcp: Remove scheduler-selection support
mptcp: Remove ndiffports path manager
mptcp: Make path-management no more a module nor selectable through
socketops

 include/linux/tcp.h          |  15 +-
 include/net/mptcp.h          | 236 +++++++---------------
 include/net/netns/mptcp.h    |   8 +-
 include/net/tcp.h            |  13 +-
 include/uapi/linux/if.h      |   1 -
 include/uapi/linux/tcp.h     |   1 -
 net/core/dev.c               |   2 +-
 net/ipv4/Kconfig             |  19 --
 net/ipv4/af_inet.c           |   6 -
 net/ipv4/ip_sockglue.c       |  14 --
 net/ipv4/syncookies.c        |  47 +----
 net/ipv4/tcp.c               | 155 +-------------
 net/ipv4/tcp_fastopen.c      |  16 +-
 net/ipv4/tcp_input.c         |  29 +--
 net/ipv4/tcp_output.c        |   3 +-
 net/ipv6/syncookies.c        |  32 +--
 net/mptcp/Kconfig            |  81 --------
 net/mptcp/Makefile           |   5 +-
 net/mptcp/mptcp_ctrl.c       | 168 +--------------
 net/mptcp/mptcp_fullmesh.c   | 462 ++++++------------------------------------
 net/mptcp/mptcp_input.c      | 338 ++-----------------------------
 net/mptcp/mptcp_ipv4.c       |  22 +-
 net/mptcp/mptcp_ipv6.c       |  22 +-
 net/mptcp/mptcp_ndiffports.c | 169 ----------------
 net/mptcp/mptcp_output.c     | 472 ++-----------------------------------------
 net/mptcp/mptcp_pm.c         | 226 ---------------------
 net/mptcp/mptcp_sched.c      | 271 +++----------------------
 27 files changed, 241 insertions(+), 2592 deletions(-)
 delete mode 100644 net/mptcp/mptcp_ndiffports.c
 delete mode 100644 net/mptcp/mptcp_pm.c
Signature · 1 line
2.16.2
author
#1 lore raw

PATCH 1/12 mptcp: Remove support for DSS-checksums

To reduce the code-size and complexity, we remove support for DSS-checksums. If we receive a MP_CAPABLE with a DSS-checksum we simply fallback to regular TCP.

Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/linux/tcp.h      |   3 +-
 include/net/mptcp.h      |  31 ++------
 net/mptcp/mptcp_ctrl.c   |  15 ----
 net/mptcp/mptcp_input.c  | 184 ++---------------------------------------------
 net/mptcp/mptcp_output.c |  69 ++----------------
 5 files changed, 17 insertions(+), 285 deletions(-)
include/linux/tcp.h +1 -2
index 29f8ab30c7ed..f38bf1e18e58 100644
@@ -94,8 +94,7 @@ struct tcp_out_options {
 	struct tcp_fastopen_cookie *fastopen_cookie;	/* Fast open cookie */
 #ifdef CONFIG_MPTCP
 	u16	mptcp_options;	/* bit field of MPTCP related OPTION_* */
-	u8	dss_csum:1,	/* dss-checksum required? */
-		add_addr_v4:1,
+	u8	add_addr_v4:1,
 		add_addr_v6:1,
 		mptcp_ver:4;
 
include/net/mptcp.h +6 -25
index b8b750034a91..a512e9386296 100644
@@ -102,8 +102,7 @@ struct mptcp_request_sock {
 
 	u8				loc_id;
 	u8				rem_id; /* Address-id in the MP_JOIN */
-	u8				dss_csum:1,
-					is_sub:1, /* Is this a new subflow? */
+	u8				is_sub:1, /* Is this a new subflow? */
 					low_prio:1, /* Interface set to low-prio? */
 					rcv_low_prio:1,
 					mptcp_ver:4;
@@ -111,7 +110,6 @@ struct mptcp_request_sock {
 
 struct mptcp_options_received {
 	u16	saw_mpc:1,
-		dss_csum:1,
 		drop_me:1,
 
 		is_mp_join:1,
@@ -168,7 +166,6 @@ struct mptcp_tcp_sock {
 		fully_established:1,
 		second_packet:1,
 		attached:1,
-		send_mp_fail:1,
 		include_mpc:1,
 		mapping_present:1,
 		map_data_fin:1,
@@ -269,7 +266,6 @@ struct mptcp_cb {
 		in_time_wait:1,
 		list_rcvd:1, /* XXX TO REMOVE */
 		addr_signal:1, /* Path-manager wants us to call addr_signal */
-		dss_csum:1,
 		server_side:1,
 		infinite_mapping_rcv:1,
 		infinite_mapping_snd:1,
@@ -288,7 +284,6 @@ struct mptcp_cb {
 	 * accessed. Thus, the whole data-path is on a single cache-line.
 	 */
 
-	u64	csum_cutoff_seq;
 	u64	infinite_rcv_seq;
 
 	/***** Start of fields, used for connection closure */
@@ -364,11 +359,9 @@ struct mptcp_cb {
  * To get the total length, just add the different options together.
  */
 #define MPTCP_SUB_LEN_SEQ	10
-#define MPTCP_SUB_LEN_SEQ_CSUM	12
 #define MPTCP_SUB_LEN_SEQ_ALIGN	12
 
 #define MPTCP_SUB_LEN_SEQ_64		14
-#define MPTCP_SUB_LEN_SEQ_CSUM_64	16
 #define MPTCP_SUB_LEN_SEQ_64_ALIGN	16
 
 #define MPTCP_SUB_LEN_ACK	4
@@ -434,10 +427,9 @@ extern bool mptcp_init_failed;
 #define OPTION_DATA_ACK		(1 << 4)
 #define OPTION_ADD_ADDR		(1 << 5)
 #define OPTION_MP_JOIN		(1 << 6)
-#define OPTION_MP_FAIL		(1 << 7)
-#define OPTION_MP_FCLOSE	(1 << 8)
-#define OPTION_REMOVE_ADDR	(1 << 9)
-#define OPTION_MP_PRIO		(1 << 10)
+#define OPTION_MP_FCLOSE	(1 << 7)
+#define OPTION_REMOVE_ADDR	(1 << 8)
+#define OPTION_MP_PRIO		(1 << 9)
 
 /* MPTCP flags: both TX and RX */
 #define MPTCPHDR_SEQ		0x01 /* DSS.M option is present */
@@ -447,7 +439,6 @@ extern bool mptcp_init_failed;
 #define MPTCPHDR_ACK		0x08
 #define MPTCPHDR_SEQ64_SET	0x10 /* Did we received a 64-bit seq number?  */
 #define MPTCPHDR_SEQ64_OFO	0x20 /* Is it not in our circular array? */
-#define MPTCPHDR_DSS_CSUM	0x40
 /* MPTCP flags: TX only */
 #define MPTCPHDR_INF		0x08
 #define MPTCP_REINJECT		0x10 /* Did we reinject this segment? */
@@ -640,16 +631,15 @@ struct mp_prio {
 	__u8	addr_id;
 } __attribute__((__packed__));
 
-static inline int mptcp_sub_len_dss(const struct mp_dss *m, const int csum)
+static inline int mptcp_sub_len_dss(const struct mp_dss *m)
 {
-	return 4 + m->A * (4 + m->a * 4) + m->M * (10 + m->m * 4 + csum * 2);
+	return 4 + m->A * (4 + m->a * 4) + m->M * (10 + m->m * 4);
 }
 
 #define MPTCP_SYSCTL	1
 
 extern int sysctl_mptcp_enabled;
 extern int sysctl_mptcp_version;
-extern int sysctl_mptcp_checksum;
 extern int sysctl_mptcp_debug;
 extern int sysctl_mptcp_syn_retries;
 
@@ -693,10 +683,8 @@ enum
 	MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK,/* Server-side fallback during 3-way handshake */
 	MPTCP_MIB_MPCAPABLEACTIVEFALLBACK, /* Client-side fallback during 3-way handshake */
 	MPTCP_MIB_MPCAPABLERETRANSFALLBACK,/* Client-side stopped sending MP_CAPABLE after too many SYN-retransmissions */
-	MPTCP_MIB_CSUMENABLED,		/* Created MPTCP-connection with DSS-checksum enabled */
 	MPTCP_MIB_RETRANSSEGS,		/* Segments retransmitted at the MPTCP-level */
 	MPTCP_MIB_MPFAILRX,		/* Received an MP_FAIL */
-	MPTCP_MIB_CSUMFAIL,		/* Received segment with invalid checksum */
 	MPTCP_MIB_FASTCLOSERX,		/* Recevied a FAST_CLOSE */
 	MPTCP_MIB_FASTCLOSETX,		/* Sent a FAST_CLOSE */
 	MPTCP_MIB_FBACKSUB,		/* Fallback upon ack without data-ack on new subflow */
@@ -921,9 +909,6 @@ static inline bool mptcp_can_sendpage(struct sock *sk)
 {
 	struct mptcp_tcp_sock *mptcp;
 
-	if (tcp_sk(sk)->mpcb->dss_csum)
-		return false;
-
 	mptcp_for_each_sub(tcp_sk(sk)->mpcb, mptcp) {
 		struct sock *sk_it = mptcp_to_sock(mptcp);
 
@@ -1058,7 +1043,6 @@ static inline int is_master_tp(const struct tcp_sock *tp)
 static inline void mptcp_init_mp_opt(struct mptcp_options_received *mopt)
 {
 	mopt->saw_mpc = 0;
-	mopt->dss_csum = 0;
 	mopt->drop_me = 0;
 
 	mopt->is_mp_join = 0;
@@ -1153,9 +1137,6 @@ static inline bool mptcp_can_sg(const struct sock *meta_sk)
 {
 	struct mptcp_tcp_sock *mptcp;
 
-	if (tcp_sk(meta_sk)->mpcb->dss_csum)
-		return false;
-
 	mptcp_for_each_sub(tcp_sk(meta_sk)->mpcb, mptcp) {
 		struct sock *sk = mptcp_to_sock(mptcp);
 
net/mptcp/mptcp_ctrl.c +0 -15
index 916438e31b59..8061b934e0d5 100644
@@ -67,7 +67,6 @@ int sysctl_mptcp_enabled __read_mostly = 1;
 int sysctl_mptcp_version __read_mostly = 0;
 static int min_mptcp_version;
 static int max_mptcp_version = 1;
-int sysctl_mptcp_checksum __read_mostly = 1;
 int sysctl_mptcp_debug __read_mostly;
 EXPORT_SYMBOL(sysctl_mptcp_debug);
 int sysctl_mptcp_syn_retries __read_mostly = 3;
@@ -132,13 +131,6 @@ static struct ctl_table mptcp_table[] = {
 		.extra1 = &min_mptcp_version,
 		.extra2 = &max_mptcp_version,
 	},
-	{
-		.procname = "mptcp_checksum",
-		.data = &sysctl_mptcp_checksum,
-		.maxlen = sizeof(int),
-		.mode = 0644,
-		.proc_handler = &proc_dointvec
-	},
 	{
 		.procname = "mptcp_debug",
 		.data = &sysctl_mptcp_debug,
@@ -2078,7 +2070,6 @@ static int __mptcp_check_req_master(struct sock *child,
 	child_tp->mptcp->snt_isn = tcp_rsk(req)->snt_isn;
 	child_tp->mptcp->rcv_isn = tcp_rsk(req)->rcv_isn;
 
-	mpcb->dss_csum = mtreq->dss_csum;
 	mpcb->server_side = 1;
 
 	/* Needs to be done here additionally, because when accepting a
@@ -2457,13 +2448,10 @@ void mptcp_reqsk_init(struct request_sock *req, const struct sock *sk,
 		      const struct sk_buff *skb, bool want_cookie)
 {
 	struct mptcp_options_received mopt;
-	struct mptcp_request_sock *mtreq = mptcp_rsk(req);
 
 	mptcp_init_mp_opt(&mopt);
 	tcp_parse_mptcp_options(skb, &mopt);
 
-	mtreq->dss_csum = mopt.dss_csum;
-
 	if (want_cookie) {
 		if (!mptcp_reqsk_new_cookie(req, sk, &mopt, skb))
 			/* No key available - back to regular TCP */
@@ -2500,7 +2488,6 @@ void mptcp_cookies_reqsk_init(struct request_sock *req,
 	inet_rsk(req)->saw_mpc = 1;
 	mtreq->is_sub = 0;
 	inet_rsk(req)->mptcp_rqsk = 1;
-	mtreq->dss_csum = mopt->dss_csum;
 
 out:
 	spin_unlock(&mptcp_tk_hashlock);
@@ -2771,10 +2758,8 @@ static const struct snmp_mib mptcp_snmp_list[] = {
 	SNMP_MIB_ITEM("MPCapableFallbackACK", MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK),
 	SNMP_MIB_ITEM("MPCapableFallbackSYNACK", MPTCP_MIB_MPCAPABLEACTIVEFALLBACK),
 	SNMP_MIB_ITEM("MPCapableRetransFallback", MPTCP_MIB_MPCAPABLERETRANSFALLBACK),
-	SNMP_MIB_ITEM("MPTCPCsumEnabled", MPTCP_MIB_CSUMENABLED),
 	SNMP_MIB_ITEM("MPTCPRetrans", MPTCP_MIB_RETRANSSEGS),
 	SNMP_MIB_ITEM("MPFailRX", MPTCP_MIB_MPFAILRX),
-	SNMP_MIB_ITEM("MPCsumFail", MPTCP_MIB_CSUMFAIL),
 	SNMP_MIB_ITEM("MPFastcloseRX", MPTCP_MIB_FASTCLOSERX),
 	SNMP_MIB_ITEM("MPFastcloseTX", MPTCP_MIB_FASTCLOSETX),
 	SNMP_MIB_ITEM("MPFallbackAckSub", MPTCP_MIB_FBACKSUB),
net/mptcp/mptcp_input.c +5 -179

244 lines not on this page · raw message

net/mptcp/mptcp_output.c +5 -64

147 lines not on this page · raw message

Signature · 1 line
2.16.2
#2 lore raw

Re: [MPTCP] [PATCH 01/12] mptcp: Remove support for DSS-checksums

Quoted 3 lines · Christoph Paasch

To reduce the code-size and complexity, we remove support for DSS-checksums. If we receive a MP_CAPABLE with a DSS-checksum we simply fallback to regular TCP.

I'd been assuming that DSS checksums would be part of the initial upstream feature set - the goal being RFC compliance (without 'should' or 'may' features from the spec that add complexity). I'm ok with adjusting the goal if it makes sense to do so, just want to confirm that removing and reimplementing checksums is worthwhile.

Mat

Quoted 655 lines
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>

---

include/linux/tcp.h      |   3 +-
include/net/mptcp.h      |  31 ++------
net/mptcp/mptcp_ctrl.c   |  15 ----
net/mptcp/mptcp_input.c  | 184 ++---------------------------------------------
net/mptcp/mptcp_output.c |  69 ++----------------
5 files changed, 17 insertions(+), 285 deletions(-)
include/linux/tcp.h +1 -2
index 29f8ab30c7ed..f38bf1e18e58 100644
@@ -94,8 +94,7 @@ struct tcp_out_options {
 	struct tcp_fastopen_cookie *fastopen_cookie;	/* Fast open cookie */
 #ifdef CONFIG_MPTCP
 	u16	mptcp_options;	/* bit field of MPTCP related OPTION_* */
-	u8	dss_csum:1,	/* dss-checksum required? */
-		add_addr_v4:1,
+	u8	add_addr_v4:1,
 		add_addr_v6:1,
 		mptcp_ver:4;
 
include/net/mptcp.h +6 -25
index b8b750034a91..a512e9386296 100644
@@ -102,8 +102,7 @@ struct mptcp_request_sock {
 
 	u8				loc_id;
 	u8				rem_id; /* Address-id in the MP_JOIN */
-	u8				dss_csum:1,
-					is_sub:1, /* Is this a new subflow? */
+	u8				is_sub:1, /* Is this a new subflow? */
 					low_prio:1, /* Interface set to low-prio? */
 					rcv_low_prio:1,
 					mptcp_ver:4;
@@ -111,7 +110,6 @@ struct mptcp_request_sock {
 
 struct mptcp_options_received {
 	u16	saw_mpc:1,
-		dss_csum:1,
 		drop_me:1,
 
 		is_mp_join:1,
@@ -168,7 +166,6 @@ struct mptcp_tcp_sock {
 		fully_established:1,
 		second_packet:1,
 		attached:1,
-		send_mp_fail:1,
 		include_mpc:1,
 		mapping_present:1,
 		map_data_fin:1,
@@ -269,7 +266,6 @@ struct mptcp_cb {
 		in_time_wait:1,
 		list_rcvd:1, /* XXX TO REMOVE */
 		addr_signal:1, /* Path-manager wants us to call addr_signal */
-		dss_csum:1,
 		server_side:1,
 		infinite_mapping_rcv:1,
 		infinite_mapping_snd:1,
@@ -288,7 +284,6 @@ struct mptcp_cb {
 	 * accessed. Thus, the whole data-path is on a single cache-line.
 	 */
 
-	u64	csum_cutoff_seq;
 	u64	infinite_rcv_seq;
 
 	/***** Start of fields, used for connection closure */
@@ -364,11 +359,9 @@ struct mptcp_cb {
 * To get the total length, just add the different options together.
 */
 #define MPTCP_SUB_LEN_SEQ	10
-#define MPTCP_SUB_LEN_SEQ_CSUM	12
 #define MPTCP_SUB_LEN_SEQ_ALIGN	12
 
 #define MPTCP_SUB_LEN_SEQ_64		14
-#define MPTCP_SUB_LEN_SEQ_CSUM_64	16
 #define MPTCP_SUB_LEN_SEQ_64_ALIGN	16
 
 #define MPTCP_SUB_LEN_ACK	4
@@ -434,10 +427,9 @@ extern bool mptcp_init_failed;
 #define OPTION_DATA_ACK		(1 << 4)
 #define OPTION_ADD_ADDR		(1 << 5)
 #define OPTION_MP_JOIN		(1 << 6)
-#define OPTION_MP_FAIL		(1 << 7)
-#define OPTION_MP_FCLOSE	(1 << 8)
-#define OPTION_REMOVE_ADDR	(1 << 9)
-#define OPTION_MP_PRIO		(1 << 10)
+#define OPTION_MP_FCLOSE	(1 << 7)
+#define OPTION_REMOVE_ADDR	(1 << 8)
+#define OPTION_MP_PRIO		(1 << 9)
 
 /* MPTCP flags: both TX and RX */
 #define MPTCPHDR_SEQ		0x01 /* DSS.M option is present */
@@ -447,7 +439,6 @@ extern bool mptcp_init_failed;
 #define MPTCPHDR_ACK		0x08
 #define MPTCPHDR_SEQ64_SET	0x10 /* Did we received a 64-bit seq number?  */
 #define MPTCPHDR_SEQ64_OFO	0x20 /* Is it not in our circular array? */
-#define MPTCPHDR_DSS_CSUM	0x40
 /* MPTCP flags: TX only */
 #define MPTCPHDR_INF		0x08
 #define MPTCP_REINJECT		0x10 /* Did we reinject this segment? */
@@ -640,16 +631,15 @@ struct mp_prio {
 	__u8	addr_id;
 } __attribute__((__packed__));
 
-static inline int mptcp_sub_len_dss(const struct mp_dss *m, const int csum)
+static inline int mptcp_sub_len_dss(const struct mp_dss *m)
 {
-	return 4 + m->A * (4 + m->a * 4) + m->M * (10 + m->m * 4 + csum * 2);
+	return 4 + m->A * (4 + m->a * 4) + m->M * (10 + m->m * 4);
 }
 
 #define MPTCP_SYSCTL	1
 
 extern int sysctl_mptcp_enabled;
 extern int sysctl_mptcp_version;
-extern int sysctl_mptcp_checksum;
 extern int sysctl_mptcp_debug;
 extern int sysctl_mptcp_syn_retries;
 
@@ -693,10 +683,8 @@ enum
 	MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK,/* Server-side fallback during 3-way handshake */
 	MPTCP_MIB_MPCAPABLEACTIVEFALLBACK, /* Client-side fallback during 3-way handshake */
 	MPTCP_MIB_MPCAPABLERETRANSFALLBACK,/* Client-side stopped sending MP_CAPABLE after too many SYN-retransmissions */
-	MPTCP_MIB_CSUMENABLED,		/* Created MPTCP-connection with DSS-checksum enabled */
 	MPTCP_MIB_RETRANSSEGS,		/* Segments retransmitted at the MPTCP-level */
 	MPTCP_MIB_MPFAILRX,		/* Received an MP_FAIL */
-	MPTCP_MIB_CSUMFAIL,		/* Received segment with invalid checksum */
 	MPTCP_MIB_FASTCLOSERX,		/* Recevied a FAST_CLOSE */
 	MPTCP_MIB_FASTCLOSETX,		/* Sent a FAST_CLOSE */
 	MPTCP_MIB_FBACKSUB,		/* Fallback upon ack without data-ack on new subflow */
@@ -921,9 +909,6 @@ static inline bool mptcp_can_sendpage(struct sock *sk)
 {
 	struct mptcp_tcp_sock *mptcp;
 
-	if (tcp_sk(sk)->mpcb->dss_csum)
-		return false;
-
 	mptcp_for_each_sub(tcp_sk(sk)->mpcb, mptcp) {
 		struct sock *sk_it = mptcp_to_sock(mptcp);
 
@@ -1058,7 +1043,6 @@ static inline int is_master_tp(const struct tcp_sock *tp)
 static inline void mptcp_init_mp_opt(struct mptcp_options_received *mopt)
 {
 	mopt->saw_mpc = 0;
-	mopt->dss_csum = 0;
 	mopt->drop_me = 0;
 
 	mopt->is_mp_join = 0;
@@ -1153,9 +1137,6 @@ static inline bool mptcp_can_sg(const struct sock *meta_sk)
 {
 	struct mptcp_tcp_sock *mptcp;
 
-	if (tcp_sk(meta_sk)->mpcb->dss_csum)
-		return false;
-
 	mptcp_for_each_sub(tcp_sk(meta_sk)->mpcb, mptcp) {
 		struct sock *sk = mptcp_to_sock(mptcp);
 
net/mptcp/mptcp_ctrl.c +0 -13
index 916438e31b59..8061b934e0d5 100644
@@ -67,7 +67,6 @@ int sysctl_mptcp_enabled __read_mostly = 1;
 int sysctl_mptcp_version __read_mostly = 0;
 static int min_mptcp_version;
 static int max_mptcp_version = 1;
-int sysctl_mptcp_checksum __read_mostly = 1;
 int sysctl_mptcp_debug __read_mostly;
 EXPORT_SYMBOL(sysctl_mptcp_debug);
 int sysctl_mptcp_syn_retries __read_mostly = 3;
@@ -132,13 +131,6 @@ static struct ctl_table mptcp_table[] = {
 		.extra1 = &min_mptcp_version,
 		.extra2 = &max_mptcp_version,
 	},
-	{
-		.procname = "mptcp_checksum",
-		.data = &sysctl_mptcp_checksum,
-		.maxlen = sizeof(int),
-		.mode = 0644,
-		.proc_handler = &proc_dointvec
-	},
 	{
 		.procname = "mptcp_debug",
 		.data = &sysctl_mptcp_debug,
@@ -2078,7 +2070,6 @@ static int __mptcp_check_req_master(struct sock *child,
 	child_tp->mptcp->snt_isn = tcp_rsk(req)->snt_isn;
 	child_tp->mptcp->rcv_isn = tcp_rsk(req)->rcv_isn;
 
-	mpcb->dss_csum = mtreq->dss_csum;
 	mpcb->server_side = 1;
 
 	/* Needs to be done here additionally, because when accepting a
@@ -2457,13 +2448,10 @@ void mptcp_reqsk_init(struct request_sock *req, const struct sock *sk,
 		      const struct sk_buff *skb, bool want_cookie)
 {
 	struct mptcp_options_received mopt;
-	struct mptcp_request_sock *mtreq = mptcp_rsk(req);
 
 	mptcp_init_mp_opt(&mopt);
 	tcp_parse_mptcp_options(skb, &mopt);
 
-	mtreq->dss_csum = mopt.dss_csum;
-
 	if (want_cookie) {
 		if (!mptcp_reqsk_new_cookie(req, sk, &mopt, skb))
 			/* No key available - back to regular TCP */
@@ -2500,7 +2488,6 @@ void mptcp_cookies_reqsk_init(struct request_sock *req,
 	inet_rsk(req)->saw_mpc = 1;
 	mtreq->is_sub = 0;
 	inet_rsk(req)->mptcp_rqsk = 1;
-	mtreq->dss_csum = mopt->dss_csum;
 

out:

	spin_unlock(&mptcp_tk_hashlock);
net/mptcp/mptcp_ctrl.c +0 -2
@@ -2771,10 +2758,8 @@ static const struct snmp_mib mptcp_snmp_list[] = {
 	SNMP_MIB_ITEM("MPCapableFallbackACK", MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK),
 	SNMP_MIB_ITEM("MPCapableFallbackSYNACK", MPTCP_MIB_MPCAPABLEACTIVEFALLBACK),
 	SNMP_MIB_ITEM("MPCapableRetransFallback", MPTCP_MIB_MPCAPABLERETRANSFALLBACK),
-	SNMP_MIB_ITEM("MPTCPCsumEnabled", MPTCP_MIB_CSUMENABLED),
 	SNMP_MIB_ITEM("MPTCPRetrans", MPTCP_MIB_RETRANSSEGS),
 	SNMP_MIB_ITEM("MPFailRX", MPTCP_MIB_MPFAILRX),
-	SNMP_MIB_ITEM("MPCsumFail", MPTCP_MIB_CSUMFAIL),
 	SNMP_MIB_ITEM("MPFastcloseRX", MPTCP_MIB_FASTCLOSERX),
 	SNMP_MIB_ITEM("MPFastcloseTX", MPTCP_MIB_FASTCLOSETX),
 	SNMP_MIB_ITEM("MPFallbackAckSub", MPTCP_MIB_FBACKSUB),
net/mptcp/mptcp_input.c +5 -179
index d2a605cbdd04..9a4d1609b3b9 100644
@@ -269,133 +269,6 @@ static int mptcp_rcv_state_process(struct sock *meta_sk, struct sock *sk,
 	return 0;
 }
 
-/**
- * @return:
- *  i) 1: Everything's fine.
- *  ii) -1: A reset has been sent on the subflow - csum-failure
- *  iii) 0: csum-failure but no reset sent, because it's the last subflow.
- *	 Last packet should not be destroyed by the caller because it has
- *	 been done here.
- */
-static int mptcp_verif_dss_csum(struct sock *sk)
-{
-	struct tcp_sock *tp = tcp_sk(sk);
-	struct sk_buff *tmp, *tmp1, *last = NULL;
-	__wsum csum_tcp = 0; /* cumulative checksum of pld + mptcp-header */
-	int ans = 1, overflowed = 0, offset = 0, dss_csum_added = 0;
-	int iter = 0;
-
-	skb_queue_walk_safe(&sk->sk_receive_queue, tmp, tmp1) {
-		unsigned int csum_len;
-
-		if (before(tp->mptcp->map_subseq + tp->mptcp->map_data_len, TCP_SKB_CB(tmp)->end_seq))
-			/* Mapping ends in the middle of the packet -
-			 * csum only these bytes
-			 */
-			csum_len = tp->mptcp->map_subseq + tp->mptcp->map_data_len - TCP_SKB_CB(tmp)->seq;
-		else
-			csum_len = tmp->len;
-
-		offset = 0;
-		if (overflowed) {
-			char first_word[4];
-			first_word[0] = 0;
-			first_word[1] = 0;
-			first_word[2] = 0;
-			first_word[3] = *(tmp->data);
-			csum_tcp = csum_partial(first_word, 4, csum_tcp);
-			offset = 1;
-			csum_len--;
-			overflowed = 0;
-		}
-
-		csum_tcp = skb_checksum(tmp, offset, csum_len, csum_tcp);
-
-		/* Was it on an odd-length? Then we have to merge the next byte
-		 * correctly (see above)
-		 */
-		if (csum_len != (csum_len & (~1)))
-			overflowed = 1;
-
-		if (mptcp_is_data_seq(tmp) && !dss_csum_added) {
-			__be32 data_seq = htonl((u32)(tp->mptcp->map_data_seq >> 32));
-
-			/* If a 64-bit dss is present, we increase the offset
-			 * by 4 bytes, as the high-order 64-bits will be added
-			 * in the final csum_partial-call.
-			 */
-			u32 offset = skb_transport_offset(tmp) +
-				     TCP_SKB_CB(tmp)->dss_off;
-			if (TCP_SKB_CB(tmp)->mptcp_flags & MPTCPHDR_SEQ64_SET)
-				offset += 4;
-
-			csum_tcp = skb_checksum(tmp, offset,
-						MPTCP_SUB_LEN_SEQ_CSUM,
-						csum_tcp);
-
-			csum_tcp = csum_partial(&data_seq,
-						sizeof(data_seq), csum_tcp);
-
-			dss_csum_added = 1; /* Just do it once */
-		}
-		last = tmp;
-		iter++;
-
-		if (!skb_queue_is_last(&sk->sk_receive_queue, tmp) &&
-		    !before(TCP_SKB_CB(tmp1)->seq,
-			    tp->mptcp->map_subseq + tp->mptcp->map_data_len))
-			break;
-	}
-
-	/* Now, checksum must be 0 */
-	if (unlikely(csum_fold(csum_tcp))) {
-		struct mptcp_tcp_sock *mptcp;
-		struct sock *sk_it = NULL;
-
-		pr_err("%s csum is wrong: %#x tcp-seq %u dss_csum_added %d overflowed %d iterations %d\n",
-		       __func__, csum_fold(csum_tcp), TCP_SKB_CB(last)->seq,
-		       dss_csum_added, overflowed, iter);
-
-		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_CSUMFAIL);
-		tp->mptcp->send_mp_fail = 1;
-
-		/* map_data_seq is the data-seq number of the
-		 * mapping we are currently checking
-		 */
-		tp->mpcb->csum_cutoff_seq = tp->mptcp->map_data_seq;
-
-		/* Search for another subflow that is fully established */
-		mptcp_for_each_sub(tp->mpcb, mptcp) {
-			sk_it = mptcp_to_sock(mptcp);
-
-			if (sk_it != sk &&
-			    tcp_sk(sk_it)->mptcp->fully_established)
-				break;
-
-			sk_it = NULL;
-		}
-
-		if (sk_it) {
-			mptcp_send_reset(sk);
-			ans = -1;
-		} else {
-			tp->mpcb->send_infinite_mapping = 1;
-
-			/* Need to purge the rcv-queue as it's no more valid */
-			while ((tmp = __skb_dequeue(&sk->sk_receive_queue)) != NULL) {
-				tp->copied_seq = TCP_SKB_CB(tmp)->end_seq;
-				kfree_skb(tmp);
-			}
-
-			mptcp_sub_force_close_all(tp->mpcb, sk);
-
-			ans = 0;
-		}
-	}
-
-	return ans;
-}
-
 static inline void mptcp_prepare_skb(struct sk_buff *skb,
 				     const struct sock *sk)
 {
@@ -710,10 +583,6 @@ static int mptcp_detect_mapping(struct sock *sk, struct sk_buff *skb)
 		mpcb->infinite_mapping_rcv = 1;
 		mpcb->send_infinite_mapping = 1;
 		tp->mptcp->fully_established = 1;
-		/* We need to repeat mp_fail's until the sender felt
-		 * back to infinite-mapping - here we stop repeating it.
-		 */
-		tp->mptcp->send_mp_fail = 0;
 
 		/* We have to fixup data_len - it must be the same as skb->len */
 		data_len = skb->len + (mptcp_is_data_fin(skb) ? 1 : 0);
@@ -735,17 +604,6 @@ static int mptcp_detect_mapping(struct sock *sk, struct sk_buff *skb)
 		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_INFINITEMAPRX);
 	}
 
-	/* We are sending mp-fail's and thus are in fallback mode.
-	 * Ignore packets which do not announce the fallback and still
-	 * want to provide a mapping.
-	 */
-	if (tp->mptcp->send_mp_fail) {
-		tp->copied_seq = TCP_SKB_CB(skb)->end_seq;
-		__skb_unlink(skb, &sk->sk_receive_queue);
-		__kfree_skb(skb);
-		return -1;
-	}
-
 	/* FIN increased the mapping-length by 1 */
 	if (mptcp_is_data_fin(skb))
 		data_len--;
@@ -957,16 +815,6 @@ static int mptcp_queue_skb(struct sock *sk)
 		mpcb->dfin_combined = !!(sk->sk_shutdown & RCV_SHUTDOWN);
 	}
 
-	/* Verify the checksum */
-	if (mpcb->dss_csum && !mpcb->infinite_mapping_rcv) {
-		int ret = mptcp_verif_dss_csum(sk);
-
-		if (ret <= 0) {
-			mptcp_reset_mapping(tp, old_copied_seq);
-			return 1;
-		}
-	}
-
 	if (before64(rcv_nxt64, tp->mptcp->map_data_seq)) {
 		/* Seg's have to go to the meta-ofo-queue */
 		skb_queue_walk_safe(&sk->sk_receive_queue, tmp1, tmp) {
@@ -1605,6 +1453,10 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
 			break;
 		}
 
+		/* We do not support DSS-checksums */
+		if (mpcapable->a)
+			break;
+
 		/* MPTCP-RFC 6824:
 		 * "If receiving a message with the 'B' flag set to 1, and this
 		 * is not understood, then this SYN MUST be silently ignored;
@@ -1622,7 +1474,6 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
 			break;
 
 		mopt->saw_mpc = 1;
-		mopt->dss_csum = sysctl_mptcp_checksum || mpcapable->a;
 
 		if (opsize >= MPTCP_SUB_LEN_CAPABLE_SYN)
 			mopt->mptcp_sender_key = mpcapable->sender_key;
@@ -1677,15 +1528,7 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
 		const struct mp_dss *mdss = (struct mp_dss *)ptr;
 		struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
 
-		/* We check opsize for the csum and non-csum case. We do this,
-		 * because the draft says that the csum SHOULD be ignored if
-		 * it has not been negotiated in the MP_CAPABLE but still is
-		 * present in the data.
-		 *
-		 * It will get ignored later in mptcp_queue_skb.
-		 */
-		if (opsize != mptcp_sub_len_dss(mdss, 0) &&
-		    opsize != mptcp_sub_len_dss(mdss, 1)) {
+		if (opsize != mptcp_sub_len_dss(mdss)) {
 			mptcp_debug("%s: mp_dss: bad option size %d\n",
 				    __func__, opsize);
 			break;
@@ -1723,10 +1566,6 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
 
 			tcb->mptcp_flags |= MPTCPHDR_SEQ;
 
-			/* Is a check-sum present? */
-			if (opsize == mptcp_sub_len_dss(mdss, 1))
-				tcb->mptcp_flags |= MPTCPHDR_DSS_CSUM;
-
 			/* DATA_FIN only possible with DSS-mapping */
 			if (mdss->F)
 				tcb->mptcp_flags |= MPTCPHDR_FIN;
@@ -2101,16 +1940,6 @@ bool mptcp_handle_options(struct sock *sk, const struct tcphdr *th,
 	if (unlikely(mopt->mp_fail))
 		mptcp_mp_fail_rcvd(sk, th);
 
-	/* RFC 6824, Section 3.3:
-	 * If a checksum is not present when its use has been negotiated, the
-	 * receiver MUST close the subflow with a RST as it is considered broken.
-	 */
-	if (mptcp_is_data_seq(skb) && tp->mpcb->dss_csum &&
-	    !(TCP_SKB_CB(skb)->mptcp_flags & MPTCPHDR_DSS_CSUM)) {
-		mptcp_send_reset(sk);
-		return true;
-	}
-
 	/* We have to acknowledge retransmissions of the third
 	 * ack.
 	 */
@@ -2290,9 +2119,6 @@ int mptcp_rcv_synsent_state_process(struct sock *sk, struct sock **skptr,
 		 * is not part of any mapping.
 		 */
 		tp->mptcp->snt_isn = tp->snd_una - 1;
-		tp->mpcb->dss_csum = mopt->dss_csum;
-		if (tp->mpcb->dss_csum)
-			MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_CSUMENABLED);
 
 		tp->mptcp->include_mpc = 1;
 
net/mptcp/mptcp_output.c +5 -64
index 1de93c405c78..f9bce20259e9 100644
@@ -407,22 +407,7 @@ static int mptcp_write_dss_mapping(const struct tcp_sock *tp, const struct sk_bu
 	else
 		data_len = tcb->end_seq - tcb->seq;
 
-	if (tp->mpcb->dss_csum && data_len) {
-		__be16 *p16 = (__be16 *)ptr;
-		__be32 hdseq = mptcp_get_highorder_sndbits(skb, tp->mpcb);
-		__wsum csum;
-
-		*ptr = htonl(((data_len) << 16) |
-			     (TCPOPT_EOL << 8) |
-			     (TCPOPT_EOL));
-		csum = csum_partial(ptr - 2, 12, skb->csum);
-		p16++;
-		*p16++ = csum_fold(csum_partial(&hdseq, sizeof(hdseq), csum));
-	} else {
-		*ptr++ = htonl(((data_len) << 16) |
-			       (TCPOPT_NOP << 8) |
-			       (TCPOPT_NOP));
-	}
+	*ptr++ = htonl(((data_len) << 16) | (TCPOPT_NOP << 8) | (TCPOPT_NOP));
 
 	return ptr - start;
 }
@@ -442,7 +427,7 @@ static int mptcp_write_dss_data_ack(const struct tcp_sock *tp, const struct sk_b
 	mdss->M = mptcp_is_data_seq(skb) ? 1 : 0;
 	mdss->a = 0;
 	mdss->A = 1;
-	mdss->len = mptcp_sub_len_dss(mdss, tp->mpcb->dss_csum);
+	mdss->len = mptcp_sub_len_dss(mdss);
 	ptr++;
 
 	*ptr++ = htonl(mptcp_meta_tp(tp)->rcv_nxt);
@@ -456,10 +441,6 @@ static int mptcp_write_dss_data_ack(const struct tcp_sock *tp, const struct sk_b
 * arguably means that we would change the mapping (e.g. it splits it,
 * our sends out a subset of the initial mapping).
 *
- * Furthermore, the skb checksum is not always preserved across splits
- * (e.g. mptcp_fragment) which would mean that we need to recompute
- * the DSS checksum in this case.
- *
 * To avoid this we save the initial DSS mapping which allows us to
 * send the same DSS mapping even for fragmented retransmits.
 */
@@ -519,10 +500,6 @@ static bool mptcp_skb_entail(struct sock *sk, struct sk_buff *skb, int reinject)
 
 	TCP_SKB_CB(skb)->path_mask |= mptcp_pi_to_flag(tp->mptcp->path_index);
 
-	/* Compute checksum */
-	if (tp->mpcb->dss_csum)
-		subskb->csum = skb->csum = skb_checksum(skb, 0, skb->len, 0);
-
 	tcb = TCP_SKB_CB(subskb);
 
 	if (tp->mpcb->send_infinite_mapping &&
@@ -977,7 +954,6 @@ void mptcp_syn_options(const struct sock *sk, struct tcp_out_options *opts,
 		opts->mptcp_ver = tcp_sk(sk)->mptcp_ver;
 		*remaining -= MPTCP_SUB_LEN_CAPABLE_SYN_ALIGN;
 		opts->mp_capable.sender_key = tp->mptcp_loc_key;
-		opts->dss_csum = !!sysctl_mptcp_checksum;
 	} else {
 		const struct mptcp_cb *mpcb = tp->mpcb;
 
@@ -1002,7 +978,6 @@ void mptcp_synack_options(struct request_sock *req,
 		opts->mptcp_options |= OPTION_MP_CAPABLE | OPTION_TYPE_SYNACK;
 		opts->mptcp_ver = mtreq->mptcp_ver;
 		opts->mp_capable.sender_key = mtreq->mptcp_loc_key;
-		opts->dss_csum = !!sysctl_mptcp_checksum || mtreq->dss_csum;
 		*remaining -= MPTCP_SUB_LEN_CAPABLE_SYN_ALIGN;
 	} else {
 		opts->mptcp_options |= OPTION_MP_JOIN | OPTION_TYPE_SYNACK;
@@ -1070,7 +1045,6 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 		opts->mptcp_ver = mpcb->mptcp_ver;
 		opts->mp_capable.sender_key = mpcb->mptcp_loc_key;
 		opts->mp_capable.receiver_key = mpcb->mptcp_rem_key;
-		opts->dss_csum = mpcb->dss_csum;
 
 		if (skb)
 			tp->mptcp->include_mpc = 0;
@@ -1100,9 +1074,6 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 		if (skb && !mptcp_is_data_seq(skb)) {
 			*size += MPTCP_SUB_LEN_ACK_ALIGN;
 		} else {
-			/* Doesn't matter, if csum included or not. It will be
-			 * either 10 or 12, and thus aligned = 12
-			 */
 			*size += MPTCP_SUB_LEN_ACK_ALIGN +
 				 MPTCP_SUB_LEN_SEQ_ALIGN;
 		}
@@ -1110,16 +1081,6 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 		*size += MPTCP_SUB_LEN_DSS_ALIGN;
 	}
 
-	/* In fallback mp_fail-mode, we have to repeat it until the fallback
-	 * has been done by the sender
-	 */
-	if (unlikely(tp->mptcp->send_mp_fail) && skb &&
-	    MAX_TCP_OPTION_SPACE - *size >= MPTCP_SUB_LEN_FAIL) {
-		opts->options |= OPTION_MPTCP;
-		opts->mptcp_options |= OPTION_MP_FAIL;
-		*size += MPTCP_SUB_LEN_FAIL;
-	}
-
 	if (unlikely(mpcb->addr_signal) && mpcb->pm_ops->addr_signal &&
 	    mpcb->mptcp_ver < MPTCP_VERSION_1)
 		mpcb->pm_ops->addr_signal(sk, size, opts, skb);
@@ -1172,7 +1133,7 @@ void mptcp_options_write(__be32 *ptr, struct tcp_sock *tp,
 		}
 
 		mpc->sub = MPTCP_SUB_CAPABLE;
-		mpc->a = opts->dss_csum;
+		mpc->a = 0;
 		mpc->b = 0;
 		mpc->rsv = 0;
 		mpc->h = 1;
@@ -1272,18 +1233,6 @@ void mptcp_options_write(__be32 *ptr, struct tcp_sock *tp,
 
 		MPTCP_INC_STATS(sock_net((struct sock *)tp), MPTCP_MIB_REMADDRTX);
 	}
-	if (unlikely(OPTION_MP_FAIL & opts->mptcp_options)) {
-		struct mp_fail *mpfail = (struct mp_fail *)ptr;
-
-		mpfail->kind = TCPOPT_MPTCP;
-		mpfail->len = MPTCP_SUB_LEN_FAIL;
-		mpfail->sub = MPTCP_SUB_FAIL;
-		mpfail->rsv1 = 0;
-		mpfail->rsv2 = 0;
-		mpfail->data_seq = htonll(tp->mpcb->csum_cutoff_seq);
-
-		ptr += MPTCP_SUB_LEN_FAIL_ALIGN >> 2;
-	}
 	if (unlikely(OPTION_MP_FCLOSE & opts->mptcp_options)) {
 		struct mp_fclose *mpfclose = (struct mp_fclose *)ptr;
 
@@ -1848,15 +1797,7 @@ int mptcp_select_size(const struct sock *meta_sk, bool first_skb, bool zc)
 		if (zc)
 			return 0;
 
-		if (!tcp_sk(meta_sk)->mpcb->dss_csum) {
-			mss = linear_payload_sz(first_skb);
-		} else {
-			int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER);
-
-			if (mss >= pgbreak &&
-			    mss <= pgbreak + (MAX_SKB_FRAGS - 1) * PAGE_SIZE)
-				mss = pgbreak;
-		}
+		mss = linear_payload_sz(first_skb);
 	}
 
 	return !mss ? tcp_sk(meta_sk)->mss_cache : mss;
@@ -1893,7 +1834,7 @@ unsigned int mptcp_xmit_size_goal(const struct sock *meta_sk, u32 mss_now,
 {
 	u32 xmit_size_goal = 0;
 
-	if (large_allowed && !tcp_sk(meta_sk)->mpcb->dss_csum) {
+	if (large_allowed) {
 		struct mptcp_tcp_sock *mptcp;
 
 		mptcp_for_each_sub(tcp_sk(meta_sk)->mpcb, mptcp) {
Signature · 1 line
2.16.2

--
Mat Martineau
Intel OTC

author
#3 lore raw

Re: [MPTCP] [PATCH 01/12] mptcp: Remove support for DSS-checksums

Quoted 12 lines · Mat Martineau
Quoted 7 lines · Christoph Paasch

To reduce the code-size and complexity, we remove support for DSS-checksums. If we receive a MP_CAPABLE with a DSS-checksum we simply fallback to regular TCP.

I'd been assuming that DSS checksums would be part of the initial upstream feature set - the goal being RFC compliance (without 'should' or 'may' features from the spec that add complexity). I'm ok with adjusting the goal if it makes sense to do so, just want to confirm that removing and reimplementing checksums is worthwhile.

I think it’s ok to go without DSS checksum in a first run. It simplifies the code a bit.

As far as I know, there is no MPTCP deployment out there that actually uses DSS checksums. The checksum is there to protect against middleboxes that change the payload. With TLS that anyways doesn’t work.

Christoph

Quoted 663 lines

Mat

Quoted 655 lines
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>

---

include/linux/tcp.h      |   3 +-
include/net/mptcp.h      |  31 ++------
net/mptcp/mptcp_ctrl.c   |  15 ----
net/mptcp/mptcp_input.c  | 184 ++---------------------------------------------
net/mptcp/mptcp_output.c |  69 ++----------------
5 files changed, 17 insertions(+), 285 deletions(-)
include/linux/tcp.h +1 -2
index 29f8ab30c7ed..f38bf1e18e58 100644
@@ -94,8 +94,7 @@ struct tcp_out_options {
   struct tcp_fastopen_cookie *fastopen_cookie;    /* Fast open cookie */
 #ifdef CONFIG_MPTCP
   u16    mptcp_options;    /* bit field of MPTCP related OPTION_* */
-    u8    dss_csum:1,    /* dss-checksum required? */
-        add_addr_v4:1,
+    u8    add_addr_v4:1,
       add_addr_v6:1,
       mptcp_ver:4;
 
include/net/mptcp.h +6 -25
index b8b750034a91..a512e9386296 100644
@@ -102,8 +102,7 @@ struct mptcp_request_sock {
 
   u8                loc_id;
   u8                rem_id; /* Address-id in the MP_JOIN */
-    u8                dss_csum:1,
-                    is_sub:1, /* Is this a new subflow? */
+    u8                is_sub:1, /* Is this a new subflow? */
                   low_prio:1, /* Interface set to low-prio? */
                   rcv_low_prio:1,
                   mptcp_ver:4;
@@ -111,7 +110,6 @@ struct mptcp_request_sock {
 
 struct mptcp_options_received {
   u16    saw_mpc:1,
-        dss_csum:1,
       drop_me:1,
 
       is_mp_join:1,
@@ -168,7 +166,6 @@ struct mptcp_tcp_sock {
       fully_established:1,
       second_packet:1,
       attached:1,
-        send_mp_fail:1,
       include_mpc:1,
       mapping_present:1,
       map_data_fin:1,
@@ -269,7 +266,6 @@ struct mptcp_cb {
       in_time_wait:1,
       list_rcvd:1, /* XXX TO REMOVE */
       addr_signal:1, /* Path-manager wants us to call addr_signal */
-        dss_csum:1,
       server_side:1,
       infinite_mapping_rcv:1,
       infinite_mapping_snd:1,
@@ -288,7 +284,6 @@ struct mptcp_cb {
    * accessed. Thus, the whole data-path is on a single cache-line.
    */
 
-    u64    csum_cutoff_seq;
   u64    infinite_rcv_seq;
 
   /***** Start of fields, used for connection closure */
@@ -364,11 +359,9 @@ struct mptcp_cb {
 * To get the total length, just add the different options together.
 */
 #define MPTCP_SUB_LEN_SEQ    10
-#define MPTCP_SUB_LEN_SEQ_CSUM    12
 #define MPTCP_SUB_LEN_SEQ_ALIGN    12
 
 #define MPTCP_SUB_LEN_SEQ_64        14
-#define MPTCP_SUB_LEN_SEQ_CSUM_64    16
 #define MPTCP_SUB_LEN_SEQ_64_ALIGN    16
 
 #define MPTCP_SUB_LEN_ACK    4
@@ -434,10 +427,9 @@ extern bool mptcp_init_failed;
 #define OPTION_DATA_ACK        (1 << 4)
 #define OPTION_ADD_ADDR        (1 << 5)
 #define OPTION_MP_JOIN        (1 << 6)
-#define OPTION_MP_FAIL        (1 << 7)
-#define OPTION_MP_FCLOSE    (1 << 8)
-#define OPTION_REMOVE_ADDR    (1 << 9)
-#define OPTION_MP_PRIO        (1 << 10)
+#define OPTION_MP_FCLOSE    (1 << 7)
+#define OPTION_REMOVE_ADDR    (1 << 8)
+#define OPTION_MP_PRIO        (1 << 9)
 
 /* MPTCP flags: both TX and RX */
 #define MPTCPHDR_SEQ        0x01 /* DSS.M option is present */
@@ -447,7 +439,6 @@ extern bool mptcp_init_failed;
 #define MPTCPHDR_ACK        0x08
 #define MPTCPHDR_SEQ64_SET    0x10 /* Did we received a 64-bit seq number?  */
 #define MPTCPHDR_SEQ64_OFO    0x20 /* Is it not in our circular array? */
-#define MPTCPHDR_DSS_CSUM    0x40
 /* MPTCP flags: TX only */
 #define MPTCPHDR_INF        0x08
 #define MPTCP_REINJECT        0x10 /* Did we reinject this segment? */
@@ -640,16 +631,15 @@ struct mp_prio {
   __u8    addr_id;
 } __attribute__((__packed__));
 
-static inline int mptcp_sub_len_dss(const struct mp_dss *m, const int csum)
+static inline int mptcp_sub_len_dss(const struct mp_dss *m)
 {
-    return 4 + m->A * (4 + m->a * 4) + m->M * (10 + m->m * 4 + csum * 2);
+    return 4 + m->A * (4 + m->a * 4) + m->M * (10 + m->m * 4);
 }
 
 #define MPTCP_SYSCTL    1
 
 extern int sysctl_mptcp_enabled;
 extern int sysctl_mptcp_version;
-extern int sysctl_mptcp_checksum;
 extern int sysctl_mptcp_debug;
 extern int sysctl_mptcp_syn_retries;
 
@@ -693,10 +683,8 @@ enum
   MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK,/* Server-side fallback during 3-way handshake */
   MPTCP_MIB_MPCAPABLEACTIVEFALLBACK, /* Client-side fallback during 3-way handshake */
   MPTCP_MIB_MPCAPABLERETRANSFALLBACK,/* Client-side stopped sending MP_CAPABLE after too many SYN-retransmissions */
-    MPTCP_MIB_CSUMENABLED,        /* Created MPTCP-connection with DSS-checksum enabled */
   MPTCP_MIB_RETRANSSEGS,        /* Segments retransmitted at the MPTCP-level */
   MPTCP_MIB_MPFAILRX,        /* Received an MP_FAIL */
-    MPTCP_MIB_CSUMFAIL,        /* Received segment with invalid checksum */
   MPTCP_MIB_FASTCLOSERX,        /* Recevied a FAST_CLOSE */
   MPTCP_MIB_FASTCLOSETX,        /* Sent a FAST_CLOSE */
   MPTCP_MIB_FBACKSUB,        /* Fallback upon ack without data-ack on new subflow */
@@ -921,9 +909,6 @@ static inline bool mptcp_can_sendpage(struct sock *sk)
 {
   struct mptcp_tcp_sock *mptcp;
 
-    if (tcp_sk(sk)->mpcb->dss_csum)
-        return false;
-
   mptcp_for_each_sub(tcp_sk(sk)->mpcb, mptcp) {
       struct sock *sk_it = mptcp_to_sock(mptcp);
 
@@ -1058,7 +1043,6 @@ static inline int is_master_tp(const struct tcp_sock *tp)
 static inline void mptcp_init_mp_opt(struct mptcp_options_received *mopt)
 {
   mopt->saw_mpc = 0;
-    mopt->dss_csum = 0;
   mopt->drop_me = 0;
 
   mopt->is_mp_join = 0;
@@ -1153,9 +1137,6 @@ static inline bool mptcp_can_sg(const struct sock *meta_sk)
 {
   struct mptcp_tcp_sock *mptcp;
 
-    if (tcp_sk(meta_sk)->mpcb->dss_csum)
-        return false;
-
   mptcp_for_each_sub(tcp_sk(meta_sk)->mpcb, mptcp) {
       struct sock *sk = mptcp_to_sock(mptcp);
 
net/mptcp/mptcp_ctrl.c +0 -13
index 916438e31b59..8061b934e0d5 100644
@@ -67,7 +67,6 @@ int sysctl_mptcp_enabled __read_mostly = 1;
 int sysctl_mptcp_version __read_mostly = 0;
 static int min_mptcp_version;
 static int max_mptcp_version = 1;
-int sysctl_mptcp_checksum __read_mostly = 1;
 int sysctl_mptcp_debug __read_mostly;
 EXPORT_SYMBOL(sysctl_mptcp_debug);
 int sysctl_mptcp_syn_retries __read_mostly = 3;
@@ -132,13 +131,6 @@ static struct ctl_table mptcp_table[] = {
       .extra1 = &min_mptcp_version,
       .extra2 = &max_mptcp_version,
   },
-    {
-        .procname = "mptcp_checksum",
-        .data = &sysctl_mptcp_checksum,
-        .maxlen = sizeof(int),
-        .mode = 0644,
-        .proc_handler = &proc_dointvec
-    },
   {
       .procname = "mptcp_debug",
       .data = &sysctl_mptcp_debug,
@@ -2078,7 +2070,6 @@ static int __mptcp_check_req_master(struct sock *child,
   child_tp->mptcp->snt_isn = tcp_rsk(req)->snt_isn;
   child_tp->mptcp->rcv_isn = tcp_rsk(req)->rcv_isn;
 
-    mpcb->dss_csum = mtreq->dss_csum;
   mpcb->server_side = 1;
 
   /* Needs to be done here additionally, because when accepting a
@@ -2457,13 +2448,10 @@ void mptcp_reqsk_init(struct request_sock *req, const struct sock *sk,
             const struct sk_buff *skb, bool want_cookie)
 {
   struct mptcp_options_received mopt;
-    struct mptcp_request_sock *mtreq = mptcp_rsk(req);
 
   mptcp_init_mp_opt(&mopt);
   tcp_parse_mptcp_options(skb, &mopt);
 
-    mtreq->dss_csum = mopt.dss_csum;
-
   if (want_cookie) {
       if (!mptcp_reqsk_new_cookie(req, sk, &mopt, skb))
           /* No key available - back to regular TCP */
@@ -2500,7 +2488,6 @@ void mptcp_cookies_reqsk_init(struct request_sock *req,
   inet_rsk(req)->saw_mpc = 1;
   mtreq->is_sub = 0;
   inet_rsk(req)->mptcp_rqsk = 1;
-    mtreq->dss_csum = mopt->dss_csum;
 

out:

   spin_unlock(&mptcp_tk_hashlock);
net/mptcp/mptcp_ctrl.c +0 -2
@@ -2771,10 +2758,8 @@ static const struct snmp_mib mptcp_snmp_list[] = {
   SNMP_MIB_ITEM("MPCapableFallbackACK", MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK),
   SNMP_MIB_ITEM("MPCapableFallbackSYNACK", MPTCP_MIB_MPCAPABLEACTIVEFALLBACK),
   SNMP_MIB_ITEM("MPCapableRetransFallback", MPTCP_MIB_MPCAPABLERETRANSFALLBACK),
-    SNMP_MIB_ITEM("MPTCPCsumEnabled", MPTCP_MIB_CSUMENABLED),
   SNMP_MIB_ITEM("MPTCPRetrans", MPTCP_MIB_RETRANSSEGS),
   SNMP_MIB_ITEM("MPFailRX", MPTCP_MIB_MPFAILRX),
-    SNMP_MIB_ITEM("MPCsumFail", MPTCP_MIB_CSUMFAIL),
   SNMP_MIB_ITEM("MPFastcloseRX", MPTCP_MIB_FASTCLOSERX),
   SNMP_MIB_ITEM("MPFastcloseTX", MPTCP_MIB_FASTCLOSETX),
   SNMP_MIB_ITEM("MPFallbackAckSub", MPTCP_MIB_FBACKSUB),
net/mptcp/mptcp_input.c +5 -179
index d2a605cbdd04..9a4d1609b3b9 100644
@@ -269,133 +269,6 @@ static int mptcp_rcv_state_process(struct sock *meta_sk, struct sock *sk,
   return 0;
 }
 
-/**
- * @return:
- *  i) 1: Everything's fine.
- *  ii) -1: A reset has been sent on the subflow - csum-failure
- *  iii) 0: csum-failure but no reset sent, because it's the last subflow.
- *     Last packet should not be destroyed by the caller because it has
- *     been done here.
- */
-static int mptcp_verif_dss_csum(struct sock *sk)
-{
-    struct tcp_sock *tp = tcp_sk(sk);
-    struct sk_buff *tmp, *tmp1, *last = NULL;
-    __wsum csum_tcp = 0; /* cumulative checksum of pld + mptcp-header */
-    int ans = 1, overflowed = 0, offset = 0, dss_csum_added = 0;
-    int iter = 0;
-
-    skb_queue_walk_safe(&sk->sk_receive_queue, tmp, tmp1) {
-        unsigned int csum_len;
-
-        if (before(tp->mptcp->map_subseq + tp->mptcp->map_data_len, TCP_SKB_CB(tmp)->end_seq))
-            /* Mapping ends in the middle of the packet -
-             * csum only these bytes
-             */
-            csum_len = tp->mptcp->map_subseq + tp->mptcp->map_data_len - TCP_SKB_CB(tmp)->seq;
-        else
-            csum_len = tmp->len;
-
-        offset = 0;
-        if (overflowed) {
-            char first_word[4];
-            first_word[0] = 0;
-            first_word[1] = 0;
-            first_word[2] = 0;
-            first_word[3] = *(tmp->data);
-            csum_tcp = csum_partial(first_word, 4, csum_tcp);
-            offset = 1;
-            csum_len--;
-            overflowed = 0;
-        }
-
-        csum_tcp = skb_checksum(tmp, offset, csum_len, csum_tcp);
-
-        /* Was it on an odd-length? Then we have to merge the next byte
-         * correctly (see above)
-         */
-        if (csum_len != (csum_len & (~1)))
-            overflowed = 1;
-
-        if (mptcp_is_data_seq(tmp) && !dss_csum_added) {
-            __be32 data_seq = htonl((u32)(tp->mptcp->map_data_seq >> 32));
-
-            /* If a 64-bit dss is present, we increase the offset
-             * by 4 bytes, as the high-order 64-bits will be added
-             * in the final csum_partial-call.
-             */
-            u32 offset = skb_transport_offset(tmp) +
-                     TCP_SKB_CB(tmp)->dss_off;
-            if (TCP_SKB_CB(tmp)->mptcp_flags & MPTCPHDR_SEQ64_SET)
-                offset += 4;
-
-            csum_tcp = skb_checksum(tmp, offset,
-                        MPTCP_SUB_LEN_SEQ_CSUM,
-                        csum_tcp);
-
-            csum_tcp = csum_partial(&data_seq,
-                        sizeof(data_seq), csum_tcp);
-
-            dss_csum_added = 1; /* Just do it once */
-        }
-        last = tmp;
-        iter++;
-
-        if (!skb_queue_is_last(&sk->sk_receive_queue, tmp) &&
-            !before(TCP_SKB_CB(tmp1)->seq,
-                tp->mptcp->map_subseq + tp->mptcp->map_data_len))
-            break;
-    }
-
-    /* Now, checksum must be 0 */
-    if (unlikely(csum_fold(csum_tcp))) {
-        struct mptcp_tcp_sock *mptcp;
-        struct sock *sk_it = NULL;
-
-        pr_err("%s csum is wrong: %#x tcp-seq %u dss_csum_added %d overflowed %d iterations %d\n",
-               __func__, csum_fold(csum_tcp), TCP_SKB_CB(last)->seq,
-               dss_csum_added, overflowed, iter);
-
-        MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_CSUMFAIL);
-        tp->mptcp->send_mp_fail = 1;
-
-        /* map_data_seq is the data-seq number of the
-         * mapping we are currently checking
-         */
-        tp->mpcb->csum_cutoff_seq = tp->mptcp->map_data_seq;
-
-        /* Search for another subflow that is fully established */
-        mptcp_for_each_sub(tp->mpcb, mptcp) {
-            sk_it = mptcp_to_sock(mptcp);
-
-            if (sk_it != sk &&
-                tcp_sk(sk_it)->mptcp->fully_established)
-                break;
-
-            sk_it = NULL;
-        }
-
-        if (sk_it) {
-            mptcp_send_reset(sk);
-            ans = -1;
-        } else {
-            tp->mpcb->send_infinite_mapping = 1;
-
-            /* Need to purge the rcv-queue as it's no more valid */
-            while ((tmp = __skb_dequeue(&sk->sk_receive_queue)) != NULL) {
-                tp->copied_seq = TCP_SKB_CB(tmp)->end_seq;
-                kfree_skb(tmp);
-            }
-
-            mptcp_sub_force_close_all(tp->mpcb, sk);
-
-            ans = 0;
-        }
-    }
-
-    return ans;
-}
-
 static inline void mptcp_prepare_skb(struct sk_buff *skb,
                    const struct sock *sk)
 {
@@ -710,10 +583,6 @@ static int mptcp_detect_mapping(struct sock *sk, struct sk_buff *skb)
       mpcb->infinite_mapping_rcv = 1;
       mpcb->send_infinite_mapping = 1;
       tp->mptcp->fully_established = 1;
-        /* We need to repeat mp_fail's until the sender felt
-         * back to infinite-mapping - here we stop repeating it.
-         */
-        tp->mptcp->send_mp_fail = 0;
 
       /* We have to fixup data_len - it must be the same as skb->len */
       data_len = skb->len + (mptcp_is_data_fin(skb) ? 1 : 0);
@@ -735,17 +604,6 @@ static int mptcp_detect_mapping(struct sock *sk, struct sk_buff *skb)
       MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_INFINITEMAPRX);
   }
 
-    /* We are sending mp-fail's and thus are in fallback mode.
-     * Ignore packets which do not announce the fallback and still
-     * want to provide a mapping.
-     */
-    if (tp->mptcp->send_mp_fail) {
-        tp->copied_seq = TCP_SKB_CB(skb)->end_seq;
-        __skb_unlink(skb, &sk->sk_receive_queue);
-        __kfree_skb(skb);
-        return -1;
-    }
-
   /* FIN increased the mapping-length by 1 */
   if (mptcp_is_data_fin(skb))
       data_len--;
@@ -957,16 +815,6 @@ static int mptcp_queue_skb(struct sock *sk)
       mpcb->dfin_combined = !!(sk->sk_shutdown & RCV_SHUTDOWN);
   }
 
-    /* Verify the checksum */
-    if (mpcb->dss_csum && !mpcb->infinite_mapping_rcv) {
-        int ret = mptcp_verif_dss_csum(sk);
-
-        if (ret <= 0) {
-            mptcp_reset_mapping(tp, old_copied_seq);
-            return 1;
-        }
-    }
-
   if (before64(rcv_nxt64, tp->mptcp->map_data_seq)) {
       /* Seg's have to go to the meta-ofo-queue */
       skb_queue_walk_safe(&sk->sk_receive_queue, tmp1, tmp) {
@@ -1605,6 +1453,10 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
           break;
       }
 
+        /* We do not support DSS-checksums */
+        if (mpcapable->a)
+            break;
+
       /* MPTCP-RFC 6824:
        * "If receiving a message with the 'B' flag set to 1, and this
        * is not understood, then this SYN MUST be silently ignored;
@@ -1622,7 +1474,6 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
           break;
 
       mopt->saw_mpc = 1;
-        mopt->dss_csum = sysctl_mptcp_checksum || mpcapable->a;
 
       if (opsize >= MPTCP_SUB_LEN_CAPABLE_SYN)
           mopt->mptcp_sender_key = mpcapable->sender_key;
@@ -1677,15 +1528,7 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
       const struct mp_dss *mdss = (struct mp_dss *)ptr;
       struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
 
-        /* We check opsize for the csum and non-csum case. We do this,
-         * because the draft says that the csum SHOULD be ignored if
-         * it has not been negotiated in the MP_CAPABLE but still is
-         * present in the data.
-         *
-         * It will get ignored later in mptcp_queue_skb.
-         */
-        if (opsize != mptcp_sub_len_dss(mdss, 0) &&
-            opsize != mptcp_sub_len_dss(mdss, 1)) {
+        if (opsize != mptcp_sub_len_dss(mdss)) {
           mptcp_debug("%s: mp_dss: bad option size %d\n",
                   __func__, opsize);
           break;
@@ -1723,10 +1566,6 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
 
           tcb->mptcp_flags |= MPTCPHDR_SEQ;
 
-            /* Is a check-sum present? */
-            if (opsize == mptcp_sub_len_dss(mdss, 1))
-                tcb->mptcp_flags |= MPTCPHDR_DSS_CSUM;
-
           /* DATA_FIN only possible with DSS-mapping */
           if (mdss->F)
               tcb->mptcp_flags |= MPTCPHDR_FIN;
@@ -2101,16 +1940,6 @@ bool mptcp_handle_options(struct sock *sk, const struct tcphdr *th,
   if (unlikely(mopt->mp_fail))
       mptcp_mp_fail_rcvd(sk, th);
 
-    /* RFC 6824, Section 3.3:
-     * If a checksum is not present when its use has been negotiated, the
-     * receiver MUST close the subflow with a RST as it is considered broken.
-     */
-    if (mptcp_is_data_seq(skb) && tp->mpcb->dss_csum &&
-        !(TCP_SKB_CB(skb)->mptcp_flags & MPTCPHDR_DSS_CSUM)) {
-        mptcp_send_reset(sk);
-        return true;
-    }
-
   /* We have to acknowledge retransmissions of the third
    * ack.
    */
@@ -2290,9 +2119,6 @@ int mptcp_rcv_synsent_state_process(struct sock *sk, struct sock **skptr,
        * is not part of any mapping.
        */
       tp->mptcp->snt_isn = tp->snd_una - 1;
-        tp->mpcb->dss_csum = mopt->dss_csum;
-        if (tp->mpcb->dss_csum)
-            MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_CSUMENABLED);
 
       tp->mptcp->include_mpc = 1;
 
net/mptcp/mptcp_output.c +5 -64
index 1de93c405c78..f9bce20259e9 100644
@@ -407,22 +407,7 @@ static int mptcp_write_dss_mapping(const struct tcp_sock *tp, const struct sk_bu
   else
       data_len = tcb->end_seq - tcb->seq;
 
-    if (tp->mpcb->dss_csum && data_len) {
-        __be16 *p16 = (__be16 *)ptr;
-        __be32 hdseq = mptcp_get_highorder_sndbits(skb, tp->mpcb);
-        __wsum csum;
-
-        *ptr = htonl(((data_len) << 16) |
-                 (TCPOPT_EOL << 8) |
-                 (TCPOPT_EOL));
-        csum = csum_partial(ptr - 2, 12, skb->csum);
-        p16++;
-        *p16++ = csum_fold(csum_partial(&hdseq, sizeof(hdseq), csum));
-    } else {
-        *ptr++ = htonl(((data_len) << 16) |
-                   (TCPOPT_NOP << 8) |
-                   (TCPOPT_NOP));
-    }
+    *ptr++ = htonl(((data_len) << 16) | (TCPOPT_NOP << 8) | (TCPOPT_NOP));
 
   return ptr - start;
 }
@@ -442,7 +427,7 @@ static int mptcp_write_dss_data_ack(const struct tcp_sock *tp, const struct sk_b
   mdss->M = mptcp_is_data_seq(skb) ? 1 : 0;
   mdss->a = 0;
   mdss->A = 1;
-    mdss->len = mptcp_sub_len_dss(mdss, tp->mpcb->dss_csum);
+    mdss->len = mptcp_sub_len_dss(mdss);
   ptr++;
 
   *ptr++ = htonl(mptcp_meta_tp(tp)->rcv_nxt);
@@ -456,10 +441,6 @@ static int mptcp_write_dss_data_ack(const struct tcp_sock *tp, const struct sk_b
 * arguably means that we would change the mapping (e.g. it splits it,
 * our sends out a subset of the initial mapping).
 *
- * Furthermore, the skb checksum is not always preserved across splits
- * (e.g. mptcp_fragment) which would mean that we need to recompute
- * the DSS checksum in this case.
- *
 * To avoid this we save the initial DSS mapping which allows us to
 * send the same DSS mapping even for fragmented retransmits.
 */
@@ -519,10 +500,6 @@ static bool mptcp_skb_entail(struct sock *sk, struct sk_buff *skb, int reinject)
 
   TCP_SKB_CB(skb)->path_mask |= mptcp_pi_to_flag(tp->mptcp->path_index);
 
-    /* Compute checksum */
-    if (tp->mpcb->dss_csum)
-        subskb->csum = skb->csum = skb_checksum(skb, 0, skb->len, 0);
-
   tcb = TCP_SKB_CB(subskb);
 
   if (tp->mpcb->send_infinite_mapping &&
@@ -977,7 +954,6 @@ void mptcp_syn_options(const struct sock *sk, struct tcp_out_options *opts,
       opts->mptcp_ver = tcp_sk(sk)->mptcp_ver;
       *remaining -= MPTCP_SUB_LEN_CAPABLE_SYN_ALIGN;
       opts->mp_capable.sender_key = tp->mptcp_loc_key;
-        opts->dss_csum = !!sysctl_mptcp_checksum;
   } else {
       const struct mptcp_cb *mpcb = tp->mpcb;
 
@@ -1002,7 +978,6 @@ void mptcp_synack_options(struct request_sock *req,
       opts->mptcp_options |= OPTION_MP_CAPABLE | OPTION_TYPE_SYNACK;
       opts->mptcp_ver = mtreq->mptcp_ver;
       opts->mp_capable.sender_key = mtreq->mptcp_loc_key;
-        opts->dss_csum = !!sysctl_mptcp_checksum || mtreq->dss_csum;
       *remaining -= MPTCP_SUB_LEN_CAPABLE_SYN_ALIGN;
   } else {
       opts->mptcp_options |= OPTION_MP_JOIN | OPTION_TYPE_SYNACK;
@@ -1070,7 +1045,6 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
       opts->mptcp_ver = mpcb->mptcp_ver;
       opts->mp_capable.sender_key = mpcb->mptcp_loc_key;
       opts->mp_capable.receiver_key = mpcb->mptcp_rem_key;
-        opts->dss_csum = mpcb->dss_csum;
 
       if (skb)
           tp->mptcp->include_mpc = 0;
@@ -1100,9 +1074,6 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
       if (skb && !mptcp_is_data_seq(skb)) {
           *size += MPTCP_SUB_LEN_ACK_ALIGN;
       } else {
-            /* Doesn't matter, if csum included or not. It will be
-             * either 10 or 12, and thus aligned = 12
-             */
           *size += MPTCP_SUB_LEN_ACK_ALIGN +
                MPTCP_SUB_LEN_SEQ_ALIGN;
       }
@@ -1110,16 +1081,6 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
       *size += MPTCP_SUB_LEN_DSS_ALIGN;
   }
 
-    /* In fallback mp_fail-mode, we have to repeat it until the fallback
-     * has been done by the sender
-     */
-    if (unlikely(tp->mptcp->send_mp_fail) && skb &&
-        MAX_TCP_OPTION_SPACE - *size >= MPTCP_SUB_LEN_FAIL) {
-        opts->options |= OPTION_MPTCP;
-        opts->mptcp_options |= OPTION_MP_FAIL;
-        *size += MPTCP_SUB_LEN_FAIL;
-    }
-
   if (unlikely(mpcb->addr_signal) && mpcb->pm_ops->addr_signal &&
       mpcb->mptcp_ver < MPTCP_VERSION_1)
       mpcb->pm_ops->addr_signal(sk, size, opts, skb);
@@ -1172,7 +1133,7 @@ void mptcp_options_write(__be32 *ptr, struct tcp_sock *tp,
       }
 
       mpc->sub = MPTCP_SUB_CAPABLE;
-        mpc->a = opts->dss_csum;
+        mpc->a = 0;
       mpc->b = 0;
       mpc->rsv = 0;
       mpc->h = 1;
@@ -1272,18 +1233,6 @@ void mptcp_options_write(__be32 *ptr, struct tcp_sock *tp,
 
       MPTCP_INC_STATS(sock_net((struct sock *)tp), MPTCP_MIB_REMADDRTX);
   }
-    if (unlikely(OPTION_MP_FAIL & opts->mptcp_options)) {
-        struct mp_fail *mpfail = (struct mp_fail *)ptr;
-
-        mpfail->kind = TCPOPT_MPTCP;
-        mpfail->len = MPTCP_SUB_LEN_FAIL;
-        mpfail->sub = MPTCP_SUB_FAIL;
-        mpfail->rsv1 = 0;
-        mpfail->rsv2 = 0;
-        mpfail->data_seq = htonll(tp->mpcb->csum_cutoff_seq);
-
-        ptr += MPTCP_SUB_LEN_FAIL_ALIGN >> 2;
-    }
   if (unlikely(OPTION_MP_FCLOSE & opts->mptcp_options)) {
       struct mp_fclose *mpfclose = (struct mp_fclose *)ptr;
 
@@ -1848,15 +1797,7 @@ int mptcp_select_size(const struct sock *meta_sk, bool first_skb, bool zc)
       if (zc)
           return 0;
 
-        if (!tcp_sk(meta_sk)->mpcb->dss_csum) {
-            mss = linear_payload_sz(first_skb);
-        } else {
-            int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER);
-
-            if (mss >= pgbreak &&
-                mss <= pgbreak + (MAX_SKB_FRAGS - 1) * PAGE_SIZE)
-                mss = pgbreak;
-        }
+        mss = linear_payload_sz(first_skb);
   }
 
   return !mss ? tcp_sk(meta_sk)->mss_cache : mss;
@@ -1893,7 +1834,7 @@ unsigned int mptcp_xmit_size_goal(const struct sock *meta_sk, u32 mss_now,
 {
   u32 xmit_size_goal = 0;
 
-    if (large_allowed && !tcp_sk(meta_sk)->mpcb->dss_csum) {
+    if (large_allowed) {
       struct mptcp_tcp_sock *mptcp;
 
       mptcp_for_each_sub(tcp_sk(meta_sk)->mpcb, mptcp) {
Signature · 1 line
2.16.2

--
Mat Martineau
Intel OTC

author
#4 lore raw

PATCH 2/12 mptcp: Remove some left-over cruft

In reply to Christoph Paasch

The MPTCP-congestion controls have been removed. This here is a left-over.

Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 net/ipv4/Kconfig | 19 -------------------
 1 file changed, 19 deletions(-)
net/ipv4/Kconfig +0 -19
index 3620a29db1ef..32cae39cdff6 100644
@@ -717,21 +717,6 @@ choice
 	config DEFAULT_BBR
 		bool "BBR" if TCP_CONG_BBR=y
 
-	config DEFAULT_LIA
-		bool "Lia" if TCP_CONG_LIA=y
-
-	config DEFAULT_OLIA
-		bool "Olia" if TCP_CONG_OLIA=y
-
-	config DEFAULT_WVEGAS
-		bool "Wvegas" if TCP_CONG_WVEGAS=y
-
-	config DEFAULT_BALIA
-		bool "Balia" if TCP_CONG_BALIA=y
-
-	config DEFAULT_MCTCPDESYNC
-		bool "Mctcpdesync (EXPERIMENTAL)" if TCP_CONG_MCTCPDESYNC=y
-
 	config DEFAULT_RENO
 		bool "Reno"
 endchoice
@@ -752,10 +737,6 @@ config DEFAULT_TCP_CONG
 	default "vegas" if DEFAULT_VEGAS
 	default "westwood" if DEFAULT_WESTWOOD
 	default "veno" if DEFAULT_VENO
-	default "lia" if DEFAULT_LIA
-	default "olia" if DEFAULT_OLIA
-	default "wvegas" if DEFAULT_WVEGAS
-	default "balia" if DEFAULT_BALIA
 	default "reno" if DEFAULT_RENO
 	default "dctcp" if DEFAULT_DCTCP
 	default "cdg" if DEFAULT_CDG
Signature · 1 line
2.16.2
author
#5 lore raw

PATCH 3/12 mptcp: Remove RPS-recording for flow-steering in MPTCP

In reply to Christoph Paasch

It's an optimization. We don't need it!

Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 net/ipv4/af_inet.c |  6 ------
 net/ipv4/tcp.c     | 34 ----------------------------------
 2 files changed, 40 deletions(-)
net/ipv4/af_inet.c +0 -6
index 6b510da0086d..e95f6ac342ff 100644
@@ -744,12 +744,6 @@ int inet_accept(struct socket *sock, struct socket *newsock, int flags,
 	sock_rps_record_flow(sk2);
 
 	if (sk2->sk_protocol == IPPROTO_TCP && mptcp(tcp_sk(sk2))) {
-		struct mptcp_tcp_sock *mptcp;
-
-		mptcp_for_each_sub(tcp_sk(sk2)->mpcb, mptcp) {
-			sock_rps_record_flow(mptcp_to_sock(mptcp));
-		}
-
 		if (tcp_sk(sk2)->mpcb->master_sk) {
 			struct sock *sk_it = tcp_sk(sk2)->mpcb->master_sk;
 
net/ipv4/tcp.c +0 -34
index b8a60db7fb7a..213be064adde 100644
@@ -821,16 +821,6 @@ ssize_t tcp_splice_read(struct socket *sock, loff_t *ppos,
 
 	lock_sock(sk);
 
-#ifdef CONFIG_MPTCP
-	if (mptcp(tcp_sk(sk))) {
-		struct mptcp_tcp_sock *mptcp;
-
-		mptcp_for_each_sub(tcp_sk(sk)->mpcb, mptcp) {
-			sock_rps_record_flow(mptcp_to_sock(mptcp));
-		}
-	}
-#endif
-
 	timeo = sock_rcvtimeo(sk, sock->file->f_flags & O_NONBLOCK);
 	while (tss.len) {
 		ret = __tcp_splice_read(sk, &tss);
@@ -995,8 +985,6 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,
 	}
 
 	if (mptcp(tp)) {
-		struct mptcp_tcp_sock *mptcp;
-
 		/* We must check this with socket-lock hold because we iterate
 		 * over the subflows.
 		 */
@@ -1009,10 +997,6 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,
 			lock_sock(sk);
 			return ret;
 		}
-
-		mptcp_for_each_sub(tp->mpcb, mptcp) {
-			sock_rps_record_flow(mptcp_to_sock(mptcp));
-		}
 	}
 
 	sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk);
@@ -1290,14 +1274,6 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
 			goto do_error;
 	}
 
-	if (mptcp(tp)) {
-		struct mptcp_tcp_sock *mptcp;
-
-		mptcp_for_each_sub(tp->mpcb, mptcp) {
-			sock_rps_record_flow(mptcp_to_sock(mptcp));
-		}
-	}
-
 	if (unlikely(tp->repair)) {
 		if (tp->repair_queue == TCP_RECV_QUEUE) {
 			copied = tcp_send_rcvq(sk, msg, size);
@@ -2022,16 +1998,6 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
 
 	lock_sock(sk);
 
-#ifdef CONFIG_MPTCP
-	if (mptcp(tp)) {
-		struct mptcp_tcp_sock *mptcp;
-
-		mptcp_for_each_sub(tp->mpcb, mptcp) {
-			sock_rps_record_flow(mptcp_to_sock(mptcp));
-		}
-	}
-#endif
-
 	err = -ENOTCONN;
 	if (sk->sk_state == TCP_LISTEN)
 		goto out;
Signature · 1 line
2.16.2
author
#6 lore raw

PATCH 4/12 mptcp: Remove support for subflow-priorities (aka backup)

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/linux/tcp.h          |   1 -
 include/net/mptcp.h          |  42 +------------
 include/uapi/linux/if.h      |   1 -
 net/core/dev.c               |   2 +-
 net/mptcp/mptcp_ctrl.c       |   6 --
 net/mptcp/mptcp_fullmesh.c   | 147 ++++++++++---------------------------------
 net/mptcp/mptcp_input.c      |  36 -----------
 net/mptcp/mptcp_ipv4.c       |   5 +-
 net/mptcp/mptcp_ipv6.c       |   5 +-
 net/mptcp/mptcp_ndiffports.c |   4 +-
 net/mptcp/mptcp_output.c     |  27 +-------
 net/mptcp/mptcp_pm.c         |   2 +-
 net/mptcp/mptcp_sched.c      |  20 +-----
 13 files changed, 43 insertions(+), 255 deletions(-)
include/linux/tcp.h +0 -1
index f38bf1e18e58..cc896f842c31 100644
@@ -109,7 +109,6 @@ struct tcp_out_options {
 			__u32	sender_nonce;
 					/* random number of the sender */
 			__u32	token;	/* token for mptcp */
-			u8	low_prio:1;
 		} mp_join_syns;
 	};
 
include/net/mptcp.h +1 -41

114 lines not on this page · raw message

include/uapi/linux/if.h +0 -1
index 7255e08393db..51540df75bf8 100644
@@ -133,7 +133,6 @@ enum net_device_flags {
 #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */
 
 #define IFF_NOMULTIPATH	0x80000		/* Disable for MPTCP 		*/
-#define IFF_MPBACKUP	0x100000	/* Use as backup path for MPTCP */
 
 #define IFF_VOLATILE	(IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\
 		IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT)
net/core/dev.c +1 -1
index 95cff2426ea1..c5cafaac7f58 100644
@@ -7487,7 +7487,7 @@ int __dev_change_flags(struct net_device *dev, unsigned int flags)
 
 	dev->flags = (flags & (IFF_DEBUG | IFF_NOTRAILERS | IFF_NOARP |
 			       IFF_DYNAMIC | IFF_MULTICAST | IFF_PORTSEL |
-			       IFF_AUTOMEDIA | IFF_NOMULTIPATH | IFF_MPBACKUP)) |
+			       IFF_AUTOMEDIA | IFF_NOMULTIPATH)) |
 		     (dev->flags & (IFF_UP | IFF_VOLATILE | IFF_PROMISC |
 				    IFF_ALLMULTI));
 
net/mptcp/mptcp_ctrl.c +0 -6
index 8061b934e0d5..927f8c014c0b 100644
@@ -2218,11 +2218,6 @@ struct sock *mptcp_check_req_child(struct sock *meta_sk,
 		goto teardown;
 	}
 
-	/* The child is a clone of the meta socket, we must now reset
-	 * some of the fields
-	 */
-	child_tp->mptcp->rcv_low_prio = mtreq->rcv_low_prio;
-
 	/* We should allow proper increase of the snd/rcv-buffers. Thus, we
 	 * use the original values instead of the bloated up ones from the
 	 * clone.
@@ -2438,7 +2433,6 @@ void mptcp_join_reqsk_init(const struct mptcp_cb *mpcb,
 	mtreq->mptcp_hash_tmac = *(u64 *)mptcp_hash_mac;
 
 	mtreq->rem_id = mopt.rem_id;
-	mtreq->rcv_low_prio = mopt.low_prio;
 	inet_rsk(req)->saw_mpc = 1;
 
 	MPTCP_INC_STATS(sock_net(mpcb->meta_sk), MPTCP_MIB_JOINSYNRX);
net/mptcp/mptcp_fullmesh.c +34 -113

307 lines not on this page · raw message

net/mptcp/mptcp_input.c +0 -36
index 9a4d1609b3b9..652da0439644 100644
@@ -1503,14 +1503,12 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
 		case MPTCP_SUB_LEN_JOIN_SYN:
 			mopt->is_mp_join = 1;
 			mopt->saw_mpc = 1;
-			mopt->low_prio = mpjoin->b;
 			mopt->rem_id = mpjoin->addr_id;
 			mopt->mptcp_rem_token = mpjoin->u.syn.token;
 			mopt->mptcp_recv_nonce = mpjoin->u.syn.nonce;
 			break;
 		case MPTCP_SUB_LEN_JOIN_SYNACK:
 			mopt->saw_mpc = 1;
-			mopt->low_prio = mpjoin->b;
 			mopt->rem_id = mpjoin->addr_id;
 			mopt->mptcp_recv_tmac = mpjoin->u.synack.mac;
 			mopt->mptcp_recv_nonce = mpjoin->u.synack.nonce;
@@ -1613,26 +1611,6 @@ void mptcp_parse_options(const uint8_t *ptr, int opsize,
 		mopt->saw_rem_addr = 1;
 		mopt->rem_addr_ptr = ptr;
 		break;
-	case MPTCP_SUB_PRIO:
-	{
-		const struct mp_prio *mpprio = (struct mp_prio *)ptr;
-
-		if (opsize != MPTCP_SUB_LEN_PRIO &&
-		    opsize != MPTCP_SUB_LEN_PRIO_ADDR) {
-			mptcp_debug("%s: mp_prio: bad option size %d\n",
-				    __func__, opsize);
-			break;
-		}
-
-		mopt->saw_low_prio = 1;
-		mopt->low_prio = mpprio->b;
-
-		if (opsize == MPTCP_SUB_LEN_PRIO_ADDR) {
-			mopt->saw_low_prio = 2;
-			mopt->prio_addr_id = mpprio->addr_id;
-		}
-		break;
-	}
 	case MPTCP_SUB_FAIL:
 		if (opsize != MPTCP_SUB_LEN_FAIL) {
 			mptcp_debug("%s: mp_fail: bad option size %d\n",
@@ -1963,19 +1941,6 @@ bool mptcp_handle_options(struct sock *sk, const struct tcphdr *th,
 		mopt->more_rem_addr = 0;
 		mopt->saw_rem_addr = 0;
 	}
-	if (mopt->saw_low_prio) {
-		if (mopt->saw_low_prio == 1) {
-			tp->mptcp->rcv_low_prio = mopt->low_prio;
-		} else {
-			struct mptcp_tcp_sock *mptcp;
-
-			mptcp_for_each_sub(tp->mpcb, mptcp) {
-				if (mptcp->rem_id == mopt->prio_addr_id)
-					mptcp->rcv_low_prio = mopt->low_prio;
-			}
-		}
-		mopt->saw_low_prio = 0;
-	}
 
 	mptcp_data_ack(sk, skb);
 
@@ -2077,7 +2042,6 @@ int mptcp_rcv_synsent_state_process(struct sock *sk, struct sock **skptr,
 		 * until the 4th ack arrives.
 		 */
 		tp->mptcp->pre_established = 1;
-		tp->mptcp->rcv_low_prio = tp->mptcp->rx_opt.low_prio;
 
 		mptcp_hmac_sha1((u8 *)&mpcb->mptcp_loc_key,
 				(u8 *)&mpcb->mptcp_rem_key,
net/mptcp/mptcp_ipv4.c +1 -4
index c808d10205f5..00c54f421ba7 100644
@@ -104,7 +104,6 @@ static int mptcp_v4_join_init_req(struct request_sock *req, const struct sock *m
 	const struct mptcp_cb *mpcb = tcp_sk(meta_sk)->mpcb;
 	union inet_addr addr;
 	int loc_id;
-	bool low_prio = false;
 
 	/* We need to do this as early as possible. Because, if we fail later
 	 * (e.g., get_local_id), then reqsk_free tries to remove the
@@ -120,11 +119,10 @@ static int mptcp_v4_join_init_req(struct request_sock *req, const struct sock *m
 						    tcp_hdr(skb)->source,
 						    tcp_hdr(skb)->dest);
 	addr.ip = inet_rsk(req)->ir_loc_addr;
-	loc_id = mpcb->pm_ops->get_local_id(AF_INET, &addr, sock_net(meta_sk), &low_prio);
+	loc_id = mpcb->pm_ops->get_local_id(AF_INET, &addr, sock_net(meta_sk));
 	if (loc_id == -1)
 		return -1;
 	mtreq->loc_id = loc_id;
-	mtreq->low_prio = low_prio;
 
 	mptcp_join_reqsk_init(mpcb, req, skb);
 
@@ -292,7 +290,6 @@ int mptcp_init4_subsockets(struct sock *meta_sk, const struct mptcp_loc4 *loc,
 	}
 
 	tp->mptcp->slave_sk = 1;
-	tp->mptcp->low_prio = loc->low_prio;
 
 	/* Initializing the timer for an MPTCP subflow */
 	timer_setup(&tp->mptcp->mptcp_ack_timer, mptcp_ack_handler, 0);
net/mptcp/mptcp_ipv6.c +1 -4
index 2d730379d5ed..7249d171c9ef 100644
@@ -133,7 +133,6 @@ static int mptcp_v6_join_init_req(struct request_sock *req, const struct sock *m
 	const struct mptcp_cb *mpcb = tcp_sk(meta_sk)->mpcb;
 	union inet_addr addr;
 	int loc_id;
-	bool low_prio = false;
 
 	/* We need to do this as early as possible. Because, if we fail later
 	 * (e.g., get_local_id), then reqsk_free tries to remove the
@@ -149,11 +148,10 @@ static int mptcp_v6_join_init_req(struct request_sock *req, const struct sock *m
 						    tcp_hdr(skb)->source,
 						    tcp_hdr(skb)->dest);
 	addr.in6 = inet_rsk(req)->ir_v6_loc_addr;
-	loc_id = mpcb->pm_ops->get_local_id(AF_INET6, &addr, sock_net(meta_sk), &low_prio);
+	loc_id = mpcb->pm_ops->get_local_id(AF_INET6, &addr, sock_net(meta_sk));
 	if (loc_id == -1)
 		return -1;
 	mtreq->loc_id = loc_id;
-	mtreq->low_prio = low_prio;
 
 	mptcp_join_reqsk_init(mpcb, req, skb);
 
@@ -319,7 +317,6 @@ int mptcp_init6_subsockets(struct sock *meta_sk, const struct mptcp_loc6 *loc,
 	}
 
 	tp->mptcp->slave_sk = 1;
-	tp->mptcp->low_prio = loc->low_prio;
 
 	/* Initializing the timer for an MPTCP subflow */
 	timer_setup(&tp->mptcp->mptcp_ack_timer, mptcp_ack_handler, 0);
net/mptcp/mptcp_ndiffports.c +1 -3
index 58acf50df752..9faef10d8b64 100644
@@ -61,7 +61,6 @@ static void create_subflow_worker(struct work_struct *work)
 
 			loc.addr.s_addr = inet_sk(meta_sk)->inet_saddr;
 			loc.loc4_id = 0;
-			loc.low_prio = 0;
 			if (mpcb->master_sk)
 				loc.if_idx = mpcb->master_sk->sk_bound_dev_if;
 			else
@@ -79,7 +78,6 @@ static void create_subflow_worker(struct work_struct *work)
 
 			loc.addr = inet6_sk(meta_sk)->saddr;
 			loc.loc6_id = 0;
-			loc.low_prio = 0;
 			if (mpcb->master_sk)
 				loc.if_idx = mpcb->master_sk->sk_bound_dev_if;
 			else
@@ -128,7 +126,7 @@ static void ndiffports_create_subflows(struct sock *meta_sk)
 }
 
 static int ndiffports_get_local_id(sa_family_t family, union inet_addr *addr,
-				   struct net *net, bool *low_prio)
+				   struct net *net)
 {
 	return 0;
 }
net/mptcp/mptcp_output.c +2 -25
index f9bce20259e9..af695fafaab2 100644
@@ -960,7 +960,6 @@ void mptcp_syn_options(const struct sock *sk, struct tcp_out_options *opts,
 		opts->mptcp_options |= OPTION_MP_JOIN | OPTION_TYPE_SYN;
 		*remaining -= MPTCP_SUB_LEN_JOIN_SYN_ALIGN;
 		opts->mp_join_syns.token = mpcb->mptcp_rem_token;
-		opts->mp_join_syns.low_prio  = tp->mptcp->low_prio;
 		opts->addr_id = tp->mptcp->loc_id;
 		opts->mp_join_syns.sender_nonce = tp->mptcp->mptcp_loc_nonce;
 	}
@@ -984,7 +983,6 @@ void mptcp_synack_options(struct request_sock *req,
 		opts->mp_join_syns.sender_truncated_mac =
 				mtreq->mptcp_hash_tmac;
 		opts->mp_join_syns.sender_nonce = mtreq->mptcp_loc_nonce;
-		opts->mp_join_syns.low_prio = mtreq->low_prio;
 		opts->addr_id = mtreq->loc_id;
 		*remaining -= MPTCP_SUB_LEN_JOIN_SYNACK_ALIGN;
 	}
@@ -1085,15 +1083,6 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 	    mpcb->mptcp_ver < MPTCP_VERSION_1)
 		mpcb->pm_ops->addr_signal(sk, size, opts, skb);
 
-	if (unlikely(tp->mptcp->send_mp_prio) &&
-	    MAX_TCP_OPTION_SPACE - *size >= MPTCP_SUB_LEN_PRIO_ALIGN) {
-		opts->options |= OPTION_MPTCP;
-		opts->mptcp_options |= OPTION_MP_PRIO;
-		if (skb)
-			tp->mptcp->send_mp_prio = 0;
-		*size += MPTCP_SUB_LEN_PRIO_ALIGN;
-	}
-
 	return;
 }
 
@@ -1149,7 +1138,7 @@ void mptcp_options_write(__be32 *ptr, struct tcp_sock *tp,
 			mpj->len = MPTCP_SUB_LEN_JOIN_SYN;
 			mpj->u.syn.token = opts->mp_join_syns.token;
 			mpj->u.syn.nonce = opts->mp_join_syns.sender_nonce;
-			mpj->b = opts->mp_join_syns.low_prio;
+			mpj->b = 0;
 			mpj->addr_id = opts->addr_id;
 			ptr += MPTCP_SUB_LEN_JOIN_SYN_ALIGN >> 2;
 		} else if (OPTION_TYPE_SYNACK & opts->mptcp_options) {
@@ -1157,7 +1146,7 @@ void mptcp_options_write(__be32 *ptr, struct tcp_sock *tp,
 			mpj->u.synack.mac =
 				opts->mp_join_syns.sender_truncated_mac;
 			mpj->u.synack.nonce = opts->mp_join_syns.sender_nonce;
-			mpj->b = opts->mp_join_syns.low_prio;
+			mpj->b = 0;
 			mpj->addr_id = opts->addr_id;
 			ptr += MPTCP_SUB_LEN_JOIN_SYNACK_ALIGN >> 2;
 		} else if (OPTION_TYPE_ACK & opts->mptcp_options) {
@@ -1252,18 +1241,6 @@ void mptcp_options_write(__be32 *ptr, struct tcp_sock *tp,
 		else
 			ptr += mptcp_write_dss_data_seq(tp, skb, ptr);
 	}
-	if (unlikely(OPTION_MP_PRIO & opts->mptcp_options)) {
-		struct mp_prio *mpprio = (struct mp_prio *)ptr;
-
-		mpprio->kind = TCPOPT_MPTCP;
-		mpprio->len = MPTCP_SUB_LEN_PRIO;
-		mpprio->sub = MPTCP_SUB_PRIO;
-		mpprio->rsv = 0;
-		mpprio->b = tp->mptcp->low_prio;
-		mpprio->addr_id = TCPOPT_NOP;
-
-		ptr += MPTCP_SUB_LEN_PRIO_ALIGN >> 2;
-	}
 }
 
 /* Sends the datafin */
net/mptcp/mptcp_pm.c +1 -1
index 08e3f05a9e65..fbdf8eb58d17 100644
@@ -35,7 +35,7 @@ static DEFINE_SPINLOCK(mptcp_pm_list_lock);
 static LIST_HEAD(mptcp_pm_list);
 
 static int mptcp_default_id(sa_family_t family, union inet_addr *addr,
-			    struct net *net, bool *low_prio)
+			    struct net *net)
 {
 	return 0;
 }
net/mptcp/mptcp_sched.c +1 -19
index 3662bdf97c0d..82ffe080cb5e 100644
@@ -113,22 +113,11 @@ static int mptcp_dont_reinject_skb(const struct tcp_sock *tp, const struct sk_bu
 		mptcp_pi_to_flag(tp->mptcp->path_index) & TCP_SKB_CB(skb)->path_mask;
 }
 
-static bool subflow_is_backup(const struct tcp_sock *tp)
-{
-	return tp->mptcp->rcv_low_prio || tp->mptcp->low_prio;
-}
-
-static bool subflow_is_active(const struct tcp_sock *tp)
-{
-	return !tp->mptcp->rcv_low_prio && !tp->mptcp->low_prio;
-}
-
 /* Generic function to iterate over used and unused subflows and to select the
  * best one
  */
 static struct sock
 *get_subflow_from_selectors(struct mptcp_cb *mpcb, struct sk_buff *skb,
-			    bool (*selector)(const struct tcp_sock *),
 			    bool zero_wnd_test, bool *force)
 {
 	struct sock *bestsk = NULL;
@@ -142,10 +131,6 @@ static struct sock
 		struct tcp_sock *tp = tcp_sk(sk);
 		bool unused = false;
 
-		/* First, we choose only the wanted sks */
-		if (!(*selector)(tp))
-			continue;
-
 		if (!mptcp_dont_reinject_skb(tp, skb))
 			unused = true;
 		else if (found_unused)
@@ -233,16 +218,13 @@ static struct sock *get_available_subflow(struct sock *meta_sk,
 
 	/* Find the best subflow */
 restart:
-	sk = get_subflow_from_selectors(mpcb, skb, &subflow_is_active,
-					zero_wnd_test, &force);
+	sk = get_subflow_from_selectors(mpcb, skb, zero_wnd_test, &force);
 	if (force)
 		/* one unused active sk or one NULL sk when there is at least
 		 * one temporally unavailable unused active sk
 		 */
 		return sk;
 
-	sk = get_subflow_from_selectors(mpcb, skb, &subflow_is_backup,
-					zero_wnd_test, &force);
 	if (!force && skb) {
 		/* one used backup sk or one NULL sk where there is no one
 		 * temporally unavailable unused backup sk
Signature · 1 line
2.16.2
author
#7 lore raw

PATCH 5/12 mptcp: Remove support for sendpage()

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/net/mptcp.h | 18 ------------------
 net/ipv4/tcp.c      | 21 ++-------------------
 2 files changed, 2 insertions(+), 37 deletions(-)
include/net/mptcp.h +0 -18
index a4f46ac7051b..914ab2fb3c89 100644
@@ -869,20 +869,6 @@ struct request_sock *rev_mptcp_rsk(const struct mptcp_request_sock *req)
 	return (struct request_sock *)req;
 }
 
-static inline bool mptcp_can_sendpage(struct sock *sk)
-{
-	struct mptcp_tcp_sock *mptcp;
-
-	mptcp_for_each_sub(tcp_sk(sk)->mpcb, mptcp) {
-		struct sock *sk_it = mptcp_to_sock(mptcp);
-
-		if (!(sk_it->sk_route_caps & NETIF_F_SG))
-			return false;
-	}
-
-	return true;
-}
-
 static inline void mptcp_push_pending_frames(struct sock *meta_sk)
 {
 	/* We check packets out and send-head here. TCP only checks the
@@ -1367,10 +1353,6 @@ static inline int mptcp_rcv_synsent_state_process(struct sock *sk,
 {
 	return 0;
 }
-static inline bool mptcp_can_sendpage(struct sock *sk)
-{
-	return false;
-}
 static inline int mptcp_init_tw_sock(struct sock *sk,
 				     struct tcp_timewait_sock *tw)
 {
net/ipv4/tcp.c +2 -19
index 213be064adde..87f7616aaf93 100644
@@ -977,28 +977,12 @@ ssize_t do_tcp_sendpages(struct sock *sk, struct page *page, int offset,
 	 * is fully established.
 	 */
 	if (((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) &&
-	    !tcp_passive_fastopen(mptcp(tp) && tp->mpcb->master_sk ?
-				  tp->mpcb->master_sk : sk)) {
+	    !tcp_passive_fastopen(sk)) {
 		err = sk_stream_wait_connect(sk, &timeo);
 		if (err != 0)
 			goto out_err;
 	}
 
-	if (mptcp(tp)) {
-		/* We must check this with socket-lock hold because we iterate
-		 * over the subflows.
-		 */
-		if (!mptcp_can_sendpage(sk)) {
-			ssize_t ret;
-
-			release_sock(sk);
-			ret = sock_no_sendpage(sk->sk_socket, page, offset,
-					       size, flags);
-			lock_sock(sk);
-			return ret;
-		}
-	}
-
 	sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk);
 
 	mss_now = tcp_send_mss(sk, &size_goal, flags);
@@ -1117,8 +1101,7 @@ EXPORT_SYMBOL_GPL(do_tcp_sendpages);
 int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset,
 			size_t size, int flags)
 {
-	/* If MPTCP is enabled, we check it later after establishment */
-	if (!mptcp(tcp_sk(sk)) && !(sk->sk_route_caps & NETIF_F_SG))
+	if (!(sk->sk_route_caps & NETIF_F_SG) || mptcp(tcp_sk(sk)))
 		return sock_no_sendpage_locked(sk, page, offset, size, flags);
 
 	tcp_rate_check_app_limited(sk);  /* is sending application-limited? */
Signature · 1 line
2.16.2
author
#8 lore raw

PATCH 6/12 mptcp: Remove reinjection of data across subflows

In reply to Christoph Paasch

It's an "optimisation" that we don't need in net-next.

Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/linux/tcp.h        |   3 -
 include/net/mptcp.h        |   9 --
 net/mptcp/mptcp_ctrl.c     |  10 +-
 net/mptcp/mptcp_fullmesh.c |  12 --
 net/mptcp/mptcp_input.c    |  20 +--
 net/mptcp/mptcp_output.c   | 358 +--------------------------------------------
 net/mptcp/mptcp_sched.c    |  32 ++--
 7 files changed, 21 insertions(+), 423 deletions(-)
include/linux/tcp.h +0 -3
index cc896f842c31..6dd9c45c52d6 100644
@@ -470,9 +470,6 @@ struct tcp_sock {
 		request_mptcp:1, /* Did we send out an MP_CAPABLE?
 				  * (this speeds up mptcp_doit() in tcp_recvmsg)
 				  */
-		pf:1, /* Potentially Failed state: when this flag is set, we
-		       * stop using the subflow
-		       */
 		mp_killed:1, /* Killed with a tcp_done in mptcp? */
 		was_meta_sk:1,	/* This was a meta sk (in case of reuse) */
 		is_master_sk:1,
include/net/mptcp.h +0 -9
index 914ab2fb3c89..721515ddb252 100644
@@ -265,12 +265,6 @@ struct mptcp_cb {
 	u8 mptcp_sched[MPTCP_SCHED_DATA_SIZE] __aligned(8);
 	struct mptcp_sched_ops *sched_ops;
 
-	struct sk_buff_head reinject_queue;
-	/* First cache-line boundary is here minus 8 bytes. But from the
-	 * reinject-queue only the next and prev pointers are regularly
-	 * accessed. Thus, the whole data-path is on a single cache-line.
-	 */
-
 	u64	infinite_rcv_seq;
 
 	/***** Start of fields, used for connection closure */
@@ -422,7 +416,6 @@ extern bool mptcp_init_failed;
 #define MPTCPHDR_SEQ64_OFO	0x20 /* Is it not in our circular array? */
 /* MPTCP flags: TX only */
 #define MPTCPHDR_INF		0x08
-#define MPTCP_REINJECT		0x10 /* Did we reinject this segment? */
 
 struct mptcp_option {
 	__u8	kind;
@@ -720,7 +713,6 @@ int mptcp_add_sock(struct sock *meta_sk, struct sock *sk, u8 loc_id, u8 rem_id,
 		   gfp_t flags);
 void mptcp_del_sock(struct sock *sk);
 void mptcp_update_metasocket(const struct sock *meta_sk);
-void mptcp_reinject_data(struct sock *orig_sk, int clone_it);
 void mptcp_update_sndbuf(const struct tcp_sock *tp);
 void mptcp_send_fin(struct sock *meta_sk);
 void mptcp_send_active_reset(struct sock *meta_sk, gfp_t priority);
@@ -1257,7 +1249,6 @@ static inline int is_master_tp(const struct tcp_sock *tp)
 }
 static inline void mptcp_del_sock(const struct sock *sk) {}
 static inline void mptcp_update_metasocket(const struct sock *meta_sk) {}
-static inline void mptcp_reinject_data(struct sock *orig_sk, int clone_it) {}
 static inline void mptcp_update_sndbuf(const struct tcp_sock *tp) {}
 static inline void mptcp_clean_rtx_infinite(const struct sk_buff *skb,
 					    const struct sock *sk) {}
net/mptcp/mptcp_ctrl.c +1 -9
index 927f8c014c0b..910268a8ee8e 100644
@@ -562,7 +562,7 @@ struct sock *mptcp_select_ack_sock(const struct sock *meta_sk)
 		struct tcp_sock *tp = tcp_sk(sk);
 		u32 elapsed;
 
-		if (!mptcp_sk_can_send_ack(sk) || tp->pf)
+		if (!mptcp_sk_can_send_ack(sk) || inet_csk(sk)->icsk_ca_state == TCP_CA_Loss)
 			continue;
 
 		elapsed = keepalive_time_elapsed(tp);
@@ -694,8 +694,6 @@ void mptcp_destroy_sock(struct sock *sk)
 		struct mptcp_tcp_sock *mptcp;
 		struct hlist_node *tmp;
 
-		__skb_queue_purge(&tcp_sk(sk)->mpcb->reinject_queue);
-
 		/* We have to close all remaining subflows. Normally, they
 		 * should all be about to get closed. But, if the kernel is
 		 * forcing a closure (e.g., tcp_write_err), the subflows might
@@ -1231,7 +1229,6 @@ static int mptcp_alloc_mpcb(struct sock *meta_sk, __u64 remote_key,
 	meta_tp->was_meta_sk = 0;
 
 	/* Initialize the queues */
-	skb_queue_head_init(&mpcb->reinject_queue);
 	master_tp->out_of_order_queue = RB_ROOT;
 	master_sk->tcp_rtx_queue = RB_ROOT;
 	INIT_LIST_HEAD(&master_tp->tsq_node);
@@ -1462,9 +1459,6 @@ void mptcp_del_sock(struct sock *sk)
 	tp->mptcp->attached = 0;
 	mpcb->path_index_bits &= ~(1 << tp->mptcp->path_index);
 
-	if (!tcp_write_queue_empty(sk) || !tcp_rtx_queue_empty(sk))
-		mptcp_reinject_data(sk, 0);
-
 	if (is_master_tp(tp)) {
 		struct sock *meta_sk = mptcp_meta_sk(sk);
 		struct tcp_sock *meta_tp = tcp_sk(meta_sk);
@@ -1922,8 +1916,6 @@ void mptcp_disconnect(struct sock *sk)
 	struct tcp_sock *tp = tcp_sk(sk);
 	struct hlist_node *tmp;
 
-	__skb_queue_purge(&tp->mpcb->reinject_queue);
-
 	if (tp->inside_tk_table)
 		mptcp_hash_remove_bh(tp);
 
net/mptcp/mptcp_fullmesh.c +0 -12
index d7f3bba74050..3fff298cee86 100644
@@ -923,12 +923,6 @@ static void mptcp_address_worker(struct work_struct *work)
 					    !ipv6_addr_equal(&inet6_sk(sk)->saddr, &event->addr.in6))
 						continue;
 
-					/* Reinject, so that pf = 1 and so we
-					 * won't select this one as the
-					 * ack-sock.
-					 */
-					mptcp_reinject_data(sk, 0);
-
 					/* We announce the removal of this id */
 					announce_remove_addr(tcp_sk(sk)->mptcp->loc_id, meta_sk);
 
@@ -1438,12 +1432,6 @@ static void full_mesh_release_sock(struct sock *meta_sk)
 		}
 
 		if (shall_remove) {
-			/* Reinject, so that pf = 1 and so we
-			 * won't select this one as the
-			 * ack-sock.
-			 */
-			mptcp_reinject_data(sk, 0);
-
 			announce_remove_addr(tcp_sk(sk)->mptcp->loc_id,
 					     meta_sk);
 
net/mptcp/mptcp_input.c +1 -19
index 652da0439644..f247e9ef2853 100644
@@ -92,7 +92,7 @@ static inline int mptcp_tso_acked_reinject(const struct sock *meta_sk,
 /* Cleans the meta-socket retransmission queue and the reinject-queue. */
 static void mptcp_clean_rtx_queue(struct sock *meta_sk, u32 prior_snd_una)
 {
-	struct sk_buff *skb, *tmp, *next;
+	struct sk_buff *skb, *next;
 	struct tcp_sock *meta_tp = tcp_sk(meta_sk);
 	struct mptcp_cb *mpcb = meta_tp->mpcb;
 	bool acked = false;
@@ -149,20 +149,6 @@ static void mptcp_clean_rtx_queue(struct sock *meta_sk, u32 prior_snd_una)
 		}
 		sk_wmem_free_skb(meta_sk, skb);
 	}
-	/* Remove acknowledged data from the reinject queue */
-	skb_queue_walk_safe(&mpcb->reinject_queue, skb, tmp) {
-		if (before(meta_tp->snd_una, TCP_SKB_CB(skb)->end_seq)) {
-			if (tcp_skb_pcount(skb) == 1 ||
-			    !after(meta_tp->snd_una, TCP_SKB_CB(skb)->seq))
-				break;
-
-			mptcp_tso_acked_reinject(meta_sk, skb);
-			break;
-		}
-
-		__skb_unlink(skb, &mpcb->reinject_queue);
-		__kfree_skb(skb);
-	}
 
 	if (likely(between(meta_tp->snd_up, prior_snd_una, meta_tp->snd_una)))
 		meta_tp->snd_up = meta_tp->snd_una;
@@ -1242,9 +1228,6 @@ static void mptcp_data_ack(struct sock *sk, const struct sk_buff *skb)
 	u32 nwin, data_ack, data_seq;
 	u16 data_len = 0;
 
-	/* A valid packet came in - subflow is operational again */
-	tp->pf = 0;
-
 	/* Even if there is no data-ack, we stop retransmitting.
 	 * Except if this is a SYN/ACK. Then it is just a retransmission
 	 */
@@ -1400,7 +1383,6 @@ static void mptcp_send_reset_rem_id(const struct mptcp_cb *mpcb, u8 rem_id)
 		struct sock *sk_it = mptcp_to_sock(mptcp);
 
 		if (tcp_sk(sk_it)->mptcp->rem_id == rem_id) {
-			mptcp_reinject_data(sk_it, 0);
 			mptcp_send_reset(sk_it);
 		}
 	}
net/mptcp/mptcp_output.c +6 -352

413 lines not on this page · raw message

net/mptcp/mptcp_sched.c +13 -19
index 82ffe080cb5e..74d167e4689b 100644
@@ -29,7 +29,7 @@ static bool mptcp_is_def_unavailable(struct sock *sk)
 	if (tp->mptcp->pre_established)
 		return true;
 
-	if (tp->pf)
+	if (inet_csk(sk)->icsk_ca_state == TCP_CA_Loss)
 		return true;
 
 	return false;
@@ -338,25 +338,19 @@ static struct sk_buff *__mptcp_next_segment(struct sock *meta_sk, int *reinject)
 	if (mpcb->infinite_mapping_snd || mpcb->send_infinite_mapping)
 		return tcp_send_head(meta_sk);
 
-	skb = skb_peek(&mpcb->reinject_queue);
+	skb = tcp_send_head(meta_sk);
 
-	if (skb) {
-		*reinject = 1;
-	} else {
-		skb = tcp_send_head(meta_sk);
-
-		if (!skb && meta_sk->sk_socket &&
-		    test_bit(SOCK_NOSPACE, &meta_sk->sk_socket->flags) &&
-		    sk_stream_wspace(meta_sk) < sk_stream_min_wspace(meta_sk)) {
-			struct sock *subsk = get_available_subflow(meta_sk, NULL,
-								   false);
-			if (!subsk)
-				return NULL;
-
-			skb = mptcp_rcv_buf_optimization(subsk, 0);
-			if (skb)
-				*reinject = -1;
-		}
+	if (!skb && meta_sk->sk_socket &&
+	    test_bit(SOCK_NOSPACE, &meta_sk->sk_socket->flags) &&
+	    sk_stream_wspace(meta_sk) < sk_stream_min_wspace(meta_sk)) {
+		struct sock *subsk = get_available_subflow(meta_sk, NULL,
+							   false);
+		if (!subsk)
+			return NULL;
+
+		skb = mptcp_rcv_buf_optimization(subsk, 0);
+		if (skb)
+			*reinject = -1;
 	}
 	return skb;
 }
Signature · 1 line
2.16.2
author
#9 lore raw

PATCH 7/12 mptcp: Remove support for TCP SYN-cookies

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/net/tcp.h      | 13 +++++--------
 net/ipv4/syncookies.c  | 47 +++++++----------------------------------------
 net/ipv4/tcp_input.c   |  2 +-
 net/ipv6/syncookies.c  | 32 +++++++-------------------------
 net/mptcp/mptcp_ipv4.c | 17 -----------------
 net/mptcp/mptcp_ipv6.c | 17 -----------------
 6 files changed, 20 insertions(+), 108 deletions(-)
include/net/tcp.h +5 -8
index c4a9297da7a0..f206ea426018 100644
@@ -644,8 +644,7 @@ static inline u32 tcp_cookie_time(void)
 
 u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th,
 			      u16 *mssp);
-__u32 cookie_v4_init_sequence(struct request_sock *req, const struct sock *sk,
-			      const struct sk_buff *skb, __u16 *mss);
+__u32 cookie_v4_init_sequence(const struct sk_buff *skb, __u16 *mss);
 u64 cookie_init_timestamp(struct request_sock *req);
 bool cookie_timestamp_decode(const struct net *net,
 			     struct tcp_options_received *opt);
@@ -659,8 +658,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb);
 
 u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
 			      const struct tcphdr *th, u16 *mssp);
-__u32 cookie_v6_init_sequence(struct request_sock *req, const struct sock *sk,
-			      const struct sk_buff *skb, __u16 *mss);
+__u32 cookie_v6_init_sequence(const struct sk_buff *skb, __u16 *mss);
 #endif
 /* tcp_output.c */
 
@@ -2086,8 +2084,8 @@ struct tcp_request_sock_ops {
 			struct sk_buff *skb,
 			bool want_cookie);
 #ifdef CONFIG_SYN_COOKIES
-	__u32 (*cookie_init_seq)(struct request_sock *req, const struct sock *sk,
-				 const struct sk_buff *skb, __u16 *mss);
+	__u32 (*cookie_init_seq)(const struct sk_buff *skb,
+				 __u16 *mss);
 #endif
 	struct dst_entry *(*route_req)(const struct sock *sk, struct flowi *fl,
 				       const struct request_sock *req);
@@ -2101,13 +2099,12 @@ struct tcp_request_sock_ops {
 
 #ifdef CONFIG_SYN_COOKIES
 static inline __u32 cookie_init_sequence(const struct tcp_request_sock_ops *ops,
-					 struct request_sock *req,
 					 const struct sock *sk, struct sk_buff *skb,
 					 __u16 *mss)
 {
 	tcp_synq_overflow(sk);
 	__NET_INC_STATS(sock_net(sk), LINUX_MIB_SYNCOOKIESSENT);
-	return ops->cookie_init_seq(req, sk, skb, mss);
+	return ops->cookie_init_seq(skb, mss);
 }
 #else
 static inline __u32 cookie_init_sequence(const struct tcp_request_sock_ops *ops,
net/ipv4/syncookies.c +7 -40

104 lines not on this page · raw message

net/ipv4/tcp_input.c +1 -1
index c2d5fa27ee8d..ea36a23267cf 100644
@@ -6674,7 +6674,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
 	tcp_ecn_create_request(req, skb, sk, dst);
 
 	if (want_cookie) {
-		isn = cookie_init_sequence(af_ops, req, sk, skb, &req->mss);
+		isn = cookie_init_sequence(af_ops, sk, skb, &req->mss);
 		req->cookie_ts = tmp_opt.tstamp_ok;
 		if (!tmp_opt.tstamp_ok)
 			inet_rsk(req)->ecn_ok = 0;
net/ipv6/syncookies.c +7 -25
index bb86437a7003..fa3739f6de48 100644
@@ -20,8 +20,6 @@
 #include <linux/kernel.h>
 #include <net/secure_seq.h>
 #include <net/ipv6.h>
-#include <net/mptcp.h>
-#include <net/mptcp_v6.h>
 #include <net/tcp.h>
 
 #define COOKIEBITS 24	/* Upper bits store count */
@@ -113,8 +111,7 @@ u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
 }
 EXPORT_SYMBOL_GPL(__cookie_v6_init_sequence);
 
-__u32 cookie_v6_init_sequence(struct request_sock *req, const struct sock *sk,
-			      const struct sk_buff *skb, __u16 *mssp)
+__u32 cookie_v6_init_sequence(const struct sk_buff *skb, __u16 *mssp)
 {
 	const struct ipv6hdr *iph = ipv6_hdr(skb);
 	const struct tcphdr *th = tcp_hdr(skb);
@@ -136,7 +133,6 @@ EXPORT_SYMBOL_GPL(__cookie_v6_check);
 struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
 {
 	struct tcp_options_received tcp_opt;
-	struct mptcp_options_received mopt;
 	struct inet_request_sock *ireq;
 	struct tcp_request_sock *treq;
 	struct ipv6_pinfo *np = inet6_sk(sk);
@@ -166,8 +162,7 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
 
 	/* check for timestamp cookie support */
 	memset(&tcp_opt, 0, sizeof(tcp_opt));
-	mptcp_init_mp_opt(&mopt);
-	tcp_parse_options(sock_net(sk), skb, &tcp_opt, &mopt, 0, NULL, NULL);
+	tcp_parse_options(sock_net(sk), skb, &tcp_opt, NULL, 0, NULL, NULL);
 
 	if (tcp_opt.saw_tstamp && tcp_opt.rcv_tsecr) {
 		tsoff = secure_tcpv6_ts_off(sock_net(sk),
@@ -180,27 +175,14 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
 		goto out;
 
 	ret = NULL;
-#ifdef CONFIG_MPTCP
-	if (mopt.saw_mpc)
-		req = inet_reqsk_alloc(&mptcp6_request_sock_ops, sk, false);
-	else
-#endif
-		req = inet_reqsk_alloc(&tcp6_request_sock_ops, sk, false);
+	req = inet_reqsk_alloc(&tcp6_request_sock_ops, sk, false);
 	if (!req)
 		goto out;
 
 	ireq = inet_rsk(req);
-	ireq->mptcp_rqsk = 0;
-	ireq->saw_mpc = 0;
 	treq = tcp_rsk(req);
 	treq->tfo_listener = false;
 
-	/* Must be done before anything else, as it initializes
-	 * hash_entry of the MPTCP request-sock.
-	 */
-	if (mopt.saw_mpc)
-		mptcp_cookies_reqsk_init(req, &mopt, skb);
-
 	if (security_inet_conn_request(sk, skb, req))
 		goto out_free;
 
@@ -264,10 +246,10 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb)
 	}
 
 	req->rsk_window_clamp = tp->window_clamp ? :dst_metric(dst, RTAX_WINDOW);
-	tp->ops->select_initial_window(sk, tcp_full_space(sk), req->mss,
-				       &req->rsk_rcv_wnd, &req->rsk_window_clamp,
-				       ireq->wscale_ok, &rcv_wscale,
-				       dst_metric(dst, RTAX_INITRWND));
+	tcp_select_initial_window(sk, tcp_full_space(sk), req->mss,
+				  &req->rsk_rcv_wnd, &req->rsk_window_clamp,
+				  ireq->wscale_ok, &rcv_wscale,
+				  dst_metric(dst, RTAX_INITRWND));
 
 	ireq->rcv_wscale = rcv_wscale;
 	ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), dst);
net/mptcp/mptcp_ipv4.c +0 -17
index 00c54f421ba7..94bc1416af77 100644
@@ -82,20 +82,6 @@ static int mptcp_v4_init_req(struct request_sock *req, const struct sock *sk,
 	return 0;
 }
 
-#ifdef CONFIG_SYN_COOKIES
-static u32 mptcp_v4_cookie_init_seq(struct request_sock *req, const struct sock *sk,
-				    const struct sk_buff *skb, __u16 *mssp)
-{
-	__u32 isn = cookie_v4_init_sequence(req, sk, skb, mssp);
-
-	tcp_rsk(req)->snt_isn = isn;
-
-	mptcp_reqsk_init(req, sk, skb, true);
-
-	return isn;
-}
-#endif
-
 /* May be called without holding the meta-level lock */
 static int mptcp_v4_join_init_req(struct request_sock *req, const struct sock *meta_sk,
 				  struct sk_buff *skb, bool want_cookie)
@@ -381,9 +367,6 @@ int mptcp_pm_v4_init(void)
 
 	mptcp_request_sock_ipv4_ops = tcp_request_sock_ipv4_ops;
 	mptcp_request_sock_ipv4_ops.init_req = mptcp_v4_init_req;
-#ifdef CONFIG_SYN_COOKIES
-	mptcp_request_sock_ipv4_ops.cookie_init_seq = mptcp_v4_cookie_init_seq;
-#endif
 	mptcp_join_request_sock_ipv4_ops = tcp_request_sock_ipv4_ops;
 	mptcp_join_request_sock_ipv4_ops.init_req = mptcp_v4_join_init_req;
 
net/mptcp/mptcp_ipv6.c +0 -17
index 7249d171c9ef..297dd872fbfb 100644
@@ -111,20 +111,6 @@ static int mptcp_v6_init_req(struct request_sock *req, const struct sock *sk,
 	return 0;
 }
 
-#ifdef CONFIG_SYN_COOKIES
-static u32 mptcp_v6_cookie_init_seq(struct request_sock *req, const struct sock *sk,
-				    const struct sk_buff *skb, __u16 *mssp)
-{
-	__u32 isn = cookie_v6_init_sequence(req, sk, skb, mssp);
-
-	tcp_rsk(req)->snt_isn = isn;
-
-	mptcp_reqsk_init(req, sk, skb, true);
-
-	return isn;
-}
-#endif
-
 /* May be called without holding the meta-level lock */
 static int mptcp_v6_join_init_req(struct request_sock *req, const struct sock *meta_sk,
 				  struct sk_buff *skb, bool want_cookie)
@@ -427,9 +413,6 @@ int mptcp_pm_v6_init(void)
 
 	mptcp_request_sock_ipv6_ops = tcp_request_sock_ipv6_ops;
 	mptcp_request_sock_ipv6_ops.init_req = mptcp_v6_init_req;
-#ifdef CONFIG_SYN_COOKIES
-	mptcp_request_sock_ipv6_ops.cookie_init_seq = mptcp_v6_cookie_init_seq;
-#endif
 
 	mptcp_join_request_sock_ipv6_ops = tcp_request_sock_ipv6_ops;
 	mptcp_join_request_sock_ipv6_ops.init_req = mptcp_v6_join_init_req;
Signature · 1 line
2.16.2
author
#10 lore raw

PATCH 8/12 mptcp: Remove support for TCP Fast Open

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/linux/tcp.h      |  2 +-
 include/net/mptcp.h      |  9 +-----
 net/ipv4/tcp.c           |  7 ++---
 net/ipv4/tcp_fastopen.c  | 16 +++--------
 net/ipv4/tcp_input.c     | 23 ++--------------
 net/mptcp/mptcp_ctrl.c   | 53 ------------------------------------
 net/mptcp/mptcp_input.c  | 71 ------------------------------------------------
 net/mptcp/mptcp_output.c |  5 +---
 8 files changed, 13 insertions(+), 173 deletions(-)
include/linux/tcp.h +1 -1
index 6dd9c45c52d6..01321044047c 100644
@@ -58,7 +58,7 @@ static inline unsigned int tcp_optlen(const struct sk_buff *skb)
 /* TCP Fast Open */
 #define TCP_FASTOPEN_COOKIE_MIN	4	/* Min Fast Open Cookie size in bytes */
 #define TCP_FASTOPEN_COOKIE_MAX	16	/* Max Fast Open Cookie size in bytes */
-#define TCP_FASTOPEN_COOKIE_SIZE 4	/* the size employed by this impl. */
+#define TCP_FASTOPEN_COOKIE_SIZE 8	/* the size employed by this impl. */
 
 /* TCP Fast Open Cookie as stored in memory */
 struct tcp_fastopen_cookie {
include/net/mptcp.h +1 -8
index 721515ddb252..e1e7619a85ca 100644
@@ -738,7 +738,6 @@ void mptcp_close(struct sock *meta_sk, long timeout);
 bool mptcp_doit(struct sock *sk);
 int mptcp_create_master_sk(struct sock *meta_sk, __u64 remote_key,
 			   __u8 mptcp_ver, u32 window);
-int mptcp_check_req_fastopen(struct sock *child, struct request_sock *req);
 int mptcp_check_req_master(struct sock *sk, struct sock *child,
 			   struct request_sock *req, const struct sk_buff *skb,
 			   int drop);
@@ -1054,8 +1053,7 @@ static inline void mptcp_check_rcvseq_wrap(struct tcp_sock *meta_tp,
 
 static inline int mptcp_sk_can_send(const struct sock *sk)
 {
-	return tcp_passive_fastopen(sk) ||
-	       ((1 << sk->sk_state) & (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT) &&
+	return ((1 << sk->sk_state) & (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT) &&
 		!tcp_sk(sk)->mptcp->pre_established);
 }
 
@@ -1278,11 +1276,6 @@ static inline bool mptcp_doit(struct sock *sk)
 {
 	return false;
 }
-static inline int mptcp_check_req_fastopen(struct sock *child,
-					   struct request_sock *req)
-{
-	return 1;
-}
 static inline int mptcp_check_req_master(const struct sock *sk,
 					 const struct sock *child,
 					 const struct request_sock *req,
net/ipv4/tcp.c +3 -4
index 87f7616aaf93..b2dac73903be 100644
@@ -1233,7 +1233,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
 	}
 
 	if (unlikely(flags & MSG_FASTOPEN || inet_sk(sk)->defer_connect) &&
-	    !tp->repair) {
+	    !tp->repair && !sock_flag(sk, SOCK_MPTCP)) {
 		err = tcp_sendmsg_fastopen(sk, msg, &copied_syn, size);
 		if (err == -EINPROGRESS && copied_syn > 0)
 			goto out;
@@ -1250,8 +1250,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
 	 * is fully established.
 	 */
 	if (((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) &&
-	    !tcp_passive_fastopen(mptcp(tp) && tp->mpcb->master_sk ?
-				  tp->mpcb->master_sk : sk)) {
+	    !tcp_passive_fastopen(sk)) {
 		err = sk_stream_wait_connect(sk, &timeo);
 		if (err != 0)
 			goto do_error;
@@ -3098,7 +3097,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
 
 	case TCP_FASTOPEN:
 		if (val >= 0 && ((1 << sk->sk_state) & (TCPF_CLOSE |
-		    TCPF_LISTEN))) {
+		    TCPF_LISTEN)) && !sock_flag(sk, SOCK_MPTCP)) {
 			tcp_fastopen_init_key_once(net);
 
 			fastopen_queue_tune(sk, val);
net/ipv4/tcp_fastopen.c +4 -12
index 370fe7d4b579..018a48477355 100644
@@ -9,7 +9,6 @@
 #include <linux/rculist.h>
 #include <net/inetpeer.h>
 #include <net/tcp.h>
-#include <net/mptcp.h>
 
 void tcp_fastopen_init_key_once(struct net *net)
 {
@@ -219,7 +218,7 @@ static struct sock *tcp_fastopen_create_child(struct sock *sk,
 {
 	struct tcp_sock *tp;
 	struct request_sock_queue *queue = &inet_csk(sk)->icsk_accept_queue;
-	struct sock *child, *meta_sk;
+	struct sock *child;
 	bool own_req;
 
 	req->num_retrans = 0;
@@ -259,22 +258,15 @@ static struct sock *tcp_fastopen_create_child(struct sock *sk,
 
 	refcount_set(&req->rsk_refcnt, 2);
 
+	/* Now finish processing the fastopen child socket. */
+	tcp_init_transfer(child, BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB);
+
 	tp->rcv_nxt = TCP_SKB_CB(skb)->seq + 1;
 
 	tcp_fastopen_add_skb(child, skb);
 
 	tcp_rsk(req)->rcv_nxt = tp->rcv_nxt;
 	tp->rcv_wup = tp->rcv_nxt;
-
-	meta_sk = child;
-	if (!mptcp_check_req_fastopen(meta_sk, req)) {
-		child = tcp_sk(meta_sk)->mpcb->master_sk;
-		tp = tcp_sk(child);
-	}
-
-	/* Now finish processing the fastopen child socket. */
-	tcp_init_transfer(child, BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB);
-
 	/* tcp_conn_request() is sending the SYNACK,
 	 * and queues the child into listener accept queue.
 	 */
net/ipv4/tcp_input.c +3 -20
index ea36a23267cf..49ac1b821ac1 100644
@@ -5784,17 +5784,10 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
 				    struct tcp_fastopen_cookie *cookie)
 {
 	struct tcp_sock *tp = tcp_sk(sk);
-	struct sk_buff *data = NULL;
+	struct sk_buff *data = tp->syn_data ? tcp_rtx_queue_head(sk) : NULL;
 	u16 mss = tp->rx_opt.mss_clamp, try_exp = 0;
 	bool syn_drop = false;
 
-	if (tp->syn_data) {
-		if (mptcp(tp))
-			data = tcp_write_queue_head(mptcp_meta_sk(sk));
-		else
-			data = tcp_rtx_queue_head(sk);
-	}
-
 	if (mss == tp->rx_opt.user_mss) {
 		struct tcp_options_received opt;
 
@@ -5825,11 +5818,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
 
 	tcp_fastopen_cache_set(sk, mss, cookie, syn_drop, try_exp);
 
-	/* In mptcp case, we do not rely on "retransmit", but instead on
-	 * "transmit", because if fastopen data is not acked, the retransmission
-	 * becomes the first MPTCP data (see mptcp_rcv_synsent_fastopen).
-	 */
-	if (data && !mptcp(tp)) { /* Retransmit unacked data in SYN */
+	if (data) { /* Retransmit unacked data in SYN */
 		skb_rbtree_walk_from(data) {
 			if (__tcp_retransmit_skb(sk, data, 1))
 				break;
@@ -6689,18 +6678,12 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
 		fastopen_sk = tcp_try_fastopen(sk, skb, req, &foc, dst);
 	}
 	if (fastopen_sk) {
-		struct sock *meta_sk = fastopen_sk;
-
-		if (mptcp(tcp_sk(fastopen_sk)))
-			meta_sk = mptcp_meta_sk(fastopen_sk);
 		af_ops->send_synack(fastopen_sk, dst, &fl, req,
 				    &foc, TCP_SYNACK_FASTOPEN);
 		/* Add the child socket directly into the accept queue */
-		inet_csk_reqsk_queue_add(sk, req, meta_sk);
+		inet_csk_reqsk_queue_add(sk, req, fastopen_sk);
 		sk->sk_data_ready(sk);
 		bh_unlock_sock(fastopen_sk);
-		if (meta_sk != fastopen_sk)
-			bh_unlock_sock(meta_sk);
 		sock_put(fastopen_sk);
 	} else {
 		tcp_rsk(req)->tfo_listener = false;
net/mptcp/mptcp_ctrl.c +0 -53

59 lines not on this page · raw message

net/mptcp/mptcp_input.c +0 -71

89 lines not on this page · raw message

net/mptcp/mptcp_output.c +1 -4
index 26cf41f75922..2d84eb2edd97 100644
@@ -1292,12 +1292,9 @@ void mptcp_meta_retransmit_timer(struct sock *meta_sk)
 
 void mptcp_sub_retransmit_timer(struct sock *sk)
 {
-	struct tcp_sock *tp = tcp_sk(sk);
-
 	tcp_retransmit_timer(sk);
 
-	if (!tp->fastopen_rsk)
-		mptcp_set_rto(sk);
+	mptcp_set_rto(sk);
 }
 
 /* Modify values to an mptcp-level for the initial window of new subflows */
Signature · 1 line
2.16.2
author
#11 lore raw

PATCH 9/12 mptcp: Remove MPTCP-code out of do_ip_setsockopt

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 net/ipv4/ip_sockglue.c | 14 --------------
 1 file changed, 14 deletions(-)
net/ipv4/ip_sockglue.c +0 -14
index 4760ebe590e1..7c864ad41e6d 100644
@@ -753,20 +753,6 @@ static int do_ip_setsockopt(struct sock *sk, int level,
 			inet->tos = val;
 			sk->sk_priority = rt_tos2priority(val);
 			sk_dst_reset(sk);
-			/* Update TOS on mptcp subflow */
-			if (is_meta_sk(sk)) {
-				struct mptcp_tcp_sock *mptcp;
-
-				mptcp_for_each_sub(tcp_sk(sk)->mpcb, mptcp) {
-					struct sock *sk_it = mptcp_to_sock(mptcp);
-
-					if (inet_sk(sk_it)->tos != inet_sk(sk)->tos) {
-						inet_sk(sk_it)->tos = inet_sk(sk)->tos;
-						sk_it->sk_priority = sk->sk_priority;
-						sk_dst_reset(sk_it);
-					}
-				}
-			}
 		}
 		break;
 	case IP_TTL:
Signature · 1 line
2.16.2
author
#12 lore raw

PATCH 10/12 mptcp: Remove scheduler-selection support

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/linux/tcp.h      |   3 -
 include/net/mptcp.h      |  41 ++-------
 include/uapi/linux/tcp.h |   1 -
 net/ipv4/tcp.c           |  46 ----------
 net/mptcp/Kconfig        |  32 -------
 net/mptcp/mptcp_ctrl.c   |  35 +-------
 net/mptcp/mptcp_output.c |   7 +-
 net/mptcp/mptcp_sched.c  | 223 ++++-------------------------------------------
 8 files changed, 28 insertions(+), 360 deletions(-)
include/linux/tcp.h +0 -3
index 01321044047c..02af5c56d2e6 100644
@@ -476,17 +476,14 @@ struct tcp_sock {
 		close_it:1,	/* Must close socket in mptcp_data_ready? */
 		closing:1,
 		mptcp_ver:4,
-		mptcp_sched_setsockopt:1,
 		mptcp_pm_setsockopt:1,
 		record_master_info:1;
 	struct mptcp_tcp_sock *mptcp;
 #ifdef CONFIG_MPTCP
-#define MPTCP_SCHED_NAME_MAX 16
 #define MPTCP_PM_NAME_MAX 16
 	struct hlist_nulls_node tk_table;
 	u32		mptcp_loc_token;
 	u64		mptcp_loc_key;
-	char		mptcp_sched_name[MPTCP_SCHED_NAME_MAX];
 	char		mptcp_pm_name[MPTCP_PM_NAME_MAX];
 #endif /* CONFIG_MPTCP */
 };
include/net/mptcp.h +9 -32

69 lines not on this page · raw message

include/uapi/linux/tcp.h +0 -1
index 072ce786a0fd..2fcfa2257cc9 100644
@@ -134,7 +134,6 @@ enum {
 #define TCP_CM_INQ		TCP_INQ
 
 #define MPTCP_ENABLED		42
-#define MPTCP_SCHEDULER		43
 #define MPTCP_PATH_MANAGER	44
 #define MPTCP_INFO		45
 
net/ipv4/tcp.c +0 -46

58 lines not on this page · raw message

net/mptcp/Kconfig +0 -32
index 9c490ec8fba8..860e9e17f76f 100644
@@ -57,35 +57,3 @@ config DEFAULT_MPTCP_PM
 	default "ndiffports" if DEFAULT_NDIFFPORTS
 	default "default"
 
-menuconfig MPTCP_SCHED_ADVANCED
-	bool "MPTCP: advanced scheduler control"
-	depends on MPTCP=y
-	---help---
-	  Support for selection of different schedulers. You should choose 'Y' here,
-	  if you want to choose a different scheduler than the default one.
-
-if MPTCP_SCHED_ADVANCED
-
-choice
-	prompt "Default MPTCP Scheduler"
-	default DEFAULT
-	help
-	  Select the Scheduler of your choice
-
-	config DEFAULT_SCHEDULER
-		bool "Default"
-		---help---
-		  This is the default scheduler, sending first on the subflow
-		  with the lowest RTT.
-
-endchoice
-endif
-
-config DEFAULT_MPTCP_SCHED
-	string
-	depends on (MPTCP=y)
-	default "default" if DEFAULT_SCHEDULER
-	default "roundrobin" if DEFAULT_ROUNDROBIN
-	default "redundant" if DEFAULT_REDUNDANT
-	default "default"
-
net/mptcp/mptcp_ctrl.c +1 -34
index eee86f84ba31..83639951c5a5 100644
@@ -95,25 +95,6 @@ static int proc_mptcp_path_manager(struct ctl_table *ctl, int write,
 	return ret;
 }
 
-static int proc_mptcp_scheduler(struct ctl_table *ctl, int write,
-				void __user *buffer, size_t *lenp,
-				loff_t *ppos)
-{
-	char val[MPTCP_SCHED_NAME_MAX];
-	struct ctl_table tbl = {
-		.data = val,
-		.maxlen = MPTCP_SCHED_NAME_MAX,
-	};
-	int ret;
-
-	mptcp_get_default_scheduler(val);
-
-	ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
-	if (write && ret == 0)
-		ret = mptcp_set_default_scheduler(val);
-	return ret;
-}
-
 static struct ctl_table mptcp_table[] = {
 	{
 		.procname = "mptcp_enabled",
@@ -151,12 +132,6 @@ static struct ctl_table mptcp_table[] = {
 		.maxlen		= MPTCP_PM_NAME_MAX,
 		.proc_handler	= proc_mptcp_path_manager,
 	},
-	{
-		.procname	= "mptcp_scheduler",
-		.mode		= 0644,
-		.maxlen		= MPTCP_SCHED_NAME_MAX,
-		.proc_handler	= proc_mptcp_scheduler,
-	},
 	{ }
 };
 
@@ -640,7 +615,6 @@ static void mptcp_mpcb_put(struct mptcp_cb *mpcb)
 {
 	if (refcount_dec_and_test(&mpcb->mpcb_refcnt)) {
 		mptcp_cleanup_path_manager(mpcb);
-		mptcp_cleanup_scheduler(mpcb);
 		kfree(mpcb->master_info);
 		kmem_cache_free(mptcp_cb_cache, mpcb);
 	}
@@ -1312,7 +1286,6 @@ static int mptcp_alloc_mpcb(struct sock *meta_sk, __u64 remote_key,
 	refcount_set(&mpcb->mpcb_refcnt, 1);
 
 	mptcp_init_path_manager(mpcb);
-	mptcp_init_scheduler(mpcb);
 
 	if (!try_module_get(inet_csk(master_sk)->icsk_ca_ops->owner))
 		tcp_assign_congestion_control(master_sk);
@@ -1380,8 +1353,7 @@ int mptcp_add_sock(struct sock *meta_sk, struct sock *sk, u8 loc_id, u8 rem_id,
 
 	tp->mptcp->loc_id = loc_id;
 	tp->mptcp->rem_id = rem_id;
-	if (mpcb->sched_ops->init)
-		mpcb->sched_ops->init(sk);
+	mptcp_sched_init(sk);
 
 	/* The corresponding sock_put is in mptcp_sock_destruct(). It cannot be
 	 * included in mptcp_del_sock(), because the mpcb must remain alive
@@ -2910,17 +2882,12 @@ void __init mptcp_init(void)
 	if (mptcp_register_path_manager(&mptcp_pm_default))
 		goto register_pm_failed;
 
-	if (mptcp_register_scheduler(&mptcp_sched_default))
-		goto register_sched_failed;
-
 	pr_info("MPTCP: Unstable branch");
 
 	mptcp_init_failed = false;
 
 	return;
 
-register_sched_failed:
-	mptcp_unregister_path_manager(&mptcp_pm_default);
 register_pm_failed:
 	unregister_net_sysctl_table(mptcp_sysctl);
 register_sysctl_failed:
net/mptcp/mptcp_output.c +3 -4
index 2d84eb2edd97..00a3674ad693 100644
@@ -306,7 +306,7 @@ int mptcp_write_wakeup(struct sock *meta_sk, int mib)
 	    before(TCP_SKB_CB(skb)->seq, tcp_wnd_end(meta_tp))) {
 		unsigned int mss;
 		unsigned int seg_size = tcp_wnd_end(meta_tp) - TCP_SKB_CB(skb)->seq;
-		struct sock *subsk = meta_tp->mpcb->sched_ops->get_subflow(meta_sk, skb, true);
+		struct sock *subsk = mptcp_get_available_subflow(meta_sk, skb, true);
 		struct tcp_sock *subtp;
 
 		WARN_ON(TCP_SKB_CB(skb)->sacked);
@@ -395,8 +395,7 @@ bool mptcp_write_xmit(struct sock *meta_sk, unsigned int mss_now, int nonagle,
 
 	tcp_mstamp_refresh(meta_tp);
 
-	while ((skb = mpcb->sched_ops->next_segment(meta_sk, &reinject, &subsk,
-						    &sublimit))) {
+	while ((skb = mptcp_next_segment(meta_sk, &reinject, &subsk, &sublimit))) {
 		enum tcp_queue tcp_queue = TCP_FRAG_IN_WRITE_QUEUE;
 		unsigned int limit;
 
@@ -1111,7 +1110,7 @@ int mptcp_retransmit_skb(struct sock *meta_sk, struct sk_buff *skb)
 	/* We need to make sure that the retransmitted segment can be sent on a
 	 * subflow right now. If it is too big, it needs to be fragmented.
 	 */
-	subsk = meta_tp->mpcb->sched_ops->get_subflow(meta_sk, skb, false);
+	subsk = mptcp_get_available_subflow(meta_sk, skb, false);
 	if (!subsk) {
 		/* We want to increase icsk_retransmits, thus return 0, so that
 		 * mptcp_meta_retransmit_timer enters the desired branch.
net/mptcp/mptcp_sched.c +15 -208

279 lines not on this page · raw message

Signature · 1 line
2.16.2
author
#13 lore raw

PATCH 11/12 mptcp: Remove ndiffports path manager

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 net/mptcp/Kconfig            |  12 ----
 net/mptcp/Makefile           |   1 -
 net/mptcp/mptcp_ndiffports.c | 167 -------------------------------------------
 3 files changed, 180 deletions(-)
 delete mode 100644 net/mptcp/mptcp_ndiffports.c
net/mptcp/Kconfig +0 -12
index 860e9e17f76f..60c07fde5dec 100644
@@ -23,14 +23,6 @@ config MPTCP_FULLMESH
 	---help---
 	  This path-management module will create a full-mesh among all IP-addresses.
 
-config MPTCP_NDIFFPORTS
-	tristate "MPTCP ndiff-ports"
-	depends on MPTCP=y
-	---help---
-	  This path-management module will create multiple subflows between the same
-	  pair of IP-addresses, modifying the source-port. You can set the number
-	  of subflows via the mptcp_ndiffports-sysctl.
-
 choice
 	prompt "Default MPTCP Path-Manager"
 	default DEFAULT
@@ -40,9 +32,6 @@ choice
 	config DEFAULT_FULLMESH
 		bool "Full mesh" if MPTCP_FULLMESH=y
 
-	config DEFAULT_NDIFFPORTS
-		bool "ndiff-ports" if MPTCP_NDIFFPORTS=y
-
 	config DEFAULT_DUMMY
 		bool "Default"
 
@@ -54,6 +43,5 @@ config DEFAULT_MPTCP_PM
 	string
 	default "default" if DEFAULT_DUMMY
 	default "fullmesh" if DEFAULT_FULLMESH
-	default "ndiffports" if DEFAULT_NDIFFPORTS
 	default "default"
 
net/mptcp/Makefile +0 -1
index 8e28132c6c2a..433fd17b2987 100644
@@ -9,7 +9,6 @@ mptcp-y := mptcp_ctrl.o mptcp_ipv4.o mptcp_pm.o \
 	   mptcp_output.o mptcp_input.o mptcp_sched.o
 
 obj-$(CONFIG_MPTCP_FULLMESH) += mptcp_fullmesh.o
-obj-$(CONFIG_MPTCP_NDIFFPORTS) += mptcp_ndiffports.o
 
 mptcp-$(subst m,y,$(CONFIG_IPV6)) += mptcp_ipv6.o
 
net/mptcp/mptcp_ndiffports.c deleted +0 -167

167 lines not on this page · raw message

Signature · 1 line
2.16.2
author
#14 lore raw

PATCH 12/12 mptcp: Make path-management no more a module nor selectable through socketops

In reply to Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/linux/tcp.h        |   3 -
 include/net/mptcp.h        |  94 ++++++++------
 include/net/netns/mptcp.h  |   8 +-
 net/ipv4/tcp.c             |  47 -------
 net/ipv4/tcp_input.c       |   4 +-
 net/ipv4/tcp_output.c      |   3 +-
 net/mptcp/Kconfig          |  37 ------
 net/mptcp/Makefile         |   4 +-
 net/mptcp/mptcp_ctrl.c     |  49 +-------
 net/mptcp/mptcp_fullmesh.c | 305 ++++-----------------------------------------
 net/mptcp/mptcp_input.c    |  27 ++--
 net/mptcp/mptcp_ipv4.c     |   2 +-
 net/mptcp/mptcp_ipv6.c     |   2 +-
 net/mptcp/mptcp_output.c   |   8 +-
 net/mptcp/mptcp_pm.c       | 226 ---------------------------------
 15 files changed, 109 insertions(+), 710 deletions(-)
 delete mode 100644 net/mptcp/mptcp_pm.c
include/linux/tcp.h +0 -3
index 02af5c56d2e6..84ec344fe184 100644
@@ -476,15 +476,12 @@ struct tcp_sock {
 		close_it:1,	/* Must close socket in mptcp_data_ready? */
 		closing:1,
 		mptcp_ver:4,
-		mptcp_pm_setsockopt:1,
 		record_master_info:1;
 	struct mptcp_tcp_sock *mptcp;
 #ifdef CONFIG_MPTCP
-#define MPTCP_PM_NAME_MAX 16
 	struct hlist_nulls_node tk_table;
 	u32		mptcp_loc_token;
 	u64		mptcp_loc_key;
-	char		mptcp_pm_name[MPTCP_PM_NAME_MAX];
 #endif /* CONFIG_MPTCP */
 };
 
include/net/mptcp.h +59 -35

131 lines not on this page · raw message

include/net/netns/mptcp.h +2 -6
index 6680f3bbcfc8..c9dd96de4db5 100644
@@ -32,12 +32,8 @@
 
 #include <linux/compiler.h>
 
-enum {
-	MPTCP_PM_FULLMESH = 0,
-	MPTCP_PM_MAX
-};
-
 struct mptcp_mib;
+struct mptcp_fm_ns;
 
 struct netns_mptcp {
 	DEFINE_SNMP_STAT(struct mptcp_mib, mptcp_statistics);
@@ -46,7 +42,7 @@ struct netns_mptcp {
 	struct proc_dir_entry *proc_net_mptcp;
 #endif
 
-	void *path_managers[MPTCP_PM_MAX];
+	struct mptcp_fm_ns *fm_ns;
 };
 
 #endif /* __NETNS_MPTCP_H__ */
net/ipv4/tcp.c +0 -47

59 lines not on this page · raw message

net/ipv4/tcp_input.c +2 -2
index 49ac1b821ac1..5cf9161db844 100644
@@ -6177,7 +6177,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
 			 * addresses, which can only be done after the third ack
 			 * of the 3-way handshake.
 			 */
-			mptcp_update_metasocket(tp->meta_sk);
+			full_mesh_new_session(tp->meta_sk);
 		}
 		if (queued >= 0)
 			return queued;
@@ -6280,7 +6280,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
 		 */
 		if (mptcp(tp)) {
 			if (is_master_tp(tp))
-				mptcp_update_metasocket(mptcp_meta_sk(sk));
+				full_mesh_new_session(mptcp_meta_sk(sk));
 			else
 				tcp_send_ack(sk);
 		}
net/ipv4/tcp_output.c +1 -2
index a1cb6a3c0dda..e41db7407a90 100644
@@ -921,8 +921,7 @@ void tcp_release_cb(struct sock *sk)
 		__sock_put(sk);
 	}
 	if (flags & TCPF_PATH_MANAGER_DEFERRED) {
-		if (tcp_sk(sk)->mpcb->pm_ops->release_sock)
-			tcp_sk(sk)->mpcb->pm_ops->release_sock(sk);
+		full_mesh_release_sock(sk);
 		__sock_put(sk);
 	}
 	if (flags & TCPF_SUB_DEFERRED)
net/mptcp/Kconfig +0 -37
index 60c07fde5dec..c3b835e40d8b 100644
@@ -8,40 +8,3 @@ config MPTCP
           This replaces the normal TCP stack with a Multipath TCP stack,
           able to use several paths at once.
 
-menuconfig MPTCP_PM_ADVANCED
-	bool "MPTCP: advanced path-manager control"
-	depends on MPTCP=y
-	---help---
-	  Support for selection of different path-managers. You should choose 'Y' here,
-	  because otherwise you will not actively create new MPTCP-subflows.
-
-if MPTCP_PM_ADVANCED
-
-config MPTCP_FULLMESH
-	tristate "MPTCP Full-Mesh Path-Manager"
-	depends on MPTCP=y
-	---help---
-	  This path-management module will create a full-mesh among all IP-addresses.
-
-choice
-	prompt "Default MPTCP Path-Manager"
-	default DEFAULT
-	help
-	  Select the Path-Manager of your choice
-
-	config DEFAULT_FULLMESH
-		bool "Full mesh" if MPTCP_FULLMESH=y
-
-	config DEFAULT_DUMMY
-		bool "Default"
-
-endchoice
-
-endif
-
-config DEFAULT_MPTCP_PM
-	string
-	default "default" if DEFAULT_DUMMY
-	default "fullmesh" if DEFAULT_FULLMESH
-	default "default"
-
net/mptcp/Makefile +1 -3
index 433fd17b2987..87901e6b3843 100644
@@ -5,10 +5,8 @@
 
 obj-$(CONFIG_MPTCP) += mptcp.o
 
-mptcp-y := mptcp_ctrl.o mptcp_ipv4.o mptcp_pm.o \
+mptcp-y := mptcp_ctrl.o mptcp_ipv4.o mptcp_fullmesh.o \
 	   mptcp_output.o mptcp_input.o mptcp_sched.o
 
-obj-$(CONFIG_MPTCP_FULLMESH) += mptcp_fullmesh.o
-
 mptcp-$(subst m,y,$(CONFIG_IPV6)) += mptcp_ipv6.o
 
net/mptcp/mptcp_ctrl.c +3 -46

103 lines not on this page · raw message

net/mptcp/mptcp_fullmesh.c +26 -279

488 lines not on this page · raw message

net/mptcp/mptcp_input.c +9 -18
index 88c7a64ef26c..88df2467e1b2 100644
@@ -44,15 +44,6 @@ static inline bool before64(const u64 seq1, const u64 seq2)
 /* is seq1 > seq2 ? */
 #define after64(seq1, seq2)	before64(seq2, seq1)
 
-static inline void mptcp_become_fully_estab(struct sock *sk)
-{
-	tcp_sk(sk)->mptcp->fully_established = 1;
-
-	if (is_master_tp(tcp_sk(sk)) &&
-	    tcp_sk(sk)->mpcb->pm_ops->fully_established)
-		tcp_sk(sk)->mpcb->pm_ops->fully_established(mptcp_meta_sk(sk));
-}
-
 /* Similar to tcp_tso_acked without any memory accounting */
 static inline int mptcp_tso_acked_reinject(const struct sock *meta_sk,
 					   struct sk_buff *skb)
@@ -428,6 +419,7 @@ static int mptcp_prevalidate_skb(struct sock *sk, struct sk_buff *skb)
 		/* We do a seamless fallback and should not send a inf.mapping. */
 		mpcb->send_infinite_mapping = 0;
 		tp->mptcp->fully_established = 1;
+		full_mesh_create_subflows(tp->meta_sk);
 	}
 
 	/* Receiver-side becomes fully established when a whole rcv-window has
@@ -436,8 +428,10 @@ static int mptcp_prevalidate_skb(struct sock *sk, struct sk_buff *skb)
 	 */
 	if (!tp->mptcp->fully_established) {
 		tp->mptcp->init_rcv_wnd -= skb->len;
-		if (tp->mptcp->init_rcv_wnd < 0)
-			mptcp_become_fully_estab(sk);
+		if (tp->mptcp->init_rcv_wnd < 0) {
+			tp->mptcp->fully_established = 1;
+			full_mesh_create_subflows(tp->meta_sk);
+		}
 	}
 
 	return 0;
@@ -1247,7 +1241,7 @@ static void mptcp_data_ack(struct sock *sk, const struct sk_buff *skb)
 		/* As soon as a subflow-data-ack (not acking syn, thus snt_isn + 1)
 		 * includes a data-ack, we are fully established
 		 */
-		mptcp_become_fully_estab(sk);
+		tp->mptcp->fully_established = 1;
 
 	/* After we did the subflow-only processing (stopping timer and marking
 	 * subflow as established), check if we can proceed with MPTCP-level
@@ -1757,8 +1751,7 @@ static void mptcp_handle_add_addr(const unsigned char *ptr, struct sock *sk)
 		return;
 	}
 
-	if (mpcb->pm_ops->add_raddr)
-		mpcb->pm_ops->add_raddr(mpcb, &addr, family, port, mpadd->addr_id);
+	full_mesh_add_raddr(mpcb, &addr, family, port, mpadd->addr_id);
 
 	MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_ADDADDRRX);
 }
@@ -1773,8 +1766,7 @@ static void mptcp_handle_rem_addr(const unsigned char *ptr, struct sock *sk)
 	for (i = 0; i <= mprem->len - MPTCP_SUB_LEN_REMOVE_ADDR; i++) {
 		rem_id = (&mprem->addrs_id)[i];
 
-		if (mpcb->pm_ops->rem_raddr)
-			mpcb->pm_ops->rem_raddr(mpcb, rem_id);
+		full_mesh_rem_raddr(mpcb, rem_id);
 		mptcp_send_reset_rem_id(mpcb, rem_id);
 
 		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_REMADDRSUB);
@@ -1877,8 +1869,7 @@ static inline void mptcp_path_array_check(struct sock *meta_sk)
 
 	if (unlikely(mpcb->list_rcvd)) {
 		mpcb->list_rcvd = 0;
-		if (mpcb->pm_ops->new_remote_address)
-			mpcb->pm_ops->new_remote_address(meta_sk);
+		full_mesh_create_subflows(meta_sk);
 	}
 }
 
net/mptcp/mptcp_ipv4.c +1 -1
index 94bc1416af77..8153b1d7e4bf 100644
@@ -105,7 +105,7 @@ static int mptcp_v4_join_init_req(struct request_sock *req, const struct sock *m
 						    tcp_hdr(skb)->source,
 						    tcp_hdr(skb)->dest);
 	addr.ip = inet_rsk(req)->ir_loc_addr;
-	loc_id = mpcb->pm_ops->get_local_id(AF_INET, &addr, sock_net(meta_sk));
+	loc_id = full_mesh_get_local_id(AF_INET, &addr, sock_net(meta_sk));
 	if (loc_id == -1)
 		return -1;
 	mtreq->loc_id = loc_id;
net/mptcp/mptcp_ipv6.c +1 -1
index 297dd872fbfb..19ce256a7679 100644
@@ -134,7 +134,7 @@ static int mptcp_v6_join_init_req(struct request_sock *req, const struct sock *m
 						    tcp_hdr(skb)->source,
 						    tcp_hdr(skb)->dest);
 	addr.in6 = inet_rsk(req)->ir_v6_loc_addr;
-	loc_id = mpcb->pm_ops->get_local_id(AF_INET6, &addr, sock_net(meta_sk));
+	loc_id = full_mesh_get_local_id(AF_INET6, &addr, sock_net(meta_sk));
 	if (loc_id == -1)
 		return -1;
 	mtreq->loc_id = loc_id;
net/mptcp/mptcp_output.c +4 -4
index 00a3674ad693..b3978a7e9254 100644
@@ -709,9 +709,9 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 		*size += MPTCP_SUB_LEN_JOIN_ACK_ALIGN;
 	}
 
-	if (unlikely(mpcb->addr_signal) && mpcb->pm_ops->addr_signal &&
+	if (unlikely(mpcb->addr_signal) &&
 	    mpcb->mptcp_ver >= MPTCP_VERSION_1 && skb && !mptcp_is_data_seq(skb)) {
-		mpcb->pm_ops->addr_signal(sk, size, opts, skb);
+		full_mesh_addr_signal(sk, size, opts, skb);
 
 		if (opts->add_addr_v6)
 			/* Skip subsequent options */
@@ -734,9 +734,9 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 		*size += MPTCP_SUB_LEN_DSS_ALIGN;
 	}
 
-	if (unlikely(mpcb->addr_signal) && mpcb->pm_ops->addr_signal &&
+	if (unlikely(mpcb->addr_signal) &&
 	    mpcb->mptcp_ver < MPTCP_VERSION_1)
-		mpcb->pm_ops->addr_signal(sk, size, opts, skb);
+		full_mesh_addr_signal(sk, size, opts, skb);
 
 	return;
 }
net/mptcp/mptcp_pm.c deleted +0 -226

226 lines not on this page · raw message

Signature · 1 line
2.16.2
author
#15 lore raw

Re: [MPTCP] [PATCH 12/12] mptcp: Make path-management no more a module nor selectable through socketops

Quoted 1,024 lines · Christoph Paasch
Signed-off-by Christoph Paasch <cpaasch(a)apple.com>
---
 include/linux/tcp.h        |   3 -
 include/net/mptcp.h        |  94 ++++++++------
 include/net/netns/mptcp.h  |   8 +-
 net/ipv4/tcp.c             |  47 -------
 net/ipv4/tcp_input.c       |   4 +-
 net/ipv4/tcp_output.c      |   3 +-
 net/mptcp/Kconfig          |  37 ------
 net/mptcp/Makefile         |   4 +-
 net/mptcp/mptcp_ctrl.c     |  49 +-------
 net/mptcp/mptcp_fullmesh.c | 305 ++++-----------------------------------------
 net/mptcp/mptcp_input.c    |  27 ++--
 net/mptcp/mptcp_ipv4.c     |   2 +-
 net/mptcp/mptcp_ipv6.c     |   2 +-
 net/mptcp/mptcp_output.c   |   8 +-
 net/mptcp/mptcp_pm.c       | 226 ---------------------------------
 15 files changed, 109 insertions(+), 710 deletions(-)
 delete mode 100644 net/mptcp/mptcp_pm.c
include/linux/tcp.h +0 -3
index 02af5c56d2e6..84ec344fe184 100644
@@ -476,15 +476,12 @@ struct tcp_sock {
 		close_it:1,	/* Must close socket in mptcp_data_ready? */
 		closing:1,
 		mptcp_ver:4,
-		mptcp_pm_setsockopt:1,
 		record_master_info:1;
 	struct mptcp_tcp_sock *mptcp;
 #ifdef CONFIG_MPTCP
-#define MPTCP_PM_NAME_MAX 16
 	struct hlist_nulls_node tk_table;
 	u32		mptcp_loc_token;
 	u64		mptcp_loc_key;
-	char		mptcp_pm_name[MPTCP_PM_NAME_MAX];
 #endif /* CONFIG_MPTCP */
 };
 
include/net/mptcp.h +59 -35
index 90a9e220702a..7ea8539384e5 100644
@@ -195,27 +195,50 @@ struct mptcp_tw {
 	   in_list:1;
 };
 
-#define MPTCP_PM_NAME_MAX 16
-struct mptcp_pm_ops {
-	struct list_head list;
+struct fullmesh_rem4 {
+	u8		rem4_id;
+	u8		bitfield;
+	u8		retry_bitfield;
+	__be16		port;
+	struct in_addr	addr;
+};
 
-	/* Signal the creation of a new MPTCP-session. */
-	void (*new_session)(const struct sock *meta_sk);
-	void (*release_sock)(struct sock *meta_sk);
-	void (*fully_established)(struct sock *meta_sk);
-	void (*new_remote_address)(struct sock *meta_sk);
-	void (*subflow_error)(struct sock *meta_sk, struct sock *sk);
-	int  (*get_local_id)(sa_family_t family, union inet_addr *addr,
-			     struct net *net);
-	void (*addr_signal)(struct sock *sk, unsigned *size,
-			    struct tcp_out_options *opts, struct sk_buff *skb);
-	void (*add_raddr)(struct mptcp_cb *mpcb, const union inet_addr *addr,
-			  sa_family_t family, __be16 port, u8 id);
-	void (*rem_raddr)(struct mptcp_cb *mpcb, u8 rem_id);
-	void (*delete_subflow)(struct sock *sk);
-
-	char		name[MPTCP_PM_NAME_MAX];
-	struct module	*owner;
+struct fullmesh_rem6 {
+	u8		rem6_id;
+	u8		bitfield;
+	u8		retry_bitfield;
+	__be16		port;
+	struct in6_addr	addr;
+};
+
+/* Max number of local or remote addresses we can store.
+ * When changing, see the bitfield below in fullmesh_rem4/6.
+ */
+#define MPTCP_MAX_ADDR	8
+
+struct fullmesh_priv {
+	/* Worker struct for subflow establishment */
+	struct work_struct subflow_work;
+	/* Delayed worker, when the routing-tables are not yet ready. */
+	struct delayed_work subflow_retry_work;
+
+	/* Remote addresses */
+	struct fullmesh_rem4 remaddr4[MPTCP_MAX_ADDR];
+	struct fullmesh_rem6 remaddr6[MPTCP_MAX_ADDR];
+
+	struct mptcp_cb *mpcb;
+
+	u16 remove_addrs; /* Addresses to remove */
+	u8 announced_addrs_v4; /* IPv4 Addresses we did announce */
+	u8 announced_addrs_v6; /* IPv6 Addresses we did announce */
+
+	u8	add_addr; /* Are we sending an add_addr? */
+
+	u8 rem4_bits;
+	u8 rem6_bits;
+
+	/* Have we established the additional subflows for primary pair? */
+	u8 first_pair:1;
 };
 
 struct mptcp_cb {
@@ -273,9 +296,7 @@ struct mptcp_cb {
 	__u32	mptcp_loc_token;
 	__u32	mptcp_rem_token;
 
-#define MPTCP_PM_SIZE 608
-	u8 mptcp_pm[MPTCP_PM_SIZE] __aligned(8);
-	struct mptcp_pm_ops *pm_ops;
+	struct fullmesh_priv fmp;
 
 	unsigned long path_index_bits;
 
@@ -690,7 +711,6 @@ void mptcp_cleanup_rbuf(struct sock *meta_sk, int copied);
 int mptcp_add_sock(struct sock *meta_sk, struct sock *sk, u8 loc_id, u8 rem_id,
 		   gfp_t flags);
 void mptcp_del_sock(struct sock *sk);
-void mptcp_update_metasocket(const struct sock *meta_sk);
 void mptcp_update_sndbuf(const struct tcp_sock *tp);
 void mptcp_send_fin(struct sock *meta_sk);
 void mptcp_send_active_reset(struct sock *meta_sk, gfp_t priority);
@@ -793,16 +813,19 @@ int mptcp_finish_handshake(struct sock *child, struct sk_buff *skb);
 int mptcp_get_info(const struct sock *meta_sk, char __user *optval, int optlen);
 void mptcp_clear_sk(struct sock *sk, int size);
 
-/* MPTCP-path-manager registration/initialization functions */
-int mptcp_register_path_manager(struct mptcp_pm_ops *pm);
-void mptcp_unregister_path_manager(struct mptcp_pm_ops *pm);
-void mptcp_init_path_manager(struct mptcp_cb *mpcb);
-void mptcp_cleanup_path_manager(struct mptcp_cb *mpcb);
-void mptcp_fallback_default(struct mptcp_cb *mpcb);
-void mptcp_get_default_path_manager(char *name);
-int mptcp_set_path_manager(struct sock *sk, const char *name);
-int mptcp_set_default_path_manager(const char *name);
-extern struct mptcp_pm_ops mptcp_pm_default;
+int __init full_mesh_register(void);
+void full_mesh_new_session(const struct sock *meta_sk);
+void full_mesh_release_sock(struct sock *meta_sk);
+void full_mesh_create_subflows(struct sock *meta_sk);
+int full_mesh_get_local_id(sa_family_t family, union inet_addr *addr,
+			   struct net *net);
+void full_mesh_addr_signal(struct sock *sk, unsigned *size,
+			   struct tcp_out_options *opts,
+			   struct sk_buff *skb);
+void full_mesh_add_raddr(struct mptcp_cb *mpcb,
+			 const union inet_addr *addr,
+			 sa_family_t family, __be16 port, u8 id);
+void full_mesh_rem_raddr(struct mptcp_cb *mpcb, u8 rem_id);
 
 void mptcp_sched_init(struct sock *sk);
 struct sock *mptcp_get_available_subflow(struct sock *meta_sk,
@@ -1223,7 +1246,6 @@ static inline int is_master_tp(const struct tcp_sock *tp)
 	return 0;
 }
 static inline void mptcp_del_sock(const struct sock *sk) {}
-static inline void mptcp_update_metasocket(const struct sock *meta_sk) {}
 static inline void mptcp_update_sndbuf(const struct tcp_sock *tp) {}
 static inline void mptcp_clean_rtx_infinite(const struct sk_buff *skb,
 					    const struct sock *sk) {}
@@ -1336,6 +1358,8 @@ static inline bool mptcp_can_new_subflow(const struct sock *meta_sk)
 {
 	return false;
 }
+static inline void full_mesh_new_session(const struct sock *meta_sk) {}
+static inline void full_mesh_release_sock(struct sock *meta_sk) {}
 
 #endif /* CONFIG_MPTCP */
 
include/net/netns/mptcp.h +2 -6
index 6680f3bbcfc8..c9dd96de4db5 100644
@@ -32,12 +32,8 @@
 
 #include <linux/compiler.h>
 
-enum {
-	MPTCP_PM_FULLMESH = 0,
-	MPTCP_PM_MAX
-};
-
 struct mptcp_mib;
+struct mptcp_fm_ns;
 
 struct netns_mptcp {
 	DEFINE_SNMP_STAT(struct mptcp_mib, mptcp_statistics);
@@ -46,7 +42,7 @@ struct netns_mptcp {
 	struct proc_dir_entry *proc_net_mptcp;
 #endif
 
-	void *path_managers[MPTCP_PM_MAX];
+	struct mptcp_fm_ns *fm_ns;
 };
 
 #endif /* __NETNS_MPTCP_H__ */
net/ipv4/tcp.c +0 -47
index 3f570b2c7eea..76555f8b26fe 100644
@@ -2801,34 +2801,6 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
 
 		return tcp_fastopen_reset_cipher(net, sk, key, sizeof(key));
 	}
-#ifdef CONFIG_MPTCP
-	case MPTCP_PATH_MANAGER: {
-		char name[MPTCP_PM_NAME_MAX];
-
-		if (optlen < 1)
-			return -EINVAL;
-
-		/* Cannot be used if MPTCP is not used or we already have
-		 * established an MPTCP-connection.
-		 */
-		if (mptcp_init_failed || !sysctl_mptcp_enabled ||
-		    sk->sk_state != TCP_CLOSE)
-			return -EPERM;
-
-		val = strncpy_from_user(name, optval,
-					min_t(long, MPTCP_PM_NAME_MAX - 1,
-					      optlen));
-
-		if (val < 0)
-			return -EFAULT;
-		name[val] = 0;
-
-		lock_sock(sk);
-		err = mptcp_set_path_manager(sk, name);
-		release_sock(sk);
-		return err;
-	}
-#endif
 	default:
 		/* fallthru */
 		break;
@@ -3661,25 +3633,6 @@ static int do_tcp_getsockopt(struct sock *sk, int level,
 	}
 #endif
 #ifdef CONFIG_MPTCP
-	case MPTCP_PATH_MANAGER:
-		if (get_user(len, optlen))
-			return -EFAULT;
-		len = min_t(unsigned int, len, MPTCP_PM_NAME_MAX);
-		if (put_user(len, optlen))
-			return -EFAULT;
-
-		if (mptcp(tcp_sk(sk))) {
-			struct mptcp_cb *mpcb = tcp_sk(mptcp_meta_sk(sk))->mpcb;
-
-			if (copy_to_user(optval, mpcb->pm_ops->name, len))
-				return -EFAULT;
-		} else {
-			if (copy_to_user(optval, tcp_sk(sk)->mptcp_pm_name,
-					 len))
-				return -EFAULT;
-		}
-		return 0;
-
 	case MPTCP_ENABLED:
 		if (sk->sk_state != TCP_SYN_SENT)
 			val = mptcp(tp) ? 1 : 0;
net/ipv4/tcp_input.c +2 -2
index 49ac1b821ac1..5cf9161db844 100644
@@ -6177,7 +6177,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
 			 * addresses, which can only be done after the third ack
 			 * of the 3-way handshake.
 			 */
-			mptcp_update_metasocket(tp->meta_sk);
+			full_mesh_new_session(tp->meta_sk);
 		}
 		if (queued >= 0)
 			return queued;
@@ -6280,7 +6280,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)
 		 */
 		if (mptcp(tp)) {
 			if (is_master_tp(tp))
-				mptcp_update_metasocket(mptcp_meta_sk(sk));
+				full_mesh_new_session(mptcp_meta_sk(sk));
 			else
 				tcp_send_ack(sk);
 		}
net/ipv4/tcp_output.c +1 -2
index a1cb6a3c0dda..e41db7407a90 100644
@@ -921,8 +921,7 @@ void tcp_release_cb(struct sock *sk)
 		__sock_put(sk);
 	}
 	if (flags & TCPF_PATH_MANAGER_DEFERRED) {
-		if (tcp_sk(sk)->mpcb->pm_ops->release_sock)
-			tcp_sk(sk)->mpcb->pm_ops->release_sock(sk);
+		full_mesh_release_sock(sk);
 		__sock_put(sk);
 	}
 	if (flags & TCPF_SUB_DEFERRED)
net/mptcp/Kconfig +0 -37
index 60c07fde5dec..c3b835e40d8b 100644
@@ -8,40 +8,3 @@ config MPTCP
           This replaces the normal TCP stack with a Multipath TCP stack,
           able to use several paths at once.
 
-menuconfig MPTCP_PM_ADVANCED
-	bool "MPTCP: advanced path-manager control"
-	depends on MPTCP=y
-	---help---
-	  Support for selection of different path-managers. You should choose 'Y' here,
-	  because otherwise you will not actively create new MPTCP-subflows.
-
-if MPTCP_PM_ADVANCED
-
-config MPTCP_FULLMESH
-	tristate "MPTCP Full-Mesh Path-Manager"
-	depends on MPTCP=y
-	---help---
-	  This path-management module will create a full-mesh among all IP-addresses.
-
-choice
-	prompt "Default MPTCP Path-Manager"
-	default DEFAULT
-	help
-	  Select the Path-Manager of your choice
-
-	config DEFAULT_FULLMESH
-		bool "Full mesh" if MPTCP_FULLMESH=y
-
-	config DEFAULT_DUMMY
-		bool "Default"
-
-endchoice
-
-endif
-
-config DEFAULT_MPTCP_PM
-	string
-	default "default" if DEFAULT_DUMMY
-	default "fullmesh" if DEFAULT_FULLMESH
-	default "default"
-
net/mptcp/Makefile +1 -3
index 433fd17b2987..87901e6b3843 100644
@@ -5,10 +5,8 @@
 
 obj-$(CONFIG_MPTCP) += mptcp.o
 
-mptcp-y := mptcp_ctrl.o mptcp_ipv4.o mptcp_pm.o \
+mptcp-y := mptcp_ctrl.o mptcp_ipv4.o mptcp_fullmesh.o \
 	   mptcp_output.o mptcp_input.o mptcp_sched.o
 
-obj-$(CONFIG_MPTCP_FULLMESH) += mptcp_fullmesh.o
-
 mptcp-$(subst m,y,$(CONFIG_IPV6)) += mptcp_ipv6.o
 
net/mptcp/mptcp_ctrl.c +3 -46
index 83639951c5a5..f170de1c72d4 100644
@@ -76,25 +76,6 @@ bool mptcp_init_failed __read_mostly;
 struct static_key mptcp_static_key = STATIC_KEY_INIT_FALSE;
 EXPORT_SYMBOL(mptcp_static_key);
 
-static int proc_mptcp_path_manager(struct ctl_table *ctl, int write,
-				   void __user *buffer, size_t *lenp,
-				   loff_t *ppos)
-{
-	char val[MPTCP_PM_NAME_MAX];
-	struct ctl_table tbl = {
-		.data = val,
-		.maxlen = MPTCP_PM_NAME_MAX,
-	};
-	int ret;
-
-	mptcp_get_default_path_manager(val);
-
-	ret = proc_dostring(&tbl, write, buffer, lenp, ppos);
-	if (write && ret == 0)
-		ret = mptcp_set_default_path_manager(val);
-	return ret;
-}
-
 static struct ctl_table mptcp_table[] = {
 	{
 		.procname = "mptcp_enabled",
@@ -126,12 +107,6 @@ static struct ctl_table mptcp_table[] = {
 		.mode = 0644,
 		.proc_handler = &proc_dointvec
 	},
-	{
-		.procname	= "mptcp_path_manager",
-		.mode		= 0644,
-		.maxlen		= MPTCP_PM_NAME_MAX,
-		.proc_handler	= proc_mptcp_path_manager,
-	},
 	{ }
 };
 
@@ -604,9 +579,6 @@ static void mptcp_sock_def_error_report(struct sock *sk)
 			tcp_done(meta_sk);
 	}
 
-	if (mpcb->pm_ops->subflow_error)
-		mpcb->pm_ops->subflow_error(meta_sk, sk);
-
 	sk->sk_err = 0;
 	return;
 }
@@ -614,7 +586,6 @@ static void mptcp_sock_def_error_report(struct sock *sk)
 static void mptcp_mpcb_put(struct mptcp_cb *mpcb)
 {
 	if (refcount_dec_and_test(&mpcb->mpcb_refcnt)) {
-		mptcp_cleanup_path_manager(mpcb);
 		kfree(mpcb->master_info);
 		kmem_cache_free(mptcp_cb_cache, mpcb);
 	}
@@ -1285,8 +1256,6 @@ static int mptcp_alloc_mpcb(struct sock *meta_sk, __u64 remote_key,
 	/* The meta is directly linked - set refcnt to 1 */
 	refcount_set(&mpcb->mpcb_refcnt, 1);
 
-	mptcp_init_path_manager(mpcb);
-
 	if (!try_module_get(inet_csk(master_sk)->icsk_ca_ops->owner))
 		tcp_assign_congestion_control(master_sk);
 
@@ -1417,9 +1386,6 @@ void mptcp_del_sock(struct sock *sk)
 
 	mpcb = tp->mpcb;
 
-	if (mpcb->pm_ops->delete_subflow)
-		mpcb->pm_ops->delete_subflow(sk);
-
 	mptcp_debug("%s: Removing subsock tok %#x pi:%d state %d is_meta? %d\n",
 		    __func__, mpcb->mptcp_loc_token, tp->mptcp->path_index,
 		    sk->sk_state, is_meta_sk(sk));
@@ -1452,15 +1418,6 @@ void mptcp_del_sock(struct sock *sk)
 	rcu_assign_pointer(inet_sk(sk)->inet_opt, NULL);
 }
 
-/* Updates the MPTCP-session based on path-manager information (e.g., addresses,
- * low-prio flows,...).
- */
-void mptcp_update_metasocket(const struct sock *meta_sk)
-{
-	if (tcp_sk(meta_sk)->mpcb->pm_ops->new_session)
-		tcp_sk(meta_sk)->mpcb->pm_ops->new_session(meta_sk);
-}
-
 /* Clean up the receive buffer for full frames taken by the user,
  * then send an ACK if necessary.  COPIED is the number of bytes
  * tcp_recvmsg has given to the user so far, it speeds up the
@@ -2879,8 +2836,8 @@ void __init mptcp_init(void)
 	if (!mptcp_sysctl)
 		goto register_sysctl_failed;
 
-	if (mptcp_register_path_manager(&mptcp_pm_default))
-		goto register_pm_failed;
+	if (full_mesh_register())
+		goto register_full_mesh_failed;
 
 	pr_info("MPTCP: Unstable branch");
 
@@ -2888,7 +2845,7 @@ void __init mptcp_init(void)
 
 	return;
 
-register_pm_failed:
+register_full_mesh_failed:
 	unregister_net_sysctl_table(mptcp_sysctl);
 register_sysctl_failed:
 	mptcp_pm_v4_undo();
net/mptcp/mptcp_fullmesh.c +26 -279
index 3fff298cee86..5990897605b3 100644
@@ -16,27 +16,6 @@ enum {
 
 #define MPTCP_SUBFLOW_RETRY_DELAY	1000
 
-/* Max number of local or remote addresses we can store.
- * When changing, see the bitfield below in fullmesh_rem4/6.
- */
-#define MPTCP_MAX_ADDR	8
-
-struct fullmesh_rem4 {
-	u8		rem4_id;
-	u8		bitfield;
-	u8		retry_bitfield;
-	__be16		port;
-	struct in_addr	addr;
-};
-
-struct fullmesh_rem6 {
-	u8		rem6_id;
-	u8		bitfield;
-	u8		retry_bitfield;
-	__be16		port;
-	struct in6_addr	addr;
-};
-
 struct mptcp_loc_addr {
 	struct mptcp_loc4 locaddr4[MPTCP_MAX_ADDR];
 	u8 loc4_bits;
@@ -56,31 +35,6 @@ struct mptcp_addr_event {
 	union inet_addr addr;
 };
 
-struct fullmesh_priv {
-	/* Worker struct for subflow establishment */
-	struct work_struct subflow_work;
-	/* Delayed worker, when the routing-tables are not yet ready. */
-	struct delayed_work subflow_retry_work;
-
-	/* Remote addresses */
-	struct fullmesh_rem4 remaddr4[MPTCP_MAX_ADDR];
-	struct fullmesh_rem6 remaddr6[MPTCP_MAX_ADDR];
-
-	struct mptcp_cb *mpcb;
-
-	u16 remove_addrs; /* Addresses to remove */
-	u8 announced_addrs_v4; /* IPv4 Addresses we did announce */
-	u8 announced_addrs_v6; /* IPv6 Addresses we did announce */
-
-	u8	add_addr; /* Are we sending an add_addr? */
-
-	u8 rem4_bits;
-	u8 rem6_bits;
-
-	/* Have we established the additional subflows for primary pair? */
-	u8 first_pair:1;
-};
-
 struct mptcp_fm_ns {
 	struct mptcp_loc_addr __rcu *local;
 	spinlock_t local_lock; /* Protecting the above pointer */
@@ -90,26 +44,14 @@ struct mptcp_fm_ns {
 	struct net *net;
 };
 
-static int num_subflows __read_mostly = 1;
-module_param(num_subflows, int, 0644);
-MODULE_PARM_DESC(num_subflows, "choose the number of subflows per pair of IP addresses of MPTCP connection");
-
-static int create_on_err __read_mostly;
-module_param(create_on_err, int, 0644);
-MODULE_PARM_DESC(create_on_err, "recreate the subflow upon a timeout");
-
-static struct mptcp_pm_ops full_mesh __read_mostly;
-
-static void full_mesh_create_subflows(struct sock *meta_sk);
-
-static struct mptcp_fm_ns *fm_get_ns(const struct net *net)
+static struct mptcp_fm_ns *fm_get_ns(struct net *net)
 {
-	return (struct mptcp_fm_ns *)net->mptcp.path_managers[MPTCP_PM_FULLMESH];
+	return net->mptcp.fm_ns;
 }
 
-static struct fullmesh_priv *fullmesh_get_priv(const struct mptcp_cb *mpcb)
+static struct fullmesh_priv *fullmesh_get_priv(struct mptcp_cb *mpcb)
 {
-	return (struct fullmesh_priv *)&mpcb->mptcp_pm[0];
+	return &mpcb->fmp;
 }
 
 /* Find the first free index in the bitfield */
@@ -265,7 +207,7 @@ static void mptcp_v4_rem_raddress(struct mptcp_cb *mpcb, u8 id)
 	}
 }
 
-static void mptcp_v6_rem_raddress(const struct mptcp_cb *mpcb, u8 id)
+static void mptcp_v6_rem_raddress(struct mptcp_cb *mpcb, u8 id)
 {
 	int i;
 	struct fullmesh_priv *fmp = fullmesh_get_priv(mpcb);
@@ -281,7 +223,7 @@ static void mptcp_v6_rem_raddress(const struct mptcp_cb *mpcb, u8 id)
 }
 
 /* Sets the bitfield of the remote-address field */
-static void mptcp_v4_set_init_addr_bit(const struct mptcp_cb *mpcb,
+static void mptcp_v4_set_init_addr_bit(struct mptcp_cb *mpcb,
 				       const struct in_addr *addr, u8 index)
 {
 	int i;
@@ -320,28 +262,6 @@ static void mptcp_set_init_addr_bit(struct mptcp_cb *mpcb,
 		mptcp_v6_set_init_addr_bit(mpcb, &addr->in6, id);
 }
 
-static void mptcp_v4_subflows(struct sock *meta_sk,
-			      const struct mptcp_loc4 *loc,
-			      struct mptcp_rem4 *rem)
-{
-	int i;
-
-	for (i = 1; i < num_subflows; i++)
-		mptcp_init4_subsockets(meta_sk, loc, rem);
-}
-
-#if IS_ENABLED(CONFIG_IPV6)
-static void mptcp_v6_subflows(struct sock *meta_sk,
-			      const struct mptcp_loc6 *loc,
-			      struct mptcp_rem6 *rem)
-{
-	int i;
-
-	for (i = 1; i < num_subflows; i++)
-		mptcp_init6_subsockets(meta_sk, loc, rem);
-}
-#endif
-
 static void retry_subflow_worker(struct work_struct *work)
 {
 	struct delayed_work *delayed_work = container_of(work,
@@ -397,9 +317,6 @@ static void retry_subflow_worker(struct work_struct *work)
 			rem4.rem4_id = rem->rem4_id;
 
 			mptcp_init4_subsockets(meta_sk, &mptcp_local->locaddr4[i], &rem4);
-			mptcp_v4_subflows(meta_sk,
-					  &mptcp_local->locaddr4[i],
-					  &rem4);
 			goto next_subflow;
 		}
 	}
@@ -421,9 +338,6 @@ static void retry_subflow_worker(struct work_struct *work)
 			rem6.rem6_id = rem->rem6_id;
 
 			mptcp_init6_subsockets(meta_sk, &mptcp_local->locaddr6[i], &rem6);
-			mptcp_v6_subflows(meta_sk,
-					  &mptcp_local->locaddr6[i],
-					  &rem6);
 			goto next_subflow;
 		}
 	}
@@ -482,23 +396,6 @@ static void create_subflow_worker(struct work_struct *work)
 	    !tcp_sk(mpcb->master_sk)->mptcp->fully_established)
 		goto exit;
 
-	/* Create the additional subflows for the first pair */
-	if (fmp->first_pair == 0 && mpcb->master_sk) {
-		struct mptcp_loc4 loc;
-		struct mptcp_rem4 rem;
-
-		loc.addr.s_addr = inet_sk(meta_sk)->inet_saddr;
-		loc.loc4_id = 0;
-		loc.if_idx = mpcb->master_sk->sk_bound_dev_if;
-
-		rem.addr.s_addr = inet_sk(meta_sk)->inet_daddr;
-		rem.port = inet_sk(meta_sk)->inet_dport;
-		rem.rem4_id = 0; /* Default 0 */
-
-		mptcp_v4_subflows(meta_sk, &loc, &rem);
-
-		fmp->first_pair = 1;
-	}
 	iter++;
 
 	mptcp_for_each_bit_set(fmp->rem4_bits, i) {
@@ -523,31 +420,11 @@ static void create_subflow_worker(struct work_struct *work)
 			if (mptcp_init4_subsockets(meta_sk, &mptcp_local->locaddr4[i],
 						   &rem4) == -ENETUNREACH)
 				retry = rem->retry_bitfield |= (1 << i);
-			else
-				mptcp_v4_subflows(meta_sk,
-						  &mptcp_local->locaddr4[i],
-						  &rem4);
 			goto next_subflow;
 		}
 	}
 
 #if IS_ENABLED(CONFIG_IPV6)
-	if (fmp->first_pair == 0 && mpcb->master_sk) {
-			struct mptcp_loc6 loc;
-			struct mptcp_rem6 rem;
-
-			loc.addr = inet6_sk(meta_sk)->saddr;
-			loc.loc6_id = 0;
-			loc.if_idx = mpcb->master_sk->sk_bound_dev_if;
-
-			rem.addr = meta_sk->sk_v6_daddr;
-			rem.port = inet_sk(meta_sk)->inet_dport;
-			rem.rem6_id = 0; /* Default 0 */
-
-			mptcp_v6_subflows(meta_sk, &loc, &rem);
-
-			fmp->first_pair = 1;
-	}
 	mptcp_for_each_bit_set(fmp->rem6_bits, i) {
 		struct fullmesh_rem6 *rem;
 		u8 remaining_bits;
@@ -570,10 +447,6 @@ static void create_subflow_worker(struct work_struct *work)
 			if (mptcp_init6_subsockets(meta_sk, &mptcp_local->locaddr6[i],
 						   &rem6) == -ENETUNREACH)
 				retry = rem->retry_bitfield |= (1 << i);
-			else
-				mptcp_v6_subflows(meta_sk,
-						  &mptcp_local->locaddr6[i],
-						  &rem6);
 			goto next_subflow;
 		}
 	}
@@ -863,10 +736,6 @@ static void mptcp_address_worker(struct work_struct *work)
 			    mpcb->send_infinite_mapping)
 				goto next;
 
-			/* May be that the pm has changed in-between */
-			if (mpcb->pm_ops != &full_mesh)
-				goto next;
-
 			if (sock_owned_by_user(meta_sk)) {
 				if (!test_and_set_bit(MPTCP_PATH_MANAGER_DEFERRED,
 						      &meta_sk->sk_tsq_flags))
@@ -954,7 +823,7 @@ static void mptcp_address_worker(struct work_struct *work)
 	goto next_event;
 }
 
-static struct mptcp_addr_event *lookup_similar_event(const struct net *net,
+static struct mptcp_addr_event *lookup_similar_event(struct net *net,
 						     const struct mptcp_addr_event *event)
 {
 	struct mptcp_addr_event *eventq;
@@ -1168,9 +1037,9 @@ static struct notifier_block mptcp_pm_netdev_notifier = {
 		.notifier_call = netdev_event,
 };
 
-static void full_mesh_add_raddr(struct mptcp_cb *mpcb,
-				const union inet_addr *addr,
-				sa_family_t family, __be16 port, u8 id)
+void full_mesh_add_raddr(struct mptcp_cb *mpcb,
+			 const union inet_addr *addr,
+			 sa_family_t family, __be16 port, u8 id)
 {
 	if (family == AF_INET)
 		mptcp_addv4_raddr(mpcb, &addr->in, port, id);
@@ -1178,7 +1047,7 @@ static void full_mesh_add_raddr(struct mptcp_cb *mpcb,
 		mptcp_addv6_raddr(mpcb, &addr->in6, port, id);
 }
 
-static void full_mesh_new_session(const struct sock *meta_sk)
+void full_mesh_new_session(const struct sock *meta_sk)
 {
 	struct mptcp_loc_addr *mptcp_local;
 	struct mptcp_cb *mpcb = tcp_sk(meta_sk)->mpcb;
@@ -1215,7 +1084,7 @@ static void full_mesh_new_session(const struct sock *meta_sk)
 	else
 		index = mptcp_find_address(mptcp_local, family, &saddr, if_idx);
 	if (index < 0)
-		goto fallback;
+		goto exit;
 
 	full_mesh_add_raddr(mpcb, &daddr, family, 0, 0);
 	mptcp_set_init_addr_bit(mpcb, &daddr, family, index);
@@ -1276,15 +1145,14 @@ static void full_mesh_new_session(const struct sock *meta_sk)
 
 	return;
 
-fallback:
+exit:
 	rcu_read_unlock_bh();
-	mptcp_fallback_default(mpcb);
 	return;
 }
 
-static void full_mesh_create_subflows(struct sock *meta_sk)
+void full_mesh_create_subflows(struct sock *meta_sk)
 {
-	const struct mptcp_cb *mpcb = tcp_sk(meta_sk)->mpcb;
+	struct mptcp_cb *mpcb = tcp_sk(meta_sk)->mpcb;
 	struct fullmesh_priv *fmp = fullmesh_get_priv(mpcb);
 
 	if (mpcb->infinite_mapping_snd || mpcb->infinite_mapping_rcv ||
@@ -1302,28 +1170,10 @@ static void full_mesh_create_subflows(struct sock *meta_sk)
 	}
 }
 
-static void full_mesh_subflow_error(struct sock *meta_sk, struct sock *sk)
-{
-	const struct mptcp_cb *mpcb = tcp_sk(meta_sk)->mpcb;
-
-	if (!create_on_err)
-		return;
-
-	if (mpcb->infinite_mapping_snd || mpcb->infinite_mapping_rcv ||
-	    mpcb->send_infinite_mapping ||
-	    mpcb->server_side || sock_flag(meta_sk, SOCK_DEAD))
-		return;
-
-	if (sk->sk_err != ETIMEDOUT)
-		return;
-
-	full_mesh_create_subflows(meta_sk);
-}
-
 /* Called upon release_sock, if the socket was owned by the user during
  * a path-management event.
  */
-static void full_mesh_release_sock(struct sock *meta_sk)
+void full_mesh_release_sock(struct sock *meta_sk)
 {
 	struct mptcp_loc_addr *mptcp_local;
 	struct mptcp_cb *mpcb = tcp_sk(meta_sk)->mpcb;
@@ -1445,8 +1295,8 @@ static void full_mesh_release_sock(struct sock *meta_sk)
 	rcu_read_unlock_bh();
 }
 
-static int full_mesh_get_local_id(sa_family_t family, union inet_addr *addr,
-				  struct net *net)
+int full_mesh_get_local_id(sa_family_t family, union inet_addr *addr,
+			   struct net *net)
 {
 	struct mptcp_loc_addr *mptcp_local;
 	const struct mptcp_fm_ns *fm_ns = fm_get_ns(net);
@@ -1472,9 +1322,9 @@ static int full_mesh_get_local_id(sa_family_t family, union inet_addr *addr,
 	return id;
 }
 
-static void full_mesh_addr_signal(struct sock *sk, unsigned *size,
-				  struct tcp_out_options *opts,
-				  struct sk_buff *skb)
+void full_mesh_addr_signal(struct sock *sk, unsigned *size,
+			   struct tcp_out_options *opts,
+			   struct sk_buff *skb)
 {
 	const struct tcp_sock *tp = tcp_sk(sk);
 	struct mptcp_cb *mpcb = tp->mpcb;
@@ -1602,77 +1452,16 @@ static void full_mesh_addr_signal(struct sock *sk, unsigned *size,
 	mpcb->addr_signal = !!(fmp->add_addr || fmp->remove_addrs);
 }
 
-static void full_mesh_rem_raddr(struct mptcp_cb *mpcb, u8 rem_id)
+void full_mesh_rem_raddr(struct mptcp_cb *mpcb, u8 rem_id)
 {
 	mptcp_v4_rem_raddress(mpcb, rem_id);
 	mptcp_v6_rem_raddress(mpcb, rem_id);
 }
 
-static void full_mesh_delete_subflow(struct sock *sk)
-{
-	struct fullmesh_priv *fmp = fullmesh_get_priv(tcp_sk(sk)->mpcb);
-	struct mptcp_fm_ns *fm_ns = fm_get_ns(sock_net(sk));
-	struct mptcp_loc_addr *mptcp_local;
-	int index, i;
-
-	if (!create_on_err)
-		return;
-
-	rcu_read_lock_bh();
-	mptcp_local = rcu_dereference_bh(fm_ns->local);
-
-	if (sk->sk_family == AF_INET || mptcp_v6_is_v4_mapped(sk)) {
-		union inet_addr saddr;
-
-		saddr.ip = inet_sk(sk)->inet_saddr;
-		index = mptcp_find_address(mptcp_local, AF_INET, &saddr,
-					   sk->sk_bound_dev_if);
-		if (index < 0)
-			goto out;
-
-		mptcp_for_each_bit_set(fmp->rem4_bits, i) {
-			struct fullmesh_rem4 *rem4 = &fmp->remaddr4[i];
-
-			if (rem4->addr.s_addr != sk->sk_daddr)
-				continue;
-
-			if (rem4->port && rem4->port != inet_sk(sk)->inet_dport)
-				continue;
-
-			rem4->bitfield &= ~(1 << index);
-		}
-#if IS_ENABLED(CONFIG_IPV6)
-	} else {
-		union inet_addr saddr;
-
-		saddr.in6 = inet6_sk(sk)->saddr;
-		index = mptcp_find_address(mptcp_local, AF_INET6, &saddr,
-					   sk->sk_bound_dev_if);
-		if (index < 0)
-			goto out;
-
-		mptcp_for_each_bit_set(fmp->rem6_bits, i) {
-			struct fullmesh_rem6 *rem6 = &fmp->remaddr6[i];
-
-			if (!ipv6_addr_equal(&rem6->addr, &sk->sk_v6_daddr))
-				continue;
-
-			if (rem6->port && rem6->port != inet_sk(sk)->inet_dport)
-				continue;
-
-			rem6->bitfield &= ~(1 << index);
-		}
-#endif
-	}
-
-out:
-	rcu_read_unlock_bh();
-}
-
 /* Output /proc/net/mptcp_fullmesh */
 static int mptcp_fm_seq_show(struct seq_file *seq, void *v)
 {
-	const struct net *net = seq->private;
+	struct net *net = seq->private;
 	struct mptcp_loc_addr *mptcp_local;
 	const struct mptcp_fm_ns *fm_ns = fm_get_ns(net);
 	int i;
@@ -1733,7 +1522,7 @@ static int mptcp_fm_init_net(struct net *net)
 	INIT_LIST_HEAD(&fm_ns->events);
 	spin_lock_init(&fm_ns->local_lock);
 	fm_ns->net = net;
-	net->mptcp.path_managers[MPTCP_PM_FULLMESH] = fm_ns;
+	net->mptcp.fm_ns = fm_ns;
 
 	return 0;
 err_seq_fops:
@@ -1776,28 +1565,11 @@ static struct pernet_operations full_mesh_net_ops = {
 	.exit = mptcp_fm_exit_net,
 };
 
-static struct mptcp_pm_ops full_mesh __read_mostly = {
-	.new_session = full_mesh_new_session,
-	.release_sock = full_mesh_release_sock,
-	.fully_established = full_mesh_create_subflows,
-	.new_remote_address = full_mesh_create_subflows,
-	.subflow_error = full_mesh_subflow_error,
-	.get_local_id = full_mesh_get_local_id,
-	.addr_signal = full_mesh_addr_signal,
-	.add_raddr = full_mesh_add_raddr,
-	.rem_raddr = full_mesh_rem_raddr,
-	.delete_subflow = full_mesh_delete_subflow,
-	.name = "fullmesh",
-	.owner = THIS_MODULE,
-};
-
 /* General initialization of MPTCP_PM */
-static int __init full_mesh_register(void)
+int __init full_mesh_register(void)
 {
 	int ret;
 
-	BUILD_BUG_ON(sizeof(struct fullmesh_priv) > MPTCP_PM_SIZE);
-
 	ret = register_pernet_subsys(&full_mesh_net_ops);
 	if (ret)
 		goto out;
@@ -1814,21 +1586,14 @@ static int __init full_mesh_register(void)
 	if (ret)
 		goto err_reg_inet6addr;
 #endif
-
-	ret = mptcp_register_path_manager(&full_mesh);
-	if (ret)
-		goto err_reg_pm;
-
 out:
 	return ret;
 
 
-err_reg_pm:
 #if IS_ENABLED(CONFIG_IPV6)
-	unregister_inet6addr_notifier(&inet6_addr_notifier);
 err_reg_inet6addr:
-#endif
 	unregister_netdevice_notifier(&mptcp_pm_netdev_notifier);
+#endif
 err_reg_netdev:
 	unregister_inetaddr_notifier(&mptcp_pm_inetaddr_notifier);
 err_reg_inetaddr:
@@ -1836,21 +1601,3 @@ static int __init full_mesh_register(void)
 	goto out;
 }
 
-static void full_mesh_unregister(void)
-{
-#if IS_ENABLED(CONFIG_IPV6)
-	unregister_inet6addr_notifier(&inet6_addr_notifier);
-#endif
-	unregister_netdevice_notifier(&mptcp_pm_netdev_notifier);
-	unregister_inetaddr_notifier(&mptcp_pm_inetaddr_notifier);
-	unregister_pernet_subsys(&full_mesh_net_ops);
-	mptcp_unregister_path_manager(&full_mesh);
-}
-
-module_init(full_mesh_register);
-module_exit(full_mesh_unregister);
-
-MODULE_AUTHOR("Christoph Paasch");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Full-Mesh MPTCP");
-MODULE_VERSION("0.88");
net/mptcp/mptcp_input.c +0 -9
index 88c7a64ef26c..88df2467e1b2 100644
@@ -44,15 +44,6 @@ static inline bool before64(const u64 seq1, const u64 seq2)
 /* is seq1 > seq2 ? */
 #define after64(seq1, seq2)	before64(seq2, seq1)
 
-static inline void mptcp_become_fully_estab(struct sock *sk)
-{
-	tcp_sk(sk)->mptcp->fully_established = 1;
-
-	if (is_master_tp(tcp_sk(sk)) &&
-	    tcp_sk(sk)->mpcb->pm_ops->fully_established)
-		tcp_sk(sk)->mpcb->pm_ops->fully_established(mptcp_meta_sk(sk));
-}
-
 /* Similar to tcp_tso_acked without any memory accounting */
 static inline int mptcp_tso_acked_reinject(const struct sock *meta_sk,
 					   struct sk_buff *skb)

net/mptcp/mptcp_input.c static int mptcp_prevalidate_skb(struct sock *sk, struct sk_buff *skb) · line 422

Quoted 4 lines
net/mptcp/mptcp_input.c +1 -0
@@ -428,6 +419,7 @@ static int mptcp_prevalidate_skb(struct sock *sk, struct sk_buff *skb)
 		/* We do a seamless fallback and should not send a inf.mapping. */
 		mpcb->send_infinite_mapping = 0;
 		tp->mptcp->fully_established = 1;
+		full_mesh_create_subflows(tp->meta_sk);

There is a bug here! I am going to send a v2.

Christoph

Quoted 348 lines
net/mptcp/mptcp_input.c +8 -9
 	}
 
 	/* Receiver-side becomes fully established when a whole rcv-window has
@@ -436,8 +428,10 @@ static int mptcp_prevalidate_skb(struct sock *sk, struct sk_buff *skb)
 	 */
 	if (!tp->mptcp->fully_established) {
 		tp->mptcp->init_rcv_wnd -= skb->len;
-		if (tp->mptcp->init_rcv_wnd < 0)
-			mptcp_become_fully_estab(sk);
+		if (tp->mptcp->init_rcv_wnd < 0) {
+			tp->mptcp->fully_established = 1;
+			full_mesh_create_subflows(tp->meta_sk);
+		}
 	}
 
 	return 0;
@@ -1247,7 +1241,7 @@ static void mptcp_data_ack(struct sock *sk, const struct sk_buff *skb)
 		/* As soon as a subflow-data-ack (not acking syn, thus snt_isn + 1)
 		 * includes a data-ack, we are fully established
 		 */
-		mptcp_become_fully_estab(sk);
+		tp->mptcp->fully_established = 1;
 
 	/* After we did the subflow-only processing (stopping timer and marking
 	 * subflow as established), check if we can proceed with MPTCP-level
@@ -1757,8 +1751,7 @@ static void mptcp_handle_add_addr(const unsigned char *ptr, struct sock *sk)
 		return;
 	}
 
-	if (mpcb->pm_ops->add_raddr)
-		mpcb->pm_ops->add_raddr(mpcb, &addr, family, port, mpadd->addr_id);
+	full_mesh_add_raddr(mpcb, &addr, family, port, mpadd->addr_id);
 
 	MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_ADDADDRRX);
 }
@@ -1773,8 +1766,7 @@ static void mptcp_handle_rem_addr(const unsigned char *ptr, struct sock *sk)
 	for (i = 0; i <= mprem->len - MPTCP_SUB_LEN_REMOVE_ADDR; i++) {
 		rem_id = (&mprem->addrs_id)[i];
 
-		if (mpcb->pm_ops->rem_raddr)
-			mpcb->pm_ops->rem_raddr(mpcb, rem_id);
+		full_mesh_rem_raddr(mpcb, rem_id);
 		mptcp_send_reset_rem_id(mpcb, rem_id);
 
 		MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_REMADDRSUB);
@@ -1877,8 +1869,7 @@ static inline void mptcp_path_array_check(struct sock *meta_sk)
 
 	if (unlikely(mpcb->list_rcvd)) {
 		mpcb->list_rcvd = 0;
-		if (mpcb->pm_ops->new_remote_address)
-			mpcb->pm_ops->new_remote_address(meta_sk);
+		full_mesh_create_subflows(meta_sk);
 	}
 }
 
net/mptcp/mptcp_ipv4.c +1 -1
index 94bc1416af77..8153b1d7e4bf 100644
@@ -105,7 +105,7 @@ static int mptcp_v4_join_init_req(struct request_sock *req, const struct sock *m
 						    tcp_hdr(skb)->source,
 						    tcp_hdr(skb)->dest);
 	addr.ip = inet_rsk(req)->ir_loc_addr;
-	loc_id = mpcb->pm_ops->get_local_id(AF_INET, &addr, sock_net(meta_sk));
+	loc_id = full_mesh_get_local_id(AF_INET, &addr, sock_net(meta_sk));
 	if (loc_id == -1)
 		return -1;
 	mtreq->loc_id = loc_id;
net/mptcp/mptcp_ipv6.c +1 -1
index 297dd872fbfb..19ce256a7679 100644
@@ -134,7 +134,7 @@ static int mptcp_v6_join_init_req(struct request_sock *req, const struct sock *m
 						    tcp_hdr(skb)->source,
 						    tcp_hdr(skb)->dest);
 	addr.in6 = inet_rsk(req)->ir_v6_loc_addr;
-	loc_id = mpcb->pm_ops->get_local_id(AF_INET6, &addr, sock_net(meta_sk));
+	loc_id = full_mesh_get_local_id(AF_INET6, &addr, sock_net(meta_sk));
 	if (loc_id == -1)
 		return -1;
 	mtreq->loc_id = loc_id;
net/mptcp/mptcp_output.c +4 -4
index 00a3674ad693..b3978a7e9254 100644
@@ -709,9 +709,9 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 		*size += MPTCP_SUB_LEN_JOIN_ACK_ALIGN;
 	}
 
-	if (unlikely(mpcb->addr_signal) && mpcb->pm_ops->addr_signal &&
+	if (unlikely(mpcb->addr_signal) &&
 	    mpcb->mptcp_ver >= MPTCP_VERSION_1 && skb && !mptcp_is_data_seq(skb)) {
-		mpcb->pm_ops->addr_signal(sk, size, opts, skb);
+		full_mesh_addr_signal(sk, size, opts, skb);
 
 		if (opts->add_addr_v6)
 			/* Skip subsequent options */
@@ -734,9 +734,9 @@ void mptcp_established_options(struct sock *sk, struct sk_buff *skb,
 		*size += MPTCP_SUB_LEN_DSS_ALIGN;
 	}
 
-	if (unlikely(mpcb->addr_signal) && mpcb->pm_ops->addr_signal &&
+	if (unlikely(mpcb->addr_signal) &&
 	    mpcb->mptcp_ver < MPTCP_VERSION_1)
-		mpcb->pm_ops->addr_signal(sk, size, opts, skb);
+		full_mesh_addr_signal(sk, size, opts, skb);
 
 	return;
 }
net/mptcp/mptcp_pm.c deleted +0 -226
deleted file mode 100644
index fbdf8eb58d17..000000000000
@@ -1,226 +0,0 @@
-/*
- *     MPTCP implementation - MPTCP-subflow-management
- *
- *     Initial Design & Implementation:
- *     Sébastien Barré <sebastien.barre(a)uclouvain.be>
- *
- *     Current Maintainer & Author:
- *     Christoph Paasch <christoph.paasch(a)uclouvain.be>
- *
- *     Additional authors:
- *     Jaakko Korkeaniemi <jaakko.korkeaniemi(a)aalto.fi>
- *     Gregory Detal <gregory.detal(a)uclouvain.be>
- *     Fabien Duchêne <fabien.duchene(a)uclouvain.be>
- *     Andreas Seelinger <Andreas.Seelinger(a)rwth-aachen.de>
- *     Lavkesh Lahngir <lavkesh51(a)gmail.com>
- *     Andreas Ripke <ripke(a)neclab.eu>
- *     Vlad Dogaru <vlad.dogaru(a)intel.com>
- *     Octavian Purdila <octavian.purdila(a)intel.com>
- *     John Ronan <jronan(a)tssg.org>
- *     Catalin Nicutar <catalin.nicutar(a)gmail.com>
- *     Brandon Heller <brandonh(a)stanford.edu>
- *
- *
- *     This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-
-
-#include <linux/module.h>
-#include <net/mptcp.h>
-
-static DEFINE_SPINLOCK(mptcp_pm_list_lock);
-static LIST_HEAD(mptcp_pm_list);
-
-static int mptcp_default_id(sa_family_t family, union inet_addr *addr,
-			    struct net *net)
-{
-	return 0;
-}
-
-struct mptcp_pm_ops mptcp_pm_default = {
-	.get_local_id = mptcp_default_id, /* We do not care */
-	.name = "default",
-	.owner = THIS_MODULE,
-};
-
-static struct mptcp_pm_ops *mptcp_pm_find(const char *name)
-{
-	struct mptcp_pm_ops *e;
-
-	list_for_each_entry_rcu(e, &mptcp_pm_list, list) {
-		if (strcmp(e->name, name) == 0)
-			return e;
-	}
-
-	return NULL;
-}
-
-int mptcp_register_path_manager(struct mptcp_pm_ops *pm)
-{
-	int ret = 0;
-
-	if (!pm->get_local_id)
-		return -EINVAL;
-
-	spin_lock(&mptcp_pm_list_lock);
-	if (mptcp_pm_find(pm->name)) {
-		pr_notice("%s already registered\n", pm->name);
-		ret = -EEXIST;
-	} else {
-		list_add_tail_rcu(&pm->list, &mptcp_pm_list);
-		pr_info("%s registered\n", pm->name);
-	}
-	spin_unlock(&mptcp_pm_list_lock);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(mptcp_register_path_manager);
-
-void mptcp_unregister_path_manager(struct mptcp_pm_ops *pm)
-{
-	spin_lock(&mptcp_pm_list_lock);
-	list_del_rcu(&pm->list);
-	spin_unlock(&mptcp_pm_list_lock);
-
-	/* Wait for outstanding readers to complete before the
-	 * module gets removed entirely.
-	 *
-	 * A try_module_get() should fail by now as our module is
-	 * in "going" state since no refs are held anymore and
-	 * module_exit() handler being called.
-	 */
-	synchronize_rcu();
-}
-EXPORT_SYMBOL_GPL(mptcp_unregister_path_manager);
-
-void mptcp_get_default_path_manager(char *name)
-{
-	struct mptcp_pm_ops *pm;
-
-	BUG_ON(list_empty(&mptcp_pm_list));
-
-	rcu_read_lock();
-	pm = list_entry(mptcp_pm_list.next, struct mptcp_pm_ops, list);
-	strncpy(name, pm->name, MPTCP_PM_NAME_MAX);
-	rcu_read_unlock();
-}
-
-int mptcp_set_default_path_manager(const char *name)
-{
-	struct mptcp_pm_ops *pm;
-	int ret = -ENOENT;
-
-	spin_lock(&mptcp_pm_list_lock);
-	pm = mptcp_pm_find(name);
-#ifdef CONFIG_MODULES
-	if (!pm && capable(CAP_NET_ADMIN)) {
-		spin_unlock(&mptcp_pm_list_lock);
-
-		request_module("mptcp_%s", name);
-		spin_lock(&mptcp_pm_list_lock);
-		pm = mptcp_pm_find(name);
-	}
-#endif
-
-	if (pm) {
-		list_move(&pm->list, &mptcp_pm_list);
-		ret = 0;
-	} else {
-		pr_info("%s is not available\n", name);
-	}
-	spin_unlock(&mptcp_pm_list_lock);
-
-	return ret;
-}
-
-static struct mptcp_pm_ops *__mptcp_pm_find_autoload(const char *name)
-{
-	struct mptcp_pm_ops *pm = mptcp_pm_find(name);
-#ifdef CONFIG_MODULES
-	if (!pm && capable(CAP_NET_ADMIN)) {
-		rcu_read_unlock();
-		request_module("mptcp_%s", name);
-		rcu_read_lock();
-		pm = mptcp_pm_find(name);
-	}
-#endif
-	return pm;
-}
-
-void mptcp_init_path_manager(struct mptcp_cb *mpcb)
-{
-	struct mptcp_pm_ops *pm;
-	struct sock *meta_sk = mpcb->meta_sk;
-	struct tcp_sock *meta_tp = tcp_sk(meta_sk);
-
-	rcu_read_lock();
-	/* if path manager was set using socket option */
-	if (meta_tp->mptcp_pm_setsockopt) {
-		pm = __mptcp_pm_find_autoload(meta_tp->mptcp_pm_name);
-		if (pm && try_module_get(pm->owner)) {
-			mpcb->pm_ops = pm;
-			goto out;
-		}
-	}
-
-	list_for_each_entry_rcu(pm, &mptcp_pm_list, list) {
-		if (try_module_get(pm->owner)) {
-			mpcb->pm_ops = pm;
-			break;
-		}
-	}
-out:
-	rcu_read_unlock();
-}
-
-/* Change path manager for socket */
-int mptcp_set_path_manager(struct sock *sk, const char *name)
-{
-	struct mptcp_pm_ops *pm;
-	int err = 0;
-
-	rcu_read_lock();
-	pm = __mptcp_pm_find_autoload(name);
-
-	if (!pm) {
-		err = -ENOENT;
-	} else if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) {
-		err = -EPERM;
-	} else {
-		strcpy(tcp_sk(sk)->mptcp_pm_name, name);
-		tcp_sk(sk)->mptcp_pm_setsockopt = 1;
-	}
-	rcu_read_unlock();
-
-	return err;
-}
-
-/* Manage refcounts on socket close. */
-void mptcp_cleanup_path_manager(struct mptcp_cb *mpcb)
-{
-	module_put(mpcb->pm_ops->owner);
-}
-
-/* Fallback to the default path-manager. */
-void mptcp_fallback_default(struct mptcp_cb *mpcb)
-{
-	struct mptcp_pm_ops *pm;
-
-	mptcp_cleanup_path_manager(mpcb);
-	pm = mptcp_pm_find("default");
-
-	/* Cannot fail - it's the default module */
-	try_module_get(pm->owner);
-	mpcb->pm_ops = pm;
-}
-EXPORT_SYMBOL_GPL(mptcp_fallback_default);
-
-/* Set default value from kernel configuration at bootup */
-static int __init mptcp_path_manager_default(void)
-{
-	return mptcp_set_default_path_manager(CONFIG_DEFAULT_MPTCP_PM);
-}
-late_initcall(mptcp_path_manager_default);
Signature · 6 lines
2.16.2

_______________________________________________
mptcp mailing list
mptcp(a)lists.01.org
https://lists.01.org/mailman/listinfo/mptcp
#16 lore raw
In reply to Christoph Paasch
Quoted 10 lines · Christoph Paasch

Series removing a lot of code out of mptcp-net-next.

Before:

$ git diff --shortstat  1464193107da..mptcp-net-next/master
54 files changed, 14663 insertions(+), 375 deletions(-)
$ git diff --shortstat  1464193107da..HEAD
50 files changed, 12286 insertions(+), 349 deletions(-)
Quoted 15 lines

Christoph Paasch (12):
mptcp: Remove support for DSS-checksums
mptcp: Remove some left-over cruft
mptcp: Remove RPS-recording for flow-steering in MPTCP
mptcp: Remove support for subflow-priorities (aka backup)
mptcp: Remove support for sendpage()
mptcp: Remove reinjection of data across subflows
mptcp: Remove support for TCP SYN-cookies
mptcp: Remove support for TCP Fast Open
mptcp: Remove MPTCP-code out of do_ip_setsockopt
mptcp: Remove scheduler-selection support
mptcp: Remove ndiffports path manager
mptcp: Make path-management no more a module nor selectable through
socketops

Hi Christoph -

I went through the patch series and don't have changes to suggest. Also built with CONFIG_MPTCP enabled and ran some simple tests (DSS checksums off), and CONFIG_MPTCP=n built fine too.

I'll take a look at v2 when that's ready.

--
Mat Martineau
Intel OTC