From dfb6aa205a2c2ea7dcefc805f3c09d0d3f6944dc Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Tue, 31 Mar 2020 19:29:29 +0200 Subject: [PATCH] Update MPTCP v0.94 patch --- .../generic/hack-4.14/690-mptcp_v0.94.patch | 932 ++++++++++-------- 1 file changed, 502 insertions(+), 430 deletions(-) diff --git a/root/target/linux/generic/hack-4.14/690-mptcp_v0.94.patch b/root/target/linux/generic/hack-4.14/690-mptcp_v0.94.patch index 32116748..1df18b04 100644 --- a/root/target/linux/generic/hack-4.14/690-mptcp_v0.94.patch +++ b/root/target/linux/generic/hack-4.14/690-mptcp_v0.94.patch @@ -1,6 +1,6 @@ -diff -aurN linux-4.14.127/Documentation/networking/ip-sysctl.txt mptcp-mptcp_v0.94/Documentation/networking/ip-sysctl.txt ---- linux-4.14.127/Documentation/networking/ip-sysctl.txt 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/Documentation/networking/ip-sysctl.txt 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/Documentation/networking/ip-sysctl.txt mptcp-mptcp_v0.94/Documentation/networking/ip-sysctl.txt +--- linux-4.14.174/Documentation/networking/ip-sysctl.txt 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/Documentation/networking/ip-sysctl.txt 2020-03-23 09:45:33.000000000 +0100 @@ -734,6 +734,18 @@ in RFC 5961 (Improving TCP's Robustness to Blind In-Window Attacks) Default: 100 @@ -20,10 +20,10 @@ diff -aurN linux-4.14.127/Documentation/networking/ip-sysctl.txt mptcp-mptcp_v0. UDP variables: udp_l3mdev_accept - BOOLEAN -diff -aurN linux-4.14.127/drivers/infiniband/hw/cxgb4/cm.c mptcp-mptcp_v0.94/drivers/infiniband/hw/cxgb4/cm.c ---- linux-4.14.127/drivers/infiniband/hw/cxgb4/cm.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/drivers/infiniband/hw/cxgb4/cm.c 2019-06-17 23:59:30.000000000 +0200 -@@ -3755,7 +3755,7 @@ +diff -aurN linux-4.14.174/drivers/infiniband/hw/cxgb4/cm.c mptcp-mptcp_v0.94/drivers/infiniband/hw/cxgb4/cm.c +--- linux-4.14.174/drivers/infiniband/hw/cxgb4/cm.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/drivers/infiniband/hw/cxgb4/cm.c 2020-03-23 09:45:33.000000000 +0100 +@@ -3757,7 +3757,7 @@ */ memset(&tmp_opt, 0, sizeof(tmp_opt)); tcp_clear_options(&tmp_opt); @@ -32,9 +32,9 @@ diff -aurN linux-4.14.127/drivers/infiniband/hw/cxgb4/cm.c mptcp-mptcp_v0.94/dri req = __skb_push(skb, sizeof(*req)); memset(req, 0, sizeof(*req)); -diff -aurN linux-4.14.127/include/linux/skbuff.h mptcp-mptcp_v0.94/include/linux/skbuff.h ---- linux-4.14.127/include/linux/skbuff.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/linux/skbuff.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/linux/skbuff.h mptcp-mptcp_v0.94/include/linux/skbuff.h +--- linux-4.14.174/include/linux/skbuff.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/linux/skbuff.h 2020-03-23 09:45:33.000000000 +0100 @@ -690,7 +690,7 @@ * want to keep them across layers you have to do a skb_clone() * first. This is owned by whoever has the skb queued ATM. @@ -44,9 +44,9 @@ diff -aurN linux-4.14.127/include/linux/skbuff.h mptcp-mptcp_v0.94/include/linux unsigned long _skb_refdst; void (*destructor)(struct sk_buff *skb); -diff -aurN linux-4.14.127/include/linux/tcp.h mptcp-mptcp_v0.94/include/linux/tcp.h ---- linux-4.14.127/include/linux/tcp.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/linux/tcp.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/linux/tcp.h mptcp-mptcp_v0.94/include/linux/tcp.h +--- linux-4.14.174/include/linux/tcp.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/linux/tcp.h 2020-03-23 09:45:33.000000000 +0100 @@ -58,7 +58,7 @@ /* TCP Fast Open */ #define TCP_FASTOPEN_COOKIE_MIN 4 /* Min Fast Open Cookie size in bytes */ @@ -203,9 +203,9 @@ diff -aurN linux-4.14.127/include/linux/tcp.h mptcp-mptcp_v0.94/include/linux/tc }; static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk) -diff -aurN linux-4.14.127/include/net/inet_common.h mptcp-mptcp_v0.94/include/net/inet_common.h ---- linux-4.14.127/include/net/inet_common.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/inet_common.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/inet_common.h mptcp-mptcp_v0.94/include/net/inet_common.h +--- linux-4.14.174/include/net/inet_common.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/inet_common.h 2020-03-23 09:45:33.000000000 +0100 @@ -2,6 +2,8 @@ #ifndef _INET_COMMON_H #define _INET_COMMON_H @@ -224,9 +224,9 @@ diff -aurN linux-4.14.127/include/net/inet_common.h mptcp-mptcp_v0.94/include/ne int inet_release(struct socket *sock); int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags); -diff -aurN linux-4.14.127/include/net/inet_connection_sock.h mptcp-mptcp_v0.94/include/net/inet_connection_sock.h ---- linux-4.14.127/include/net/inet_connection_sock.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/inet_connection_sock.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/inet_connection_sock.h mptcp-mptcp_v0.94/include/net/inet_connection_sock.h +--- linux-4.14.174/include/net/inet_connection_sock.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/inet_connection_sock.h 2020-03-23 09:45:33.000000000 +0100 @@ -30,6 +30,7 @@ struct inet_bind_bucket; @@ -235,9 +235,9 @@ diff -aurN linux-4.14.127/include/net/inet_connection_sock.h mptcp-mptcp_v0.94/i /* * Pointers to address related TCP functions -diff -aurN linux-4.14.127/include/net/inet_sock.h mptcp-mptcp_v0.94/include/net/inet_sock.h ---- linux-4.14.127/include/net/inet_sock.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/inet_sock.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/inet_sock.h mptcp-mptcp_v0.94/include/net/inet_sock.h +--- linux-4.14.174/include/net/inet_sock.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/inet_sock.h 2020-03-23 09:45:33.000000000 +0100 @@ -90,7 +90,9 @@ wscale_ok : 1, ecn_ok : 1, @@ -249,10 +249,10 @@ diff -aurN linux-4.14.127/include/net/inet_sock.h mptcp-mptcp_v0.94/include/net/ u32 ir_mark; union { struct ip_options_rcu __rcu *ireq_opt; -diff -aurN linux-4.14.127/include/net/mptcp.h mptcp-mptcp_v0.94/include/net/mptcp.h ---- linux-4.14.127/include/net/mptcp.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/include/net/mptcp.h 2019-06-17 23:59:30.000000000 +0200 -@@ -0,0 +1,1522 @@ +diff -aurN linux-4.14.174/include/net/mptcp.h mptcp-mptcp_v0.94/include/net/mptcp.h +--- linux-4.14.174/include/net/mptcp.h 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/mptcp.h 2020-03-23 09:45:33.000000000 +0100 +@@ -0,0 +1,1529 @@ +/* + * MPTCP implementation + * @@ -532,7 +532,8 @@ diff -aurN linux-4.14.127/include/net/mptcp.h mptcp-mptcp_v0.94/include/net/mptc + dfin_combined:1, /* Was the DFIN combined with subflow-fin? */ + passive_close:1, + snd_hiseq_index:1, /* Index in snd_high_order of snd_nxt */ -+ rcv_hiseq_index:1; /* Index in rcv_high_order of rcv_nxt */ ++ rcv_hiseq_index:1, /* Index in rcv_high_order of rcv_nxt */ ++ tcp_ca_explicit_set:1; /* was meta CC set by app? */ + + /* socket count in this connection */ + u8 cnt_subflows; @@ -1715,6 +1716,8 @@ diff -aurN linux-4.14.127/include/net/mptcp.h mptcp-mptcp_v0.94/include/net/mptc +} +static inline void mptcp_push_pending_frames(struct sock *meta_sk) {} +static inline void mptcp_send_reset(const struct sock *sk) {} ++static inline void mptcp_sub_force_close_all(struct mptcp_cb *mpcb, ++ struct sock *except) {} +static inline bool mptcp_handle_options(struct sock *sk, + const struct tcphdr *th, + struct sk_buff *skb) @@ -1767,6 +1770,10 @@ diff -aurN linux-4.14.127/include/net/mptcp.h mptcp-mptcp_v0.94/include/net/mptc + struct sk_buff *skb) {} +static inline void mptcp_mpcb_put(struct mptcp_cb *mpcb) {} +static inline void mptcp_fin(struct sock *meta_sk) {} ++static inline bool mptcp_in_infinite_mapping_weak(const struct mptcp_cb *mpcb) ++{ ++ return false; ++} +static inline bool mptcp_can_new_subflow(const struct sock *meta_sk) +{ + return false; @@ -1775,9 +1782,9 @@ diff -aurN linux-4.14.127/include/net/mptcp.h mptcp-mptcp_v0.94/include/net/mptc +#endif /* CONFIG_MPTCP */ + +#endif /* _MPTCP_H */ -diff -aurN linux-4.14.127/include/net/mptcp_v4.h mptcp-mptcp_v0.94/include/net/mptcp_v4.h ---- linux-4.14.127/include/net/mptcp_v4.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/include/net/mptcp_v4.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/mptcp_v4.h mptcp-mptcp_v0.94/include/net/mptcp_v4.h +--- linux-4.14.174/include/net/mptcp_v4.h 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/mptcp_v4.h 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,68 @@ +/* + * MPTCP implementation @@ -1847,9 +1854,9 @@ diff -aurN linux-4.14.127/include/net/mptcp_v4.h mptcp-mptcp_v0.94/include/net/m +#endif /* CONFIG_MPTCP */ + +#endif /* MPTCP_V4_H_ */ -diff -aurN linux-4.14.127/include/net/mptcp_v6.h mptcp-mptcp_v0.94/include/net/mptcp_v6.h ---- linux-4.14.127/include/net/mptcp_v6.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/include/net/mptcp_v6.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/mptcp_v6.h mptcp-mptcp_v0.94/include/net/mptcp_v6.h +--- linux-4.14.174/include/net/mptcp_v6.h 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/mptcp_v6.h 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,69 @@ +/* + * MPTCP implementation @@ -1920,9 +1927,9 @@ diff -aurN linux-4.14.127/include/net/mptcp_v6.h mptcp-mptcp_v0.94/include/net/m +#endif /* CONFIG_MPTCP */ + +#endif /* _MPTCP_V6_H */ -diff -aurN linux-4.14.127/include/net/net_namespace.h mptcp-mptcp_v0.94/include/net/net_namespace.h ---- linux-4.14.127/include/net/net_namespace.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/net_namespace.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/net_namespace.h mptcp-mptcp_v0.94/include/net/net_namespace.h +--- linux-4.14.174/include/net/net_namespace.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/net_namespace.h 2020-03-23 09:45:33.000000000 +0100 @@ -18,6 +18,7 @@ #include #include @@ -1941,9 +1948,9 @@ diff -aurN linux-4.14.127/include/net/net_namespace.h mptcp-mptcp_v0.94/include/ #if IS_ENABLED(CONFIG_IEEE802154_6LOWPAN) struct netns_ieee802154_lowpan ieee802154_lowpan; #endif -diff -aurN linux-4.14.127/include/net/netns/mptcp.h mptcp-mptcp_v0.94/include/net/netns/mptcp.h ---- linux-4.14.127/include/net/netns/mptcp.h 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/include/net/netns/mptcp.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/netns/mptcp.h mptcp-mptcp_v0.94/include/net/netns/mptcp.h +--- linux-4.14.174/include/net/netns/mptcp.h 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/netns/mptcp.h 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,52 @@ +/* + * MPTCP implementation - MPTCP namespace @@ -1997,9 +2004,9 @@ diff -aurN linux-4.14.127/include/net/netns/mptcp.h mptcp-mptcp_v0.94/include/ne +}; + +#endif /* __NETNS_MPTCP_H__ */ -diff -aurN linux-4.14.127/include/net/snmp.h mptcp-mptcp_v0.94/include/net/snmp.h ---- linux-4.14.127/include/net/snmp.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/snmp.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/snmp.h mptcp-mptcp_v0.94/include/net/snmp.h +--- linux-4.14.174/include/net/snmp.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/snmp.h 2020-03-23 09:45:33.000000000 +0100 @@ -91,7 +91,6 @@ atomic_long_t mibs[ICMP6MSG_MIB_MAX]; }; @@ -2008,10 +2015,10 @@ diff -aurN linux-4.14.127/include/net/snmp.h mptcp-mptcp_v0.94/include/net/snmp. /* TCP */ #define TCP_MIB_MAX __TCP_MIB_MAX struct tcp_mib { -diff -aurN linux-4.14.127/include/net/sock.h mptcp-mptcp_v0.94/include/net/sock.h ---- linux-4.14.127/include/net/sock.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/sock.h 2019-06-17 23:59:30.000000000 +0200 -@@ -781,6 +781,7 @@ +diff -aurN linux-4.14.174/include/net/sock.h mptcp-mptcp_v0.94/include/net/sock.h +--- linux-4.14.174/include/net/sock.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/sock.h 2020-03-23 09:45:33.000000000 +0100 +@@ -786,6 +786,7 @@ SOCK_FILTER_LOCKED, /* Filter cannot be changed anymore */ SOCK_SELECT_ERR_QUEUE, /* Wake select on error queue */ SOCK_RCU_FREE, /* wait rcu grace period in sk_destruct() */ @@ -2019,7 +2026,7 @@ diff -aurN linux-4.14.127/include/net/sock.h mptcp-mptcp_v0.94/include/net/sock. }; #define SK_FLAGS_TIMESTAMP ((1UL << SOCK_TIMESTAMP) | (1UL << SOCK_TIMESTAMPING_RX_SOFTWARE)) -@@ -1081,6 +1082,7 @@ +@@ -1086,6 +1087,7 @@ void (*unhash)(struct sock *sk); void (*rehash)(struct sock *sk); int (*get_port)(struct sock *sk, unsigned short snum); @@ -2027,7 +2034,7 @@ diff -aurN linux-4.14.127/include/net/sock.h mptcp-mptcp_v0.94/include/net/sock. /* Keeping track of sockets in use */ #ifdef CONFIG_PROC_FS -@@ -1505,9 +1507,6 @@ +@@ -1510,9 +1512,6 @@ static inline void sock_owned_by_me(const struct sock *sk) { @@ -2037,9 +2044,9 @@ diff -aurN linux-4.14.127/include/net/sock.h mptcp-mptcp_v0.94/include/net/sock. } static inline bool sock_owned_by_user(const struct sock *sk) -diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h ---- linux-4.14.127/include/net/tcp.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/tcp.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h +--- linux-4.14.174/include/net/tcp.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/tcp.h 2020-03-23 09:45:33.000000000 +0100 @@ -187,6 +187,7 @@ #define TCPOPT_SACK 5 /* SACK Block */ #define TCPOPT_TIMESTAMP 8 /* Better RTT estimations/PAWS */ @@ -2195,7 +2202,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h void tcp_req_err(struct sock *sk, u32 seq, bool abort); int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb); struct sock *tcp_create_openreq_child(const struct sock *sk, -@@ -525,7 +643,8 @@ +@@ -533,7 +651,8 @@ u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th, u16 *mssp); @@ -2205,7 +2212,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h u64 cookie_init_timestamp(struct request_sock *req); bool cookie_timestamp_decode(const struct net *net, struct tcp_options_received *opt); -@@ -539,7 +658,8 @@ +@@ -547,7 +666,8 @@ u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph, const struct tcphdr *th, u16 *mssp); @@ -2215,7 +2222,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h #endif /* tcp_output.c */ -@@ -571,10 +691,17 @@ +@@ -579,10 +699,17 @@ void tcp_skb_collapse_tstamp(struct sk_buff *skb, const struct sk_buff *next_skb); @@ -2233,7 +2240,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h void tcp_skb_mark_lost_uncond_verify(struct tcp_sock *tp, struct sk_buff *skb); void tcp_fin(struct sock *sk); -@@ -613,7 +740,7 @@ +@@ -621,7 +748,7 @@ } /* tcp.c */ @@ -2242,7 +2249,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h /* Read 'sendfile()'-style from a TCP socket */ int tcp_read_sock(struct sock *sk, read_descriptor_t *desc, -@@ -807,6 +934,12 @@ +@@ -815,6 +942,12 @@ */ ktime_t swtstamp; }; @@ -2255,7 +2262,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h __u8 tcp_flags; /* TCP header flags. (tcp[13]) */ __u8 sacked; /* State flags for SACK/FACK. */ -@@ -825,6 +958,14 @@ +@@ -833,6 +966,14 @@ has_rxtstamp:1, /* SKB has a RX timestamp */ unused:5; __u32 ack_seq; /* Sequence number ACK'd */ @@ -2270,7 +2277,16 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h union { struct { /* There is space for up to 24 bytes */ -@@ -1326,7 +1467,8 @@ +@@ -1053,6 +1194,8 @@ + int tcp_set_allowed_congestion_control(char *allowed); + int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, + bool reinit, bool cap_net_admin); ++int __tcp_set_congestion_control(struct sock *sk, const char *name, bool load, ++ bool reinit, bool cap_net_admin); + u32 tcp_slow_start(struct tcp_sock *tp, u32 acked); + void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w, u32 acked); + +@@ -1335,7 +1478,8 @@ /* Determine a window scaling and initial window to offer. */ void tcp_select_initial_window(int __space, __u32 mss, __u32 *rcv_wnd, __u32 *window_clamp, int wscale_ok, @@ -2280,7 +2296,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h static inline int tcp_win_from_space(int space) { -@@ -1337,6 +1479,19 @@ +@@ -1346,6 +1490,19 @@ space - (space>>tcp_adv_win_scale); } @@ -2300,7 +2316,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h /* Note: caller must be prepared to deal with negative returns */ static inline int tcp_space(const struct sock *sk) { -@@ -1613,19 +1768,7 @@ +@@ -1622,19 +1779,7 @@ } /* write queue abstraction */ @@ -2321,7 +2337,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h static inline struct sk_buff *tcp_write_queue_head(const struct sock *sk) { -@@ -1888,6 +2031,30 @@ +@@ -1918,6 +2063,32 @@ #endif }; @@ -2346,13 +2362,15 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h + void (*time_wait)(struct sock *sk, int state, int timeo); + void (*cleanup_rbuf)(struct sock *sk, int copied); + void (*cwnd_validate)(struct sock *sk, bool is_cwnd_limited); ++ int (*set_cong_ctrl)(struct sock *sk, const char *name, bool load, ++ bool reinit, bool cap_net_admin); +}; +extern const struct tcp_sock_ops tcp_specific; + struct tcp_request_sock_ops { u16 mss_clamp; #ifdef CONFIG_TCP_MD5SIG -@@ -1898,12 +2065,13 @@ +@@ -1928,12 +2099,13 @@ const struct sock *sk, const struct sk_buff *skb); #endif @@ -2371,7 +2389,7 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h #endif struct dst_entry *(*route_req)(const struct sock *sk, struct flowi *fl, const struct request_sock *req); -@@ -1917,15 +2085,17 @@ +@@ -1947,15 +2119,17 @@ #ifdef CONFIG_SYN_COOKIES static inline __u32 cookie_init_sequence(const struct tcp_request_sock_ops *ops, @@ -2390,9 +2408,9 @@ diff -aurN linux-4.14.127/include/net/tcp.h mptcp-mptcp_v0.94/include/net/tcp.h const struct sock *sk, struct sk_buff *skb, __u16 *mss) { -diff -aurN linux-4.14.127/include/net/tcp_states.h mptcp-mptcp_v0.94/include/net/tcp_states.h ---- linux-4.14.127/include/net/tcp_states.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/tcp_states.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/tcp_states.h mptcp-mptcp_v0.94/include/net/tcp_states.h +--- linux-4.14.174/include/net/tcp_states.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/tcp_states.h 2020-03-23 09:45:33.000000000 +0100 @@ -26,6 +26,7 @@ TCP_LISTEN, TCP_CLOSING, /* Now a valid state */ @@ -2409,9 +2427,9 @@ diff -aurN linux-4.14.127/include/net/tcp_states.h mptcp-mptcp_v0.94/include/net }; #endif /* _LINUX_TCP_STATES_H */ -diff -aurN linux-4.14.127/include/net/transp_v6.h mptcp-mptcp_v0.94/include/net/transp_v6.h ---- linux-4.14.127/include/net/transp_v6.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/net/transp_v6.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/net/transp_v6.h mptcp-mptcp_v0.94/include/net/transp_v6.h +--- linux-4.14.174/include/net/transp_v6.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/net/transp_v6.h 2020-03-23 09:45:33.000000000 +0100 @@ -59,6 +59,8 @@ /* address family specific functions */ @@ -2421,9 +2439,9 @@ diff -aurN linux-4.14.127/include/net/transp_v6.h mptcp-mptcp_v0.94/include/net/ void inet6_destroy_sock(struct sock *sk); -diff -aurN linux-4.14.127/include/uapi/linux/if.h mptcp-mptcp_v0.94/include/uapi/linux/if.h ---- linux-4.14.127/include/uapi/linux/if.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/uapi/linux/if.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/uapi/linux/if.h mptcp-mptcp_v0.94/include/uapi/linux/if.h +--- linux-4.14.174/include/uapi/linux/if.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/uapi/linux/if.h 2020-03-23 09:45:33.000000000 +0100 @@ -132,6 +132,9 @@ #define IFF_ECHO IFF_ECHO #endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO */ @@ -2434,9 +2452,9 @@ diff -aurN linux-4.14.127/include/uapi/linux/if.h mptcp-mptcp_v0.94/include/uapi #define IFF_VOLATILE (IFF_LOOPBACK|IFF_POINTOPOINT|IFF_BROADCAST|IFF_ECHO|\ IFF_MASTER|IFF_SLAVE|IFF_RUNNING|IFF_LOWER_UP|IFF_DORMANT) -diff -aurN linux-4.14.127/include/uapi/linux/tcp.h mptcp-mptcp_v0.94/include/uapi/linux/tcp.h ---- linux-4.14.127/include/uapi/linux/tcp.h 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/include/uapi/linux/tcp.h 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/include/uapi/linux/tcp.h mptcp-mptcp_v0.94/include/uapi/linux/tcp.h +--- linux-4.14.174/include/uapi/linux/tcp.h 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/include/uapi/linux/tcp.h 2020-03-23 09:45:33.000000000 +0100 @@ -18,9 +18,15 @@ #ifndef _UAPI_LINUX_TCP_H #define _UAPI_LINUX_TCP_H @@ -2521,9 +2539,9 @@ diff -aurN linux-4.14.127/include/uapi/linux/tcp.h mptcp-mptcp_v0.94/include/uap /* for TCP_MD5SIG socket option */ #define TCP_MD5SIG_MAXKEYLEN 80 -diff -aurN linux-4.14.127/kernel/rcu/Kconfig.debug mptcp-mptcp_v0.94/kernel/rcu/Kconfig.debug ---- linux-4.14.127/kernel/rcu/Kconfig.debug 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/kernel/rcu/Kconfig.debug 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/kernel/rcu/Kconfig.debug mptcp-mptcp_v0.94/kernel/rcu/Kconfig.debug +--- linux-4.14.174/kernel/rcu/Kconfig.debug 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/kernel/rcu/Kconfig.debug 2020-03-23 09:45:33.000000000 +0100 @@ -4,9 +4,6 @@ menu "RCU Debugging" @@ -2534,9 +2552,9 @@ diff -aurN linux-4.14.127/kernel/rcu/Kconfig.debug mptcp-mptcp_v0.94/kernel/rcu/ config TORTURE_TEST tristate default n -diff -aurN linux-4.14.127/net/core/dev.c mptcp-mptcp_v0.94/net/core/dev.c ---- linux-4.14.127/net/core/dev.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/core/dev.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/core/dev.c mptcp-mptcp_v0.94/net/core/dev.c +--- linux-4.14.174/net/core/dev.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/core/dev.c 2020-03-23 09:45:33.000000000 +0100 @@ -6769,7 +6769,7 @@ dev->flags = (flags & (IFF_DEBUG | IFF_NOTRAILERS | IFF_NOARP | @@ -2546,9 +2564,9 @@ diff -aurN linux-4.14.127/net/core/dev.c mptcp-mptcp_v0.94/net/core/dev.c (dev->flags & (IFF_UP | IFF_VOLATILE | IFF_PROMISC | IFF_ALLMULTI)); -diff -aurN linux-4.14.127/net/core/skbuff.c mptcp-mptcp_v0.94/net/core/skbuff.c ---- linux-4.14.127/net/core/skbuff.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/core/skbuff.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/core/skbuff.c mptcp-mptcp_v0.94/net/core/skbuff.c +--- linux-4.14.174/net/core/skbuff.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/core/skbuff.c 2020-03-23 09:45:33.000000000 +0100 @@ -536,7 +536,7 @@ skb_drop_list(&skb_shinfo(skb)->frag_list); } @@ -2567,9 +2585,9 @@ diff -aurN linux-4.14.127/net/core/skbuff.c mptcp-mptcp_v0.94/net/core/skbuff.c { __copy_skb_header(new, old); -diff -aurN linux-4.14.127/net/core/sock.c mptcp-mptcp_v0.94/net/core/sock.c ---- linux-4.14.127/net/core/sock.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/core/sock.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/core/sock.c mptcp-mptcp_v0.94/net/core/sock.c +--- linux-4.14.174/net/core/sock.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/core/sock.c 2020-03-23 09:45:33.000000000 +0100 @@ -139,6 +139,11 @@ #include @@ -2582,7 +2600,7 @@ diff -aurN linux-4.14.127/net/core/sock.c mptcp-mptcp_v0.94/net/core/sock.c #include #include -@@ -1416,6 +1421,23 @@ +@@ -1413,6 +1418,23 @@ */ static inline void sock_lock_init(struct sock *sk) { @@ -2606,7 +2624,7 @@ diff -aurN linux-4.14.127/net/core/sock.c mptcp-mptcp_v0.94/net/core/sock.c if (sk->sk_kern_sock) sock_lock_init_class_and_name( sk, -@@ -1464,8 +1486,12 @@ +@@ -1461,8 +1483,12 @@ sk = kmem_cache_alloc(slab, priority & ~__GFP_ZERO); if (!sk) return sk; @@ -2621,17 +2639,17 @@ diff -aurN linux-4.14.127/net/core/sock.c mptcp-mptcp_v0.94/net/core/sock.c } else sk = kmalloc(prot->obj_size, priority); -@@ -1682,6 +1708,7 @@ +@@ -1684,6 +1710,7 @@ atomic_set(&newsk->sk_zckey, 0); sock_reset_flag(newsk, SOCK_DONE); + sock_reset_flag(newsk, SOCK_MPTCP); - mem_cgroup_sk_alloc(newsk); - cgroup_sk_alloc(&newsk->sk_cgrp_data); -diff -aurN linux-4.14.127/net/ipv4/af_inet.c mptcp-mptcp_v0.94/net/ipv4/af_inet.c ---- linux-4.14.127/net/ipv4/af_inet.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/af_inet.c 2019-06-17 23:59:30.000000000 +0200 + /* sk->sk_memcg will be populated at accept() time */ + newsk->sk_memcg = NULL; +diff -aurN linux-4.14.174/net/ipv4/af_inet.c mptcp-mptcp_v0.94/net/ipv4/af_inet.c +--- linux-4.14.174/net/ipv4/af_inet.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/af_inet.c 2020-03-23 09:45:33.000000000 +0100 @@ -104,6 +104,7 @@ #include #include @@ -2694,9 +2712,9 @@ diff -aurN linux-4.14.127/net/ipv4/af_inet.c mptcp-mptcp_v0.94/net/ipv4/af_inet. /* Setup TCP slab cache for open requests. */ tcp_init(); -diff -aurN linux-4.14.127/net/ipv4/inet_connection_sock.c mptcp-mptcp_v0.94/net/ipv4/inet_connection_sock.c ---- linux-4.14.127/net/ipv4/inet_connection_sock.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/inet_connection_sock.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/inet_connection_sock.c mptcp-mptcp_v0.94/net/ipv4/inet_connection_sock.c +--- linux-4.14.174/net/ipv4/inet_connection_sock.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/inet_connection_sock.c 2020-03-23 09:45:33.000000000 +0100 @@ -23,6 +23,7 @@ #include #include @@ -2705,7 +2723,7 @@ diff -aurN linux-4.14.127/net/ipv4/inet_connection_sock.c mptcp-mptcp_v0.94/net/ #include #include #include -@@ -689,7 +690,10 @@ +@@ -709,7 +710,10 @@ int max_retries, thresh; u8 defer_accept; @@ -2717,7 +2735,7 @@ diff -aurN linux-4.14.127/net/ipv4/inet_connection_sock.c mptcp-mptcp_v0.94/net/ goto drop; max_retries = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_synack_retries; -@@ -783,7 +787,9 @@ +@@ -803,7 +807,9 @@ const struct request_sock *req, const gfp_t priority) { @@ -2728,7 +2746,7 @@ diff -aurN linux-4.14.127/net/ipv4/inet_connection_sock.c mptcp-mptcp_v0.94/net/ if (newsk) { struct inet_connection_sock *newicsk = inet_csk(newsk); -@@ -983,7 +989,14 @@ +@@ -1003,7 +1009,14 @@ */ while ((req = reqsk_queue_remove(queue, sk)) != NULL) { struct sock *child = req->sk; @@ -2743,7 +2761,7 @@ diff -aurN linux-4.14.127/net/ipv4/inet_connection_sock.c mptcp-mptcp_v0.94/net/ local_bh_disable(); bh_lock_sock(child); WARN_ON(sock_owned_by_user(child)); -@@ -993,6 +1006,10 @@ +@@ -1013,6 +1026,10 @@ reqsk_put(req); bh_unlock_sock(child); local_bh_enable(); @@ -2754,9 +2772,9 @@ diff -aurN linux-4.14.127/net/ipv4/inet_connection_sock.c mptcp-mptcp_v0.94/net/ sock_put(child); cond_resched(); -diff -aurN linux-4.14.127/net/ipv4/ip_sockglue.c mptcp-mptcp_v0.94/net/ipv4/ip_sockglue.c ---- linux-4.14.127/net/ipv4/ip_sockglue.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/ip_sockglue.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/ip_sockglue.c mptcp-mptcp_v0.94/net/ipv4/ip_sockglue.c +--- linux-4.14.174/net/ipv4/ip_sockglue.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/ip_sockglue.c 2020-03-23 09:45:33.000000000 +0100 @@ -44,6 +44,8 @@ #endif #include @@ -2793,9 +2811,9 @@ diff -aurN linux-4.14.127/net/ipv4/ip_sockglue.c mptcp-mptcp_v0.94/net/ipv4/ip_s } break; case IP_TTL: -diff -aurN linux-4.14.127/net/ipv4/Kconfig mptcp-mptcp_v0.94/net/ipv4/Kconfig ---- linux-4.14.127/net/ipv4/Kconfig 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/Kconfig 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/Kconfig mptcp-mptcp_v0.94/net/ipv4/Kconfig +--- linux-4.14.174/net/ipv4/Kconfig 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/Kconfig 2020-03-23 09:45:33.000000000 +0100 @@ -675,6 +675,38 @@ bufferbloat, policers, or AQM schemes that do not provide a delay signal. It requires the fq ("Fair Queue") pacing packet scheduler. @@ -2865,9 +2883,9 @@ diff -aurN linux-4.14.127/net/ipv4/Kconfig mptcp-mptcp_v0.94/net/ipv4/Kconfig default "reno" if DEFAULT_RENO default "dctcp" if DEFAULT_DCTCP default "cdg" if DEFAULT_CDG -diff -aurN linux-4.14.127/net/ipv4/syncookies.c mptcp-mptcp_v0.94/net/ipv4/syncookies.c ---- linux-4.14.127/net/ipv4/syncookies.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/syncookies.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/syncookies.c mptcp-mptcp_v0.94/net/ipv4/syncookies.c +--- linux-4.14.174/net/ipv4/syncookies.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/syncookies.c 2020-03-23 09:45:33.000000000 +0100 @@ -16,6 +16,8 @@ #include #include @@ -2980,9 +2998,9 @@ diff -aurN linux-4.14.127/net/ipv4/syncookies.c mptcp-mptcp_v0.94/net/ipv4/synco ireq->rcv_wscale = rcv_wscale; ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), &rt->dst); -diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c ---- linux-4.14.127/net/ipv4/tcp.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c +--- linux-4.14.174/net/ipv4/tcp.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp.c 2020-03-23 09:45:33.000000000 +0100 @@ -273,6 +273,7 @@ #include @@ -2991,7 +3009,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c #include #include #include -@@ -402,6 +403,24 @@ +@@ -402,6 +403,25 @@ return rate64; } @@ -3011,12 +3029,13 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c + .time_wait = tcp_time_wait, + .cleanup_rbuf = tcp_cleanup_rbuf, + .cwnd_validate = tcp_cwnd_validate, ++ .set_cong_ctrl = __tcp_set_congestion_control, +}; + /* Address-family independent initialization for a tcp_sock. * * NOTE: A lot of things set to zero explicitly by call to -@@ -452,6 +471,11 @@ +@@ -452,6 +472,11 @@ sk->sk_sndbuf = sysctl_tcp_wmem[1]; sk->sk_rcvbuf = sysctl_tcp_rmem[1]; @@ -3028,7 +3047,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c sk_sockets_allocated_inc(sk); } EXPORT_SYMBOL(tcp_init_sock); -@@ -766,6 +790,7 @@ +@@ -766,6 +791,7 @@ int ret; sock_rps_record_flow(sk); @@ -3036,7 +3055,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c /* * We can't seek on a socket input */ -@@ -776,6 +801,14 @@ +@@ -776,6 +802,14 @@ lock_sock(sk); @@ -3051,7 +3070,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c timeo = sock_rcvtimeo(sk, sock->file->f_flags & O_NONBLOCK); while (tss.len) { ret = __tcp_splice_read(sk, &tss); -@@ -879,8 +912,7 @@ +@@ -879,8 +913,7 @@ return NULL; } @@ -3061,7 +3080,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c { struct tcp_sock *tp = tcp_sk(sk); u32 new_size_goal, size_goal; -@@ -908,8 +940,13 @@ +@@ -908,8 +941,13 @@ { int mss_now; @@ -3077,7 +3096,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c return mss_now; } -@@ -928,12 +965,33 @@ +@@ -944,12 +982,33 @@ * is fully established. */ if (((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) && @@ -3112,7 +3131,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk); mss_now = tcp_send_mss(sk, &size_goal, flags); -@@ -1050,8 +1108,9 @@ +@@ -1067,8 +1126,9 @@ int tcp_sendpage_locked(struct sock *sk, struct page *page, int offset, size_t size, int flags) { @@ -3124,7 +3143,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c return sock_no_sendpage_locked(sk, page, offset, size, flags); tcp_rate_check_app_limited(sk); /* is sending application-limited? */ -@@ -1083,14 +1142,14 @@ +@@ -1100,14 +1160,14 @@ * This also speeds up tso_fragment(), since it wont fallback * to tcp_fragment(). */ @@ -3141,7 +3160,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c { const struct tcp_sock *tp = tcp_sk(sk); int tmp = tp->mss_cache; -@@ -1212,12 +1271,19 @@ +@@ -1229,12 +1289,19 @@ * is fully established. */ if (((1 << sk->sk_state) & ~(TCPF_ESTABLISHED | TCPF_CLOSE_WAIT)) && @@ -3162,7 +3181,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c if (unlikely(tp->repair)) { if (tp->repair_queue == TCP_RECV_QUEUE) { copied = tcp_send_rcvq(sk, msg, size); -@@ -1253,7 +1319,10 @@ +@@ -1270,7 +1337,10 @@ if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN)) goto do_error; @@ -3174,7 +3193,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c while (msg_data_left(msg)) { int copy = 0; -@@ -1282,7 +1351,7 @@ +@@ -1299,7 +1369,7 @@ } first_skb = skb_queue_empty(&sk->sk_write_queue); skb = sk_stream_alloc_skb(sk, @@ -3183,7 +3202,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c sk->sk_allocation, first_skb); if (!skb) -@@ -1291,8 +1360,15 @@ +@@ -1308,8 +1378,15 @@ process_backlog = true; /* * Check whether we can use HW checksum. @@ -3200,7 +3219,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c skb->ip_summed = CHECKSUM_PARTIAL; skb_entail(sk, skb); -@@ -1523,7 +1599,7 @@ +@@ -1534,7 +1611,7 @@ * calculation of whether or not we must ACK for the sake of * a window update. */ @@ -3209,7 +3228,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c { struct tcp_sock *tp = tcp_sk(sk); bool time_to_ack = false; -@@ -1566,7 +1642,7 @@ +@@ -1577,7 +1654,7 @@ /* Optimize, __tcp_select_window() is not cheap. */ if (2*rcv_window_now <= tp->window_clamp) { @@ -3218,7 +3237,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c /* Send ACK now, if this read freed lots of space * in our buffer. Certainly, new_window is new window. -@@ -1682,7 +1758,7 @@ +@@ -1693,7 +1770,7 @@ /* Clean up data we have read: This will do ACK frames. */ if (copied > 0) { tcp_recv_skb(sk, seq, &offset); @@ -3227,7 +3246,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c } return copied; } -@@ -1782,6 +1858,14 @@ +@@ -1793,6 +1870,14 @@ lock_sock(sk); @@ -3242,7 +3261,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c err = -ENOTCONN; if (sk->sk_state == TCP_LISTEN) goto out; -@@ -1902,7 +1986,7 @@ +@@ -1913,7 +1998,7 @@ } } @@ -3251,7 +3270,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c if (copied >= target) { /* Do not sleep, just process backlog. */ -@@ -1995,7 +2079,7 @@ +@@ -2006,7 +2091,7 @@ tcp_recv_timestamp(msg, sk, &tss); /* Clean up data we have read: This will do ACK frames. */ @@ -3260,7 +3279,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c release_sock(sk); return copied; -@@ -2073,7 +2157,7 @@ +@@ -2084,7 +2169,7 @@ [TCP_NEW_SYN_RECV] = TCP_CLOSE, /* should not happen ! */ }; @@ -3269,7 +3288,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c { int next = (int)new_state[sk->sk_state]; int ns = next & TCP_STATE_MASK; -@@ -2103,7 +2187,7 @@ +@@ -2114,7 +2199,7 @@ TCPF_SYN_RECV | TCPF_CLOSE_WAIT)) { /* Clear out any half completed packets. FIN if needed. */ if (tcp_close_state(sk)) @@ -3278,7 +3297,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c } } EXPORT_SYMBOL(tcp_shutdown); -@@ -2128,6 +2212,17 @@ +@@ -2139,6 +2224,17 @@ int data_was_unread = 0; int state; @@ -3296,7 +3315,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c lock_sock(sk); sk->sk_shutdown = SHUTDOWN_MASK; -@@ -2172,7 +2267,7 @@ +@@ -2183,7 +2279,7 @@ /* Unread data was tossed, zap the connection. */ NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONCLOSE); tcp_set_state(sk, TCP_CLOSE); @@ -3305,7 +3324,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c } else if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) { /* Check zero linger _after_ checking for unread data. */ sk->sk_prot->disconnect(sk, 0); -@@ -2246,7 +2341,7 @@ +@@ -2257,7 +2353,7 @@ struct tcp_sock *tp = tcp_sk(sk); if (tp->linger2 < 0) { tcp_set_state(sk, TCP_CLOSE); @@ -3314,7 +3333,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONLINGER); } else { -@@ -2256,7 +2351,8 @@ +@@ -2267,7 +2363,8 @@ inet_csk_reset_keepalive_timer(sk, tmo - TCP_TIMEWAIT_LEN); } else { @@ -3324,7 +3343,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c goto out; } } -@@ -2265,7 +2361,7 @@ +@@ -2276,7 +2373,7 @@ sk_mem_reclaim(sk); if (tcp_check_oom(sk, 0)) { tcp_set_state(sk, TCP_CLOSE); @@ -3333,7 +3352,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONMEMORY); } else if (!check_net(sock_net(sk))) { -@@ -2294,15 +2390,6 @@ +@@ -2305,15 +2402,6 @@ } EXPORT_SYMBOL(tcp_close); @@ -3349,7 +3368,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c int tcp_disconnect(struct sock *sk, int flags) { struct inet_sock *inet = inet_sk(sk); -@@ -2325,7 +2412,7 @@ +@@ -2336,7 +2424,7 @@ /* The last check adjusts for discrepancy of Linux wrt. RFC * states */ @@ -3358,7 +3377,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c sk->sk_err = ECONNRESET; } else if (old_state == TCP_SYN_SENT) sk->sk_err = ECONNRESET; -@@ -2341,6 +2428,13 @@ +@@ -2352,6 +2440,13 @@ if (!(sk->sk_userlocks & SOCK_BINDADDR_LOCK)) inet_reset_saddr(sk); @@ -3372,7 +3391,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c sk->sk_shutdown = 0; sock_reset_flag(sk, SOCK_DONE); tp->srtt_us = 0; -@@ -2387,7 +2481,7 @@ +@@ -2406,7 +2501,7 @@ static inline bool tcp_can_repair_sock(const struct sock *sk) { return ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN) && @@ -3381,7 +3400,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c } static int tcp_repair_set_window(struct tcp_sock *tp, char __user *optbuf, int len) -@@ -2522,6 +2616,61 @@ +@@ -2543,6 +2638,61 @@ release_sock(sk); return err; } @@ -3443,7 +3462,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c default: /* fallthru */ break; -@@ -2699,6 +2848,12 @@ +@@ -2720,6 +2870,12 @@ break; case TCP_DEFER_ACCEPT: @@ -3456,7 +3475,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c /* Translate value in seconds to number of retransmits */ icsk->icsk_accept_queue.rskq_defer_accept = secs_to_retrans(val, TCP_TIMEOUT_INIT / HZ, -@@ -2726,7 +2881,7 @@ +@@ -2747,7 +2903,7 @@ (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT) && inet_csk_ack_scheduled(sk)) { icsk->icsk_ack.pending |= ICSK_ACK_PUSHED; @@ -3465,7 +3484,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c if (!(val & 1)) icsk->icsk_ack.pingpong = 1; } -@@ -2736,7 +2891,7 @@ +@@ -2757,7 +2913,7 @@ #ifdef CONFIG_TCP_MD5SIG case TCP_MD5SIG: case TCP_MD5SIG_EXT: @@ -3474,7 +3493,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c err = tp->af_specific->md5_parse(sk, optname, optval, optlen); else err = -EINVAL; -@@ -2787,6 +2942,32 @@ +@@ -2808,6 +2964,32 @@ tp->notsent_lowat = val; sk->sk_write_space(sk); break; @@ -3507,7 +3526,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c default: err = -ENOPROTOOPT; break; -@@ -2840,7 +3021,7 @@ +@@ -2861,7 +3043,7 @@ } /* Return information about state of tcp endpoint in API format. */ @@ -3516,7 +3535,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c { const struct tcp_sock *tp = tcp_sk(sk); /* iff sk_type == SOCK_STREAM */ const struct inet_connection_sock *icsk = inet_csk(sk); -@@ -2877,7 +3058,8 @@ +@@ -2898,7 +3080,8 @@ return; } @@ -3526,7 +3545,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c info->tcpi_ca_state = icsk->icsk_ca_state; info->tcpi_retransmits = icsk->icsk_retransmits; -@@ -2946,7 +3128,9 @@ +@@ -2967,7 +3150,9 @@ rate64 = tcp_compute_delivery_rate(tp); if (rate64) info->tcpi_delivery_rate = rate64; @@ -3537,7 +3556,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c } EXPORT_SYMBOL_GPL(tcp_get_info); -@@ -3052,7 +3236,7 @@ +@@ -3073,7 +3258,7 @@ if (get_user(len, optlen)) return -EFAULT; @@ -3546,7 +3565,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c len = min_t(unsigned int, len, sizeof(info)); if (put_user(len, optlen)) -@@ -3214,6 +3398,87 @@ +@@ -3235,6 +3420,87 @@ } return 0; } @@ -3634,7 +3653,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c default: return -ENOPROTOOPT; } -@@ -3388,7 +3653,9 @@ +@@ -3409,7 +3675,9 @@ if (sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) TCP_INC_STATS(sock_net(sk), TCP_MIB_ATTEMPTFAILS); @@ -3644,7 +3663,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c tcp_clear_xmit_timers(sk); if (req) reqsk_fastopen_remove(sk, req, false); -@@ -3404,6 +3671,8 @@ +@@ -3425,6 +3693,8 @@ int tcp_abort(struct sock *sk, int err) { @@ -3653,7 +3672,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c if (!sk_fullsock(sk)) { if (sk->sk_state == TCP_NEW_SYN_RECV) { struct request_sock *req = inet_reqsk(sk); -@@ -3417,7 +3686,7 @@ +@@ -3438,7 +3708,7 @@ } /* Don't race with userspace socket closes such as tcp_close. */ @@ -3662,7 +3681,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c if (sk->sk_state == TCP_LISTEN) { tcp_set_state(sk, TCP_CLOSE); -@@ -3426,7 +3695,7 @@ +@@ -3447,7 +3717,7 @@ /* Don't race with BH socket closes such as inet_csk_listen_stop. */ local_bh_disable(); @@ -3671,7 +3690,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c if (!sock_flag(sk, SOCK_DEAD)) { sk->sk_err = err; -@@ -3434,14 +3703,14 @@ +@@ -3455,14 +3725,14 @@ smp_wmb(); sk->sk_error_report(sk); if (tcp_need_reset(sk->sk_state)) @@ -3689,9 +3708,34 @@ diff -aurN linux-4.14.127/net/ipv4/tcp.c mptcp-mptcp_v0.94/net/ipv4/tcp.c return 0; } EXPORT_SYMBOL_GPL(tcp_abort); -diff -aurN linux-4.14.127/net/ipv4/tcp_diag.c mptcp-mptcp_v0.94/net/ipv4/tcp_diag.c ---- linux-4.14.127/net/ipv4/tcp_diag.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp_diag.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp_cong.c mptcp-mptcp_v0.94/net/ipv4/tcp_cong.c +--- linux-4.14.174/net/ipv4/tcp_cong.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_cong.c 2020-03-23 09:45:33.000000000 +0100 +@@ -333,13 +333,19 @@ + return ret; + } + ++int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, ++ bool reinit, bool cap_net_admin) ++{ ++ return tcp_sk(sk)->ops->set_cong_ctrl(sk, name, load, reinit, cap_net_admin); ++} ++ + /* Change congestion control for socket. If load is false, then it is the + * responsibility of the caller to call tcp_init_congestion_control or + * tcp_reinit_congestion_control (if the current congestion control was + * already initialized. + */ +-int tcp_set_congestion_control(struct sock *sk, const char *name, bool load, +- bool reinit, bool cap_net_admin) ++int __tcp_set_congestion_control(struct sock *sk, const char *name, bool load, ++ bool reinit, bool cap_net_admin) + { + struct inet_connection_sock *icsk = inet_csk(sk); + const struct tcp_congestion_ops *ca; +diff -aurN linux-4.14.174/net/ipv4/tcp_diag.c mptcp-mptcp_v0.94/net/ipv4/tcp_diag.c +--- linux-4.14.174/net/ipv4/tcp_diag.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_diag.c 2020-03-23 09:45:33.000000000 +0100 @@ -34,7 +34,7 @@ r->idiag_wqueue = tp->write_seq - tp->snd_una; } @@ -3701,9 +3745,9 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_diag.c mptcp-mptcp_v0.94/net/ipv4/tcp_dia } #ifdef CONFIG_TCP_MD5SIG -diff -aurN linux-4.14.127/net/ipv4/tcp_fastopen.c mptcp-mptcp_v0.94/net/ipv4/tcp_fastopen.c ---- linux-4.14.127/net/ipv4/tcp_fastopen.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp_fastopen.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp_fastopen.c mptcp-mptcp_v0.94/net/ipv4/tcp_fastopen.c +--- linux-4.14.174/net/ipv4/tcp_fastopen.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_fastopen.c 2020-03-23 09:45:33.000000000 +0100 @@ -9,6 +9,7 @@ #include #include @@ -3762,9 +3806,9 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_fastopen.c mptcp-mptcp_v0.94/net/ipv4/tcp /* tcp_conn_request() is sending the SYNACK, * and queues the child into listener accept queue. */ -diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_input.c ---- linux-4.14.127/net/ipv4/tcp_input.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp_input.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_input.c +--- linux-4.14.174/net/ipv4/tcp_input.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_input.c 2020-03-23 09:45:33.000000000 +0100 @@ -76,6 +76,9 @@ #include #include @@ -3892,7 +3936,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { const struct tcp_sock *tp = tcp_sk(sk); /* Old crap is replaced with new one. 8) -@@ -1427,7 +1429,11 @@ +@@ -1428,7 +1430,11 @@ int len; int in_sack; @@ -3905,7 +3949,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in goto fallback; /* Normally R but no L won't result in plain S */ -@@ -2979,7 +2985,7 @@ +@@ -2983,7 +2989,7 @@ */ tcp_update_rtt_min(sk, ca_rtt_us); tcp_rtt_estimator(sk, seq_rtt_us); @@ -3914,7 +3958,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* RFC6298: only reset backoff on valid RTT measurement. */ inet_csk(sk)->icsk_backoff = 0; -@@ -3047,7 +3053,7 @@ +@@ -3051,7 +3057,7 @@ } /* If we get here, the whole TSO packet has not been acked. */ @@ -3923,7 +3967,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { struct tcp_sock *tp = tcp_sk(sk); u32 packets_acked; -@@ -3170,6 +3176,8 @@ +@@ -3174,6 +3180,8 @@ */ if (likely(!(scb->tcp_flags & TCPHDR_SYN))) { flag |= FLAG_DATA_ACKED; @@ -3932,7 +3976,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in } else { flag |= FLAG_SYN_ACKED; tp->retrans_stamp = 0; -@@ -3282,7 +3290,7 @@ +@@ -3286,7 +3294,7 @@ return flag; } @@ -3941,7 +3985,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { const struct tcp_sock *tp = tcp_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); -@@ -3352,9 +3360,8 @@ +@@ -3356,9 +3364,8 @@ /* Check that window update is acceptable. * The function assumes that snd_una<=ack<=snd_next. */ @@ -3953,7 +3997,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { return after(ack, tp->snd_una) || after(ack_seq, tp->snd_wl1) || -@@ -3574,7 +3581,7 @@ +@@ -3578,7 +3585,7 @@ } /* This routine deals with incoming acks, but not outgoing ones. */ @@ -3962,7 +4006,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); -@@ -3681,6 +3688,16 @@ +@@ -3685,6 +3692,16 @@ flag |= tcp_clean_rtx_queue(sk, prior_fackets, prior_snd_una, &acked, &sack_state); @@ -3979,7 +4023,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (tp->tlp_high_seq) tcp_process_tlp_ack(sk, ack, flag); /* If needed, reset TLP/RTO timer; RACK may later override this. */ -@@ -3759,8 +3776,10 @@ +@@ -3763,8 +3780,10 @@ */ void tcp_parse_options(const struct net *net, const struct sk_buff *skb, @@ -3992,7 +4036,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { const unsigned char *ptr; const struct tcphdr *th = tcp_hdr(skb); -@@ -3844,6 +3863,10 @@ +@@ -3848,6 +3867,10 @@ */ break; #endif @@ -4003,7 +4047,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in case TCPOPT_FASTOPEN: tcp_parse_fastopen_option( opsize - TCPOLEN_FASTOPEN_BASE, -@@ -3908,7 +3931,9 @@ +@@ -3912,7 +3935,9 @@ return true; } @@ -4014,7 +4058,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp->rx_opt.rcv_tsecr -= tp->tsoffset; -@@ -4065,6 +4090,11 @@ +@@ -4069,6 +4094,11 @@ { struct tcp_sock *tp = tcp_sk(sk); @@ -4026,7 +4070,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in inet_csk_schedule_ack(sk); sk->sk_shutdown |= RCV_SHUTDOWN; -@@ -4075,6 +4105,10 @@ +@@ -4079,6 +4109,10 @@ case TCP_ESTABLISHED: /* Move to CLOSE_WAIT */ tcp_set_state(sk, TCP_CLOSE_WAIT); @@ -4037,7 +4081,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in inet_csk(sk)->icsk_ack.pingpong = 1; break; -@@ -4097,9 +4131,16 @@ +@@ -4101,9 +4135,16 @@ tcp_set_state(sk, TCP_CLOSING); break; case TCP_FIN_WAIT2: @@ -4055,7 +4099,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in break; default: /* Only TCP_LISTEN and TCP_CLOSE are left, in these -@@ -4121,6 +4162,10 @@ +@@ -4125,6 +4166,10 @@ if (!sock_flag(sk, SOCK_DEAD)) { sk->sk_state_change(sk); @@ -4066,7 +4110,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* Do not send POLL_HUP for half duplex close. */ if (sk->sk_shutdown == SHUTDOWN_MASK || sk->sk_state == TCP_CLOSE) -@@ -4327,6 +4372,9 @@ +@@ -4331,6 +4376,9 @@ *fragstolen = false; @@ -4076,7 +4120,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* Its possible this segment overlaps with prior segment in queue */ if (TCP_SKB_CB(from)->seq != TCP_SKB_CB(to)->end_seq) return false; -@@ -4378,7 +4426,7 @@ +@@ -4382,7 +4430,7 @@ /* This one checks to see if we can put data from the * out_of_order queue into the receive_queue. */ @@ -4085,7 +4129,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { struct tcp_sock *tp = tcp_sk(sk); __u32 dsack_high = tp->rcv_nxt; -@@ -4404,7 +4452,14 @@ +@@ -4408,7 +4456,14 @@ if (TCP_SKB_CB(skb)->has_rxtstamp) skb->tstamp = TCP_SKB_CB(skb)->swtstamp; @@ -4101,7 +4145,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in SOCK_DEBUG(sk, "ofo packet was already received\n"); tcp_drop(sk, skb); continue; -@@ -4439,6 +4494,9 @@ +@@ -4443,6 +4498,9 @@ static int tcp_try_rmem_schedule(struct sock *sk, struct sk_buff *skb, unsigned int size) { @@ -4111,7 +4155,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || !sk_rmem_schedule(sk, skb, size)) { -@@ -4453,7 +4511,7 @@ +@@ -4457,7 +4515,7 @@ return 0; } @@ -4120,7 +4164,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { struct tcp_sock *tp = tcp_sk(sk); struct rb_node **p, *parent; -@@ -4525,7 +4583,8 @@ +@@ -4529,7 +4587,8 @@ continue; } if (before(seq, TCP_SKB_CB(skb1)->end_seq)) { @@ -4130,7 +4174,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* All the bits are present. Drop. */ NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFOMERGE); -@@ -4572,6 +4631,11 @@ +@@ -4576,6 +4635,11 @@ end_seq); break; } @@ -4142,7 +4186,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in rb_erase(&skb1->rbnode, &tp->out_of_order_queue); tcp_dsack_extend(sk, TCP_SKB_CB(skb1)->seq, TCP_SKB_CB(skb1)->end_seq); -@@ -4583,7 +4647,7 @@ +@@ -4587,7 +4651,7 @@ tp->ooo_last_skb = skb; add_sack: @@ -4151,7 +4195,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in tcp_sack_new_ofo_skb(sk, seq, end_seq); end: if (skb) { -@@ -4593,8 +4657,8 @@ +@@ -4597,8 +4661,8 @@ } } @@ -4162,7 +4206,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { int eaten; struct sk_buff *tail = skb_peek_tail(&sk->sk_receive_queue); -@@ -4667,10 +4731,14 @@ +@@ -4671,10 +4735,14 @@ bool fragstolen; int eaten; @@ -4178,7 +4222,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in skb_dst_drop(skb); __skb_pull(skb, tcp_hdr(skb)->doff * 4); -@@ -4695,7 +4763,7 @@ +@@ -4699,7 +4767,7 @@ eaten = tcp_queue_rcv(sk, skb, 0, &fragstolen); tcp_rcv_nxt_update(tp, TCP_SKB_CB(skb)->end_seq); @@ -4187,7 +4231,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in tcp_event_data_recv(sk, skb); if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN) tcp_fin(sk); -@@ -4717,7 +4785,11 @@ +@@ -4721,7 +4789,11 @@ if (eaten > 0) kfree_skb_partial(skb, fragstolen); @@ -4200,7 +4244,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in sk->sk_data_ready(sk); return; } -@@ -5056,7 +5128,7 @@ +@@ -5060,7 +5132,7 @@ return -1; } @@ -4209,7 +4253,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { const struct tcp_sock *tp = tcp_sk(sk); -@@ -5091,7 +5163,7 @@ +@@ -5095,7 +5167,7 @@ { struct tcp_sock *tp = tcp_sk(sk); @@ -4218,7 +4262,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in tcp_sndbuf_expand(sk); tp->snd_cwnd_stamp = tcp_jiffies32; } -@@ -5105,10 +5177,11 @@ +@@ -5109,10 +5181,11 @@ sock_reset_flag(sk, SOCK_QUEUE_SHRUNK); /* pairs with tcp_poll() */ smp_mb(); @@ -4233,16 +4277,23 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in tcp_chrono_stop(sk, TCP_CHRONO_SNDBUF_LIMITED); } } -@@ -5132,7 +5205,7 @@ +@@ -5135,8 +5208,14 @@ + if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss && /* ... and right edge of window advances far enough. * (tcp_recvmsg() will send ACK otherwise). Or... ++ * in the case of mptcp the meta ofo queue may ++ * prevent tcp_recvmsg from being called in time ++ * so no data is available for the application, skip the ++ * receive window check as there is no hope that the application ++ * will do a tcp_recvmsg anytime soon. */ - __tcp_select_window(sk) >= tp->rcv_wnd) || -+ tp->ops->__select_window(sk) >= tp->rcv_wnd) || ++ (tp->ops->__select_window(sk) >= tp->rcv_wnd || (mptcp(tp) && ++ skb_queue_empty(&mptcp_meta_sk(sk)->sk_receive_queue)))) || /* We ACK each frame or... */ tcp_in_quickack_mode(sk) || /* We have out of order data. */ -@@ -5234,6 +5307,10 @@ +@@ -5238,6 +5317,10 @@ { struct tcp_sock *tp = tcp_sk(sk); @@ -4253,7 +4304,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* Check if we get a new urgent pointer - normally not. */ if (th->urg) tcp_check_urg(sk, th); -@@ -5376,9 +5453,15 @@ +@@ -5380,9 +5463,15 @@ goto discard; } @@ -4269,7 +4320,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in tcp_drop(sk, skb); return false; } -@@ -5432,6 +5515,10 @@ +@@ -5436,6 +5525,10 @@ tp->rx_opt.saw_tstamp = 0; @@ -4280,7 +4331,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* pred_flags is 0xS?10 << 16 + snd_wnd * if header_prediction is to be made * 'S' will always be tp->tcp_header_len >> 2 -@@ -5601,7 +5688,7 @@ +@@ -5605,7 +5698,7 @@ */ tp->lsndtime = tcp_jiffies32; @@ -4289,7 +4340,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (sock_flag(sk, SOCK_KEEPOPEN)) inet_csk_reset_keepalive_timer(sk, keepalive_time_when(tp)); -@@ -5616,7 +5703,8 @@ +@@ -5620,7 +5713,8 @@ struct tcp_fastopen_cookie *cookie) { struct tcp_sock *tp = tcp_sk(sk); @@ -4299,7 +4350,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in u16 mss = tp->rx_opt.mss_clamp, try_exp = 0; bool syn_drop = false; -@@ -5626,7 +5714,7 @@ +@@ -5630,7 +5724,7 @@ /* Get original SYNACK MSS value if user MSS sets mss_clamp */ tcp_clear_options(&opt); opt.user_mss = opt.mss_clamp = 0; @@ -4308,7 +4359,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in mss = opt.mss_clamp; } -@@ -5650,7 +5738,11 @@ +@@ -5654,7 +5748,11 @@ tcp_fastopen_cache_set(sk, mss, cookie, syn_drop, try_exp); @@ -4321,7 +4372,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in tcp_for_write_queue_from(data, sk) { if (data == tcp_send_head(sk) || __tcp_retransmit_skb(sk, data, 1)) -@@ -5678,9 +5770,13 @@ +@@ -5682,9 +5780,13 @@ struct tcp_sock *tp = tcp_sk(sk); struct tcp_fastopen_cookie foc = { .len = -1 }; int saved_clamp = tp->rx_opt.mss_clamp; @@ -4336,7 +4387,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr) tp->rx_opt.rcv_tsecr -= tp->tsoffset; -@@ -5740,6 +5836,35 @@ +@@ -5744,6 +5846,35 @@ tcp_init_wl(tp, TCP_SKB_CB(skb)->seq); tcp_ack(sk, skb, FLAG_SLOWPATH); @@ -4372,7 +4423,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* Ok.. it's good. Set up sequence numbers and * move to established. */ -@@ -5766,6 +5891,11 @@ +@@ -5770,6 +5901,11 @@ tp->tcp_header_len = sizeof(struct tcphdr); } @@ -4384,7 +4435,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (tcp_is_sack(tp) && sysctl_tcp_fack) tcp_enable_fack(tp); -@@ -5791,9 +5921,12 @@ +@@ -5795,9 +5931,12 @@ } if (fastopen_fail) return -1; @@ -4399,7 +4450,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* Save one ACK. Data will be ready after * several ticks, if write_pending is set. * -@@ -5832,6 +5965,7 @@ +@@ -5836,6 +5975,7 @@ tcp_paws_reject(&tp->rx_opt, 0)) goto discard_and_undo; @@ -4407,7 +4458,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (th->syn) { /* We see SYN without ACK. It is attempt of * simultaneous connect with crossed SYNs. -@@ -5848,6 +5982,11 @@ +@@ -5852,6 +5992,11 @@ tp->tcp_header_len = sizeof(struct tcphdr); } @@ -4419,7 +4470,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in tp->rcv_nxt = TCP_SKB_CB(skb)->seq + 1; tp->copied_seq = tp->rcv_nxt; tp->rcv_wup = TCP_SKB_CB(skb)->seq + 1; -@@ -5906,6 +6045,7 @@ +@@ -5910,6 +6055,7 @@ */ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb) @@ -4427,7 +4478,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in { struct tcp_sock *tp = tcp_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); -@@ -5948,6 +6088,16 @@ +@@ -5952,6 +6098,16 @@ tp->rx_opt.saw_tstamp = 0; tcp_mstamp_refresh(tp); queued = tcp_rcv_synsent_state_process(sk, skb, th); @@ -4444,7 +4495,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (queued >= 0) return queued; -@@ -6005,7 +6155,7 @@ +@@ -6009,7 +6165,7 @@ tcp_mtup_init(sk); tp->copied_seq = tp->rcv_nxt; @@ -4453,7 +4504,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in } smp_mb(); tcp_set_state(sk, TCP_ESTABLISHED); -@@ -6024,6 +6174,8 @@ +@@ -6028,6 +6184,8 @@ if (tp->rx_opt.tstamp_ok) tp->advmss -= TCPOLEN_TSTAMP_ALIGNED; @@ -4462,7 +4513,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (req) { /* Re-arm the timer because data may have been sent out. -@@ -6046,6 +6198,30 @@ +@@ -6050,6 +6208,30 @@ tcp_initialize_rcv_mss(sk); tcp_fast_path_on(tp); @@ -4493,7 +4544,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in break; case TCP_FIN_WAIT1: { -@@ -6093,7 +6269,8 @@ +@@ -6097,7 +6279,8 @@ tmo = tcp_fin_time(sk); if (tmo > TCP_TIMEWAIT_LEN) { inet_csk_reset_keepalive_timer(sk, tmo - TCP_TIMEWAIT_LEN); @@ -4503,7 +4554,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in /* Bad case. We could lose such FIN otherwise. * It is not a big problem, but it looks confusing * and not so rare event. We still can lose it now, -@@ -6102,7 +6279,7 @@ +@@ -6106,7 +6289,7 @@ */ inet_csk_reset_keepalive_timer(sk, tmo); } else { @@ -4512,7 +4563,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in goto discard; } break; -@@ -6110,7 +6287,7 @@ +@@ -6114,7 +6297,7 @@ case TCP_CLOSING: if (tp->snd_una == tp->write_seq) { @@ -4521,7 +4572,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in goto discard; } break; -@@ -6122,6 +6299,9 @@ +@@ -6126,6 +6309,9 @@ goto discard; } break; @@ -4531,7 +4582,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in } /* step 6: check the URG bit */ -@@ -6142,7 +6322,8 @@ +@@ -6146,7 +6332,8 @@ */ if (sk->sk_shutdown & RCV_SHUTDOWN) { if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq && @@ -4541,7 +4592,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONDATA); tcp_reset(sk); return 1; -@@ -6239,6 +6420,8 @@ +@@ -6243,6 +6430,8 @@ ireq->wscale_ok = rx_opt->wscale_ok; ireq->acked = 0; ireq->ecn_ok = 0; @@ -4550,7 +4601,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in ireq->ir_rmt_port = tcp_hdr(skb)->source; ireq->ir_num = ntohs(tcp_hdr(skb)->dest); ireq->ir_mark = inet_request_mark(sk, skb); -@@ -6333,12 +6516,17 @@ +@@ -6337,12 +6526,17 @@ /* TW buckets are converted to open requests without * limitations, they conserve resources and peer is * evidently real one. @@ -4569,7 +4620,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in } if (sk_acceptq_is_full(sk)) { -@@ -6356,8 +6544,8 @@ +@@ -6360,8 +6554,8 @@ tcp_clear_options(&tmp_opt); tmp_opt.mss_clamp = af_ops->mss_clamp; tmp_opt.user_mss = tp->rx_opt.user_mss; @@ -4580,7 +4631,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (want_cookie && !tmp_opt.saw_tstamp) tcp_clear_options(&tmp_opt); -@@ -6369,7 +6557,8 @@ +@@ -6373,7 +6567,8 @@ /* Note: tcp_v6_init_req() might override ir_iif for link locals */ inet_rsk(req)->ir_iif = inet_request_bound_dev_if(sk, skb); @@ -4590,7 +4641,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in if (security_inet_conn_request(sk, skb, req)) goto drop_and_free; -@@ -6405,7 +6594,7 @@ +@@ -6409,7 +6604,7 @@ tcp_ecn_create_request(req, skb, sk, dst); if (want_cookie) { @@ -4599,7 +4650,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in req->cookie_ts = tmp_opt.tstamp_ok; if (!tmp_opt.tstamp_ok) inet_rsk(req)->ecn_ok = 0; -@@ -6419,18 +6608,26 @@ +@@ -6423,18 +6618,26 @@ fastopen_sk = tcp_try_fastopen(sk, skb, req, &foc); } if (fastopen_sk) { @@ -4627,9 +4678,9 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_input.c mptcp-mptcp_v0.94/net/ipv4/tcp_in sock_put(fastopen_sk); } else { tcp_rsk(req)->tfo_listener = false; -diff -aurN linux-4.14.127/net/ipv4/tcp_ipv4.c mptcp-mptcp_v0.94/net/ipv4/tcp_ipv4.c ---- linux-4.14.127/net/ipv4/tcp_ipv4.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp_ipv4.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp_ipv4.c mptcp-mptcp_v0.94/net/ipv4/tcp_ipv4.c +--- linux-4.14.174/net/ipv4/tcp_ipv4.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_ipv4.c 2020-03-23 09:45:33.000000000 +0100 @@ -67,6 +67,8 @@ #include #include @@ -5107,7 +5158,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_ipv4.c mptcp-mptcp_v0.94/net/ipv4/tcp_ipv tcp_cleanup_ulp(sk); /* Cleanup up the write buffer. */ -@@ -2436,6 +2560,9 @@ +@@ -2437,6 +2561,9 @@ .compat_getsockopt = compat_tcp_getsockopt, #endif .diag_destroy = tcp_abort, @@ -5117,9 +5168,9 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_ipv4.c mptcp-mptcp_v0.94/net/ipv4/tcp_ipv }; EXPORT_SYMBOL(tcp_prot); -diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tcp_minisocks.c ---- linux-4.14.127/net/ipv4/tcp_minisocks.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp_minisocks.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tcp_minisocks.c +--- linux-4.14.174/net/ipv4/tcp_minisocks.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_minisocks.c 2020-03-23 09:45:33.000000000 +0100 @@ -18,11 +18,13 @@ * Jorge Cwik, */ @@ -5243,7 +5294,15 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tc newtp->tsoffset = treq->ts_off; #ifdef CONFIG_TCP_MD5SIG newtp->md5sig_info = NULL; /*XXX*/ -@@ -564,6 +600,7 @@ +@@ -541,6 +577,7 @@ + newtp->syn_data_acked = 0; + newtp->rack.mstamp = 0; + newtp->rack.advanced = 0; ++ newtp->inside_tk_table = 0; + + __TCP_INC_STATS(sock_net(sk), TCP_MIB_PASSIVEOPENS); + } +@@ -564,6 +601,7 @@ bool fastopen) { struct tcp_options_received tmp_opt; @@ -5251,7 +5310,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tc struct sock *child; const struct tcphdr *th = tcp_hdr(skb); __be32 flg = tcp_flag_word(th) & (TCP_FLAG_RST|TCP_FLAG_SYN|TCP_FLAG_ACK); -@@ -571,8 +608,11 @@ +@@ -571,8 +609,11 @@ bool own_req; tmp_opt.saw_tstamp = 0; @@ -5264,7 +5323,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tc if (tmp_opt.saw_tstamp) { tmp_opt.ts_recent = req->ts_recent; -@@ -613,7 +653,14 @@ +@@ -613,7 +654,14 @@ * * Reset timer after retransmitting SYNACK, similar to * the idea of fast retransmit in recovery. @@ -5279,7 +5338,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tc if (!tcp_oow_rate_limited(sock_net(sk), skb, LINUX_MIB_TCPACKSKIPPEDSYNRECV, &tcp_rsk(req)->last_oow_ack_time) && -@@ -766,6 +813,18 @@ +@@ -766,6 +814,18 @@ if (!child) goto listen_overflow; @@ -5298,7 +5357,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tc sock_rps_save_rxhash(child, skb); tcp_synack_rtt_meas(child, req); return inet_csk_complete_hashdance(sk, child, req, own_req); -@@ -813,12 +872,13 @@ +@@ -813,12 +873,13 @@ { int ret = 0; int state = child->sk_state; @@ -5313,7 +5372,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tc ret = tcp_rcv_state_process(child, skb); /* Wakeup parent, send SIGIO */ if (state == TCP_SYN_RECV && child->sk_state != state) -@@ -828,10 +888,14 @@ +@@ -828,10 +889,14 @@ * in main socket hash table and lock on listening * socket does not protect us more. */ @@ -5330,9 +5389,9 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_minisocks.c mptcp-mptcp_v0.94/net/ipv4/tc sock_put(child); return ret; } -diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_output.c ---- linux-4.14.127/net/ipv4/tcp_output.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp_output.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_output.c +--- linux-4.14.174/net/ipv4/tcp_output.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_output.c 2020-03-23 09:45:33.000000000 +0100 @@ -36,6 +36,12 @@ #define pr_fmt(fmt) "TCP: " fmt @@ -5471,7 +5530,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o return MAX_TCP_OPTION_SPACE - remaining; } -@@ -700,16 +706,22 @@ +@@ -700,6 +706,8 @@ opts->tsecr = tp->rx_opt.ts_recent; size += TCPOLEN_TSTAMP_ALIGNED; } @@ -5480,28 +5539,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o eff_sacks = tp->rx_opt.num_sacks + tp->rx_opt.dsack; if (unlikely(eff_sacks)) { -- const unsigned int remaining = MAX_TCP_OPTION_SPACE - size; -- opts->num_sack_blocks = -- min_t(unsigned int, eff_sacks, -- (remaining - TCPOLEN_SACK_BASE_ALIGNED) / -- TCPOLEN_SACK_PERBLOCK); -- size += TCPOLEN_SACK_BASE_ALIGNED + -- opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK; -+ const unsigned remaining = MAX_TCP_OPTION_SPACE - size; -+ if (remaining < TCPOLEN_SACK_BASE_ALIGNED) -+ opts->num_sack_blocks = 0; -+ else -+ opts->num_sack_blocks = -+ min_t(unsigned int, eff_sacks, -+ (remaining - TCPOLEN_SACK_BASE_ALIGNED) / -+ TCPOLEN_SACK_PERBLOCK); -+ if (opts->num_sack_blocks) -+ size += TCPOLEN_SACK_BASE_ALIGNED + -+ opts->num_sack_blocks * TCPOLEN_SACK_PERBLOCK; - } - - return size; -@@ -749,8 +761,8 @@ +@@ -750,8 +758,8 @@ tcp_xmit_retransmit_queue(sk); } @@ -5512,7 +5550,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o } } /* -@@ -766,7 +778,7 @@ +@@ -767,7 +775,7 @@ unsigned long flags; struct list_head *q, *n; struct tcp_sock *tp; @@ -5521,7 +5559,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o local_irq_save(flags); list_splice_init(&tsq->head, &list); -@@ -780,14 +792,28 @@ +@@ -781,14 +789,28 @@ smp_mb__before_atomic(); clear_bit(TSQ_QUEUED, &sk->sk_tsq_flags); @@ -5554,7 +5592,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o } sk_free(sk); -@@ -797,7 +823,9 @@ +@@ -798,7 +820,9 @@ #define TCP_DEFERRED_ALL (TCPF_TSQ_DEFERRED | \ TCPF_WRITE_TIMER_DEFERRED | \ TCPF_DELACK_TIMER_DEFERRED | \ @@ -5565,7 +5603,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o /** * tcp_release_cb - tcp release_sock() callback * @sk: socket -@@ -817,8 +845,11 @@ +@@ -818,8 +842,11 @@ nflags = flags & ~TCP_DEFERRED_ALL; } while (cmpxchg(&sk->sk_tsq_flags, flags, nflags) != flags); @@ -5578,7 +5616,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o /* Here begins the tricky part : * We are called from release_sock() with : -@@ -843,6 +874,13 @@ +@@ -844,6 +871,13 @@ inet_csk(sk)->icsk_af_ops->mtu_reduced(sk); __sock_put(sk); } @@ -5592,7 +5630,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o } EXPORT_SYMBOL(tcp_release_cb); -@@ -1080,10 +1118,10 @@ +@@ -1081,10 +1115,10 @@ } } @@ -5605,7 +5643,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o tcp_ecn_send(sk, skb, th, tcp_header_size); } else { /* RFC1323: The window in SYN & SYN/ACK segments -@@ -1140,8 +1178,8 @@ +@@ -1141,8 +1175,8 @@ return err; } @@ -5616,7 +5654,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { return __tcp_transmit_skb(sk, skb, clone_it, gfp_mask, tcp_sk(sk)->rcv_nxt); -@@ -1152,7 +1190,7 @@ +@@ -1153,7 +1187,7 @@ * NOTE: probe0 timer is not checked, do not forget tcp_push_pending_frames, * otherwise socket can stall. */ @@ -5625,7 +5663,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { struct tcp_sock *tp = tcp_sk(sk); -@@ -1165,7 +1203,7 @@ +@@ -1166,7 +1200,7 @@ } /* Initialize TSO segments for a packet. */ @@ -5634,7 +5672,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { if (skb->len <= mss_now || skb->ip_summed == CHECKSUM_NONE) { /* Avoid the costly divide in the normal -@@ -1197,7 +1235,7 @@ +@@ -1198,7 +1232,7 @@ /* Pcount in the middle of the write queue got changed, we need to do various * tweaks to fix counters */ @@ -5643,7 +5681,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { struct tcp_sock *tp = tcp_sk(sk); -@@ -1354,7 +1392,7 @@ +@@ -1364,7 +1398,7 @@ /* This is similar to __pskb_pull_tail(). The difference is that pulled * data is not copied, but immediately discarded. */ @@ -5652,7 +5690,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { struct skb_shared_info *shinfo; int i, k, eat; -@@ -1576,6 +1614,7 @@ +@@ -1586,6 +1620,7 @@ return mss_now; } @@ -5660,7 +5698,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o /* RFC2861, slow part. Adjust cwnd, after it was not full during one rto. * As additional protections, we do not touch cwnd in retransmission phases, -@@ -1599,7 +1638,7 @@ +@@ -1609,7 +1644,7 @@ tp->snd_cwnd_stamp = tcp_jiffies32; } @@ -5669,7 +5707,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops; struct tcp_sock *tp = tcp_sk(sk); -@@ -1657,8 +1696,8 @@ +@@ -1667,8 +1702,8 @@ * But we can avoid doing the divide again given we already have * skb_pcount = skb->len / mss_now */ @@ -5680,7 +5718,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { if (skb->len < tcp_skb_pcount(skb) * mss_now) tp->snd_sml = TCP_SKB_CB(skb)->end_seq; -@@ -1716,11 +1755,11 @@ +@@ -1726,11 +1761,11 @@ } /* Returns the portion of skb which can be sent right away */ @@ -5697,7 +5735,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { const struct tcp_sock *tp = tcp_sk(sk); u32 partial, needed, window, max_len; -@@ -1750,13 +1789,14 @@ +@@ -1760,13 +1795,14 @@ /* Can at least one segment of SKB be sent right now, according to the * congestion window rules? If so, return how many segments are allowed. */ @@ -5715,7 +5753,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o tcp_skb_pcount(skb) == 1) return 1; -@@ -1776,7 +1816,7 @@ +@@ -1786,7 +1822,7 @@ * This must be invoked the first time we consider transmitting * SKB onto the wire. */ @@ -5724,7 +5762,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { int tso_segs = tcp_skb_pcount(skb); -@@ -1791,8 +1831,8 @@ +@@ -1801,8 +1837,8 @@ /* Return true if the Nagle test allows this packet to be * sent now. */ @@ -5735,7 +5773,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { /* Nagle rule does not apply to frames, which sit in the middle of the * write_queue (they have no chances to get new data). -@@ -1804,7 +1844,8 @@ +@@ -1814,7 +1850,8 @@ return true; /* Don't use the nagle rule for urgent data (or for the final FIN). */ @@ -5745,7 +5783,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o return true; if (!tcp_nagle_check(skb->len < cur_mss, tp, nonagle)) -@@ -1814,9 +1855,8 @@ +@@ -1824,9 +1861,8 @@ } /* Does at least the first segment of SKB fit into the send window? */ @@ -5757,7 +5795,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { u32 end_seq = TCP_SKB_CB(skb)->end_seq; -@@ -1973,7 +2013,7 @@ +@@ -1983,7 +2019,7 @@ } /* If this packet won't get more data, do not wait. */ @@ -5766,7 +5804,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o goto send_now; return true; -@@ -2272,6 +2312,23 @@ +@@ -2283,6 +2319,23 @@ tcp_chrono_set(tp, TCP_CHRONO_BUSY); } @@ -5790,7 +5828,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o /* This routine writes packets to the network. It advances the * send_head. This happens as incoming acks open up the remote * window for us. -@@ -2286,7 +2343,7 @@ +@@ -2297,7 +2350,7 @@ * Returns true, if no segments are in flight and we have queued segments, * but cannot send anything now because of SWS or another problem. */ @@ -5799,7 +5837,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o int push_one, gfp_t gfp) { struct tcp_sock *tp = tcp_sk(sk); -@@ -2300,7 +2357,12 @@ +@@ -2311,7 +2364,12 @@ sent_pkts = 0; tcp_mstamp_refresh(tp); @@ -5813,7 +5851,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o /* Do MTU probing. */ result = tcp_mtu_probe(sk); if (!result) { -@@ -2398,7 +2460,8 @@ +@@ -2417,7 +2475,8 @@ if (push_one != 2) tcp_schedule_loss_probe(sk, false); is_cwnd_limited |= (tcp_packets_in_flight(tp) >= tp->snd_cwnd); @@ -5823,7 +5861,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o return false; } return !tp->packets_out && tcp_send_head(sk); -@@ -2483,7 +2546,7 @@ +@@ -2502,7 +2561,7 @@ if (skb) { if (tcp_snd_wnd_test(tp, skb, mss)) { pcount = tp->packets_out; @@ -5832,7 +5870,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o if (tp->packets_out > pcount) goto probe_sent; goto rearm_timer; -@@ -2550,8 +2613,8 @@ +@@ -2569,8 +2628,8 @@ if (unlikely(sk->sk_state == TCP_CLOSE)) return; @@ -5843,7 +5881,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o tcp_check_probe_timer(sk); } -@@ -2564,7 +2627,8 @@ +@@ -2583,7 +2642,8 @@ BUG_ON(!skb || skb->len < mss_now); @@ -5853,7 +5891,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o } /* This function returns the amount that we can raise the -@@ -2797,6 +2861,10 @@ +@@ -2816,6 +2876,10 @@ if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN) return; @@ -5864,7 +5902,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o tcp_for_write_queue_from_safe(skb, tmp, sk) { if (!tcp_can_collapse(sk, skb)) break; -@@ -3254,7 +3322,7 @@ +@@ -3273,7 +3337,7 @@ /* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */ th->window = htons(min(req->rsk_rcv_wnd, 65535U)); @@ -5873,7 +5911,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o th->doff = (tcp_header_size >> 2); __TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS); -@@ -3335,13 +3403,13 @@ +@@ -3354,13 +3418,13 @@ if (rcv_wnd == 0) rcv_wnd = dst_metric(dst, RTAX_INITRWND); @@ -5894,7 +5932,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o tp->rx_opt.rcv_wscale = rcv_wscale; tp->rcv_ssthresh = tp->rcv_wnd; -@@ -3366,6 +3434,36 @@ +@@ -3385,6 +3449,36 @@ inet_csk(sk)->icsk_rto = tcp_timeout_init(sk); inet_csk(sk)->icsk_retransmits = 0; tcp_clear_retrans(tp); @@ -5931,7 +5969,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o } static void tcp_connect_queue_skb(struct sock *sk, struct sk_buff *skb) -@@ -3626,6 +3724,7 @@ +@@ -3645,6 +3739,7 @@ { __tcp_send_ack(sk, tcp_sk(sk)->rcv_nxt); } @@ -5939,7 +5977,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o /* This routine sends a packet with an out of date sequence * number. It assumes the other end will try to ack it. -@@ -3638,7 +3737,7 @@ +@@ -3657,7 +3752,7 @@ * one is with SEG.SEQ=SND.UNA to deliver urgent pointer, another is * out-of-date with SND.UNA-1 to probe window. */ @@ -5948,7 +5986,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o { struct tcp_sock *tp = tcp_sk(sk); struct sk_buff *skb; -@@ -3724,7 +3823,7 @@ +@@ -3743,7 +3838,7 @@ unsigned long probe_max; int err; @@ -5957,9 +5995,9 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_output.c mptcp-mptcp_v0.94/net/ipv4/tcp_o if (tp->packets_out || !tcp_send_head(sk)) { /* Cancel probe timer, if it is not required. */ -diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_timer.c ---- linux-4.14.127/net/ipv4/tcp_timer.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv4/tcp_timer.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_timer.c +--- linux-4.14.174/net/ipv4/tcp_timer.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv4/tcp_timer.c 2020-03-23 09:45:33.000000000 +0100 @@ -20,6 +20,7 @@ #include @@ -6070,7 +6108,18 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_ti sock_put(sk); } -@@ -576,7 +598,7 @@ +@@ -360,6 +382,10 @@ + + if (icsk->icsk_probes_out >= max_probes) { + abort: tcp_write_err(sk); ++ if (is_meta_sk(sk) && ++ mptcp_in_infinite_mapping_weak(tp->mpcb)) { ++ mptcp_sub_force_close_all(tp->mpcb, NULL); ++ } + } else { + /* Only send another probe if we didn't close things up. */ + tcp_send_probe0(sk); +@@ -580,7 +606,7 @@ break; case ICSK_TIME_RETRANS: icsk->icsk_pending = 0; @@ -6079,7 +6128,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_ti break; case ICSK_TIME_PROBE0: icsk->icsk_pending = 0; -@@ -591,16 +613,19 @@ +@@ -595,16 +621,19 @@ static void tcp_write_timer(unsigned long data) { struct sock *sk = (struct sock *)data; @@ -6102,7 +6151,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_ti sock_put(sk); } -@@ -630,11 +655,12 @@ +@@ -634,11 +663,12 @@ struct sock *sk = (struct sock *) data; struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); @@ -6117,7 +6166,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_ti /* Try again later. */ inet_csk_reset_keepalive_timer (sk, HZ/20); goto out; -@@ -646,16 +672,31 @@ +@@ -650,16 +680,31 @@ } tcp_mstamp_refresh(tp); @@ -6151,7 +6200,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_ti goto death; } -@@ -680,11 +721,11 @@ +@@ -684,11 +729,11 @@ icsk->icsk_probes_out > 0) || (icsk->icsk_user_timeout == 0 && icsk->icsk_probes_out >= keepalive_probes(tp))) { @@ -6165,7 +6214,7 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_ti icsk->icsk_probes_out++; elapsed = keepalive_intvl_when(tp); } else { -@@ -708,7 +749,7 @@ +@@ -712,7 +757,7 @@ tcp_done(sk); out: @@ -6174,9 +6223,9 @@ diff -aurN linux-4.14.127/net/ipv4/tcp_timer.c mptcp-mptcp_v0.94/net/ipv4/tcp_ti sock_put(sk); } -diff -aurN linux-4.14.127/net/ipv6/addrconf.c mptcp-mptcp_v0.94/net/ipv6/addrconf.c ---- linux-4.14.127/net/ipv6/addrconf.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv6/addrconf.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv6/addrconf.c mptcp-mptcp_v0.94/net/ipv6/addrconf.c +--- linux-4.14.174/net/ipv6/addrconf.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv6/addrconf.c 2020-03-23 09:45:33.000000000 +0100 @@ -928,6 +928,7 @@ kfree_rcu(ifp, rcu); @@ -6185,9 +6234,9 @@ diff -aurN linux-4.14.127/net/ipv6/addrconf.c mptcp-mptcp_v0.94/net/ipv6/addrcon static void ipv6_link_dev_addr(struct inet6_dev *idev, struct inet6_ifaddr *ifp) -diff -aurN linux-4.14.127/net/ipv6/af_inet6.c mptcp-mptcp_v0.94/net/ipv6/af_inet6.c ---- linux-4.14.127/net/ipv6/af_inet6.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv6/af_inet6.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv6/af_inet6.c mptcp-mptcp_v0.94/net/ipv6/af_inet6.c +--- linux-4.14.174/net/ipv6/af_inet6.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv6/af_inet6.c 2020-03-23 09:45:33.000000000 +0100 @@ -107,8 +107,7 @@ return (struct ipv6_pinfo *)(((u8 *)sk) + offset); } @@ -6198,9 +6247,9 @@ diff -aurN linux-4.14.127/net/ipv6/af_inet6.c mptcp-mptcp_v0.94/net/ipv6/af_inet { struct inet_sock *inet; struct ipv6_pinfo *np; -diff -aurN linux-4.14.127/net/ipv6/ipv6_sockglue.c mptcp-mptcp_v0.94/net/ipv6/ipv6_sockglue.c ---- linux-4.14.127/net/ipv6/ipv6_sockglue.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv6/ipv6_sockglue.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv6/ipv6_sockglue.c mptcp-mptcp_v0.94/net/ipv6/ipv6_sockglue.c +--- linux-4.14.174/net/ipv6/ipv6_sockglue.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv6/ipv6_sockglue.c 2020-03-23 09:45:33.000000000 +0100 @@ -48,6 +48,8 @@ #include #include @@ -6210,7 +6259,7 @@ diff -aurN linux-4.14.127/net/ipv6/ipv6_sockglue.c mptcp-mptcp_v0.94/net/ipv6/ip #include #include #include -@@ -216,7 +218,12 @@ +@@ -222,7 +224,12 @@ sock_prot_inuse_add(net, &tcp_prot, 1); local_bh_enable(); sk->sk_prot = &tcp_prot; @@ -6224,9 +6273,9 @@ diff -aurN linux-4.14.127/net/ipv6/ipv6_sockglue.c mptcp-mptcp_v0.94/net/ipv6/ip sk->sk_socket->ops = &inet_stream_ops; sk->sk_family = PF_INET; tcp_sync_mss(sk, icsk->icsk_pmtu_cookie); -diff -aurN linux-4.14.127/net/ipv6/syncookies.c mptcp-mptcp_v0.94/net/ipv6/syncookies.c ---- linux-4.14.127/net/ipv6/syncookies.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv6/syncookies.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv6/syncookies.c mptcp-mptcp_v0.94/net/ipv6/syncookies.c +--- linux-4.14.174/net/ipv6/syncookies.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv6/syncookies.c 2020-03-23 09:45:33.000000000 +0100 @@ -20,6 +20,8 @@ #include #include @@ -6308,9 +6357,9 @@ diff -aurN linux-4.14.127/net/ipv6/syncookies.c mptcp-mptcp_v0.94/net/ipv6/synco ireq->rcv_wscale = rcv_wscale; ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), dst); -diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv6.c ---- linux-4.14.127/net/ipv6/tcp_ipv6.c 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/ipv6/tcp_ipv6.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv6.c +--- linux-4.14.174/net/ipv6/tcp_ipv6.c 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/ipv6/tcp_ipv6.c 2020-03-23 09:45:33.000000000 +0100 @@ -61,6 +61,8 @@ #include #include @@ -6492,9 +6541,9 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv + struct sk_buff *skb, + bool want_cookie) { + bool l3_slave = ipv6_l3mdev_skb(TCP_SKB_CB(skb)->header.h6.flags); struct inet_request_sock *ireq = inet_rsk(req); - const struct ipv6_pinfo *np = inet6_sk(sk_listener); -@@ -737,6 +750,8 @@ +@@ -738,6 +751,8 @@ refcount_inc(&skb->users); ireq->pktopts = skb; } @@ -6503,7 +6552,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv } static struct dst_entry *tcp_v6_route_req(const struct sock *sk, -@@ -756,7 +771,7 @@ +@@ -757,7 +772,7 @@ .syn_ack_timeout = tcp_syn_ack_timeout, }; @@ -6512,7 +6561,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv .mss_clamp = IPV6_MIN_MTU - sizeof(struct tcphdr) - sizeof(struct ipv6hdr), #ifdef CONFIG_TCP_MD5SIG -@@ -774,9 +789,9 @@ +@@ -775,9 +790,9 @@ }; static void tcp_v6_send_response(const struct sock *sk, struct sk_buff *skb, u32 seq, @@ -6524,7 +6573,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { const struct tcphdr *th = tcp_hdr(skb); struct tcphdr *t1; -@@ -794,7 +809,10 @@ +@@ -795,7 +810,10 @@ if (key) tot_len += TCPOLEN_MD5SIG_ALIGNED; #endif @@ -6536,7 +6585,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv buff = alloc_skb(MAX_HEADER + sizeof(struct ipv6hdr) + tot_len, GFP_ATOMIC); if (!buff) -@@ -832,6 +850,17 @@ +@@ -833,6 +851,17 @@ tcp_v6_md5_hash_hdr((__u8 *)topt, key, &ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, t1); @@ -6554,7 +6603,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv } #endif -@@ -878,7 +907,7 @@ +@@ -879,7 +908,7 @@ kfree_skb(buff); } @@ -6563,7 +6612,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { const struct tcphdr *th = tcp_hdr(skb); u32 seq = 0, ack_seq = 0; -@@ -941,7 +970,7 @@ +@@ -942,7 +971,7 @@ (th->doff << 2); oif = sk ? sk->sk_bound_dev_if : 0; @@ -6572,7 +6621,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv #ifdef CONFIG_TCP_MD5SIG out: -@@ -950,30 +979,37 @@ +@@ -951,30 +980,37 @@ } static void tcp_v6_send_ack(const struct sock *sk, struct sk_buff *skb, u32 seq, @@ -6617,7 +6666,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { /* sk->sk_state == TCP_LISTEN -> for regular TCP_SYN_RECV * sk->sk_state == TCP_SYN_RECV -> for Fast Open. -@@ -983,18 +1019,18 @@ +@@ -984,18 +1020,18 @@ * exception of segments, MUST be right-shifted by * Rcv.Wind.Shift bits: */ @@ -6640,7 +6689,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { #ifdef CONFIG_SYN_COOKIES const struct tcphdr *th = tcp_hdr(skb); -@@ -1005,7 +1041,7 @@ +@@ -1006,7 +1042,7 @@ return sk; } @@ -6649,7 +6698,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { if (skb->protocol == htons(ETH_P_IP)) return tcp_v4_conn_request(sk, skb); -@@ -1031,11 +1067,11 @@ +@@ -1032,11 +1068,11 @@ sizeof(struct inet6_skb_parm)); } @@ -6666,7 +6715,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { struct inet_request_sock *ireq; struct ipv6_pinfo *newnp; -@@ -1072,7 +1108,15 @@ +@@ -1073,7 +1109,15 @@ newnp->saddr = newsk->sk_v6_rcv_saddr; @@ -6683,7 +6732,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv newsk->sk_backlog_rcv = tcp_v4_do_rcv; #ifdef CONFIG_TCP_MD5SIG newtp->af_specific = &tcp_sock_ipv6_mapped_specific; -@@ -1119,6 +1163,14 @@ +@@ -1120,6 +1164,14 @@ if (!newsk) goto out_nonewsk; @@ -6698,7 +6747,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv /* * No need to charge this sock to the relevant IPv6 refcnt debug socks * count here, tcp_create_openreq_child now does this for us, see the -@@ -1247,7 +1299,7 @@ +@@ -1248,7 +1300,7 @@ * This is because we cannot sleep with the original spinlock * held. */ @@ -6707,7 +6756,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { struct ipv6_pinfo *np = inet6_sk(sk); struct tcp_sock *tp; -@@ -1264,6 +1316,9 @@ +@@ -1265,6 +1317,9 @@ if (skb->protocol == htons(ETH_P_IP)) return tcp_v4_do_rcv(sk, skb); @@ -6717,7 +6766,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv /* * socket locking is here for SMP purposes as backlog rcv * is currently called with bh processing disabled. -@@ -1391,6 +1446,10 @@ +@@ -1392,6 +1447,10 @@ TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + skb->len - th->doff*4); TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); @@ -6728,7 +6777,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); TCP_SKB_CB(skb)->tcp_tw_isn = 0; TCP_SKB_CB(skb)->ip_dsfield = ipv6_get_dsfield(hdr); -@@ -1404,8 +1463,8 @@ +@@ -1405,8 +1464,8 @@ int sdif = inet6_sdif(skb); const struct tcphdr *th; const struct ipv6hdr *hdr; @@ -6738,7 +6787,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv int ret; struct net *net = dev_net(skb->dev); -@@ -1458,12 +1517,42 @@ +@@ -1459,12 +1518,42 @@ reqsk_put(req); goto csum_error; } @@ -6782,7 +6831,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv nsk = NULL; if (!tcp_filter(sk, skb)) { th = (const struct tcphdr *)skb->data; -@@ -1473,10 +1562,14 @@ +@@ -1474,10 +1563,14 @@ } if (!nsk) { reqsk_put(req); @@ -6797,7 +6846,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv tcp_v6_restore_cb(skb); } else if (tcp_child_process(sk, nsk, skb)) { tcp_v6_send_reset(nsk, skb); -@@ -1486,6 +1579,7 @@ +@@ -1487,6 +1580,7 @@ return 0; } } @@ -6805,7 +6854,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv if (hdr->hop_limit < inet6_sk(sk)->min_hopcount) { __NET_INC_STATS(net, LINUX_MIB_TCPMINTTLDROP); goto discard_and_relse; -@@ -1512,15 +1606,25 @@ +@@ -1513,15 +1607,25 @@ sk_incoming_cpu_update(sk); @@ -6835,7 +6884,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv put_and_return: if (refcounted) -@@ -1533,6 +1637,19 @@ +@@ -1534,6 +1638,19 @@ tcp_v6_fill_cb(skb, hdr, th); @@ -6855,7 +6904,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv if (tcp_checksum_complete(skb)) { csum_error: __TCP_INC_STATS(net, TCP_MIB_CSUMERRORS); -@@ -1585,6 +1702,18 @@ +@@ -1586,6 +1703,18 @@ refcounted = false; goto process; } @@ -6874,7 +6923,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv /* Fall through to ACK */ } case TCP_TW_ACK: -@@ -1638,13 +1767,13 @@ +@@ -1639,13 +1768,13 @@ } } @@ -6890,7 +6939,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv .queue_xmit = inet6_csk_xmit, .send_check = tcp_v6_send_check, .rebuild_header = inet6_sk_rebuild_header, -@@ -1675,7 +1804,7 @@ +@@ -1676,7 +1805,7 @@ /* * TCP over IPv4 via INET6 API */ @@ -6899,7 +6948,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv .queue_xmit = ip_queue_xmit, .send_check = tcp_v4_send_check, .rebuild_header = inet_sk_rebuild_header, -@@ -1711,7 +1840,12 @@ +@@ -1712,7 +1841,12 @@ tcp_init_sock(sk); @@ -6913,7 +6962,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv #ifdef CONFIG_TCP_MD5SIG tcp_sk(sk)->af_specific = &tcp_sock_ipv6_specific; -@@ -1720,7 +1854,7 @@ +@@ -1721,7 +1855,7 @@ return 0; } @@ -6922,7 +6971,7 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv { tcp_v4_destroy_sock(sk); inet6_destroy_sock(sk); -@@ -1954,6 +2088,9 @@ +@@ -1955,6 +2089,9 @@ .compat_getsockopt = compat_tcp_getsockopt, #endif .diag_destroy = tcp_abort, @@ -6932,9 +6981,9 @@ diff -aurN linux-4.14.127/net/ipv6/tcp_ipv6.c mptcp-mptcp_v0.94/net/ipv6/tcp_ipv }; /* thinking of making this const? Don't. -diff -aurN linux-4.14.127/net/Kconfig mptcp-mptcp_v0.94/net/Kconfig ---- linux-4.14.127/net/Kconfig 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/Kconfig 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/Kconfig mptcp-mptcp_v0.94/net/Kconfig +--- linux-4.14.174/net/Kconfig 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/Kconfig 2020-03-23 09:45:33.000000000 +0100 @@ -88,6 +88,7 @@ source "net/ipv4/Kconfig" source "net/ipv6/Kconfig" @@ -6943,9 +6992,9 @@ diff -aurN linux-4.14.127/net/Kconfig mptcp-mptcp_v0.94/net/Kconfig endif # if INET -diff -aurN linux-4.14.127/net/Makefile mptcp-mptcp_v0.94/net/Makefile ---- linux-4.14.127/net/Makefile 2019-06-17 19:52:45.000000000 +0200 -+++ mptcp-mptcp_v0.94/net/Makefile 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/Makefile mptcp-mptcp_v0.94/net/Makefile +--- linux-4.14.174/net/Makefile 2020-03-20 10:54:27.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/Makefile 2020-03-23 09:45:33.000000000 +0100 @@ -20,6 +20,7 @@ obj-$(CONFIG_XFRM) += xfrm/ obj-$(CONFIG_UNIX) += unix/ @@ -6954,9 +7003,9 @@ diff -aurN linux-4.14.127/net/Makefile mptcp-mptcp_v0.94/net/Makefile obj-$(CONFIG_PACKET) += packet/ obj-$(CONFIG_NET_KEY) += key/ obj-$(CONFIG_BRIDGE) += bridge/ -diff -aurN linux-4.14.127/net/mptcp/Kconfig mptcp-mptcp_v0.94/net/mptcp/Kconfig ---- linux-4.14.127/net/mptcp/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/Kconfig 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/Kconfig mptcp-mptcp_v0.94/net/mptcp/Kconfig +--- linux-4.14.174/net/mptcp/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/Kconfig 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,129 @@ +# +# MPTCP configuration @@ -7001,7 +7050,7 @@ diff -aurN linux-4.14.127/net/mptcp/Kconfig mptcp-mptcp_v0.94/net/mptcp/Kconfig + +choice + prompt "Default MPTCP Path-Manager" -+ default DEFAULT ++ default DEFAULT_DUMMY + help + Select the Path-Manager of your choice + @@ -7024,7 +7073,7 @@ diff -aurN linux-4.14.127/net/mptcp/Kconfig mptcp-mptcp_v0.94/net/mptcp/Kconfig +config DEFAULT_MPTCP_PM + string + default "default" if DEFAULT_DUMMY -+ default "fullmesh" if DEFAULT_FULLMESH ++ default "fullmesh" if DEFAULT_FULLMESH + default "ndiffports" if DEFAULT_NDIFFPORTS + default "binder" if DEFAULT_BINDER + default "default" @@ -7054,7 +7103,7 @@ diff -aurN linux-4.14.127/net/mptcp/Kconfig mptcp-mptcp_v0.94/net/mptcp/Kconfig + +choice + prompt "Default MPTCP Scheduler" -+ default DEFAULT ++ default DEFAULT_SCHEDULER + help + Select the Scheduler of your choice + @@ -7087,9 +7136,9 @@ diff -aurN linux-4.14.127/net/mptcp/Kconfig mptcp-mptcp_v0.94/net/mptcp/Kconfig + default "redundant" if DEFAULT_REDUNDANT + default "default" + -diff -aurN linux-4.14.127/net/mptcp/Makefile mptcp-mptcp_v0.94/net/mptcp/Makefile ---- linux-4.14.127/net/mptcp/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/Makefile 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/Makefile mptcp-mptcp_v0.94/net/mptcp/Makefile +--- linux-4.14.174/net/mptcp/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/Makefile 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,22 @@ +# +## Makefile for MultiPath TCP support code. @@ -7113,9 +7162,9 @@ diff -aurN linux-4.14.127/net/mptcp/Makefile mptcp-mptcp_v0.94/net/mptcp/Makefil + +mptcp-$(subst m,y,$(CONFIG_IPV6)) += mptcp_ipv6.o + -diff -aurN linux-4.14.127/net/mptcp/mptcp_balia.c mptcp-mptcp_v0.94/net/mptcp/mptcp_balia.c ---- linux-4.14.127/net/mptcp/mptcp_balia.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_balia.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_balia.c mptcp-mptcp_v0.94/net/mptcp/mptcp_balia.c +--- linux-4.14.174/net/mptcp/mptcp_balia.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_balia.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,268 @@ +/* + * MPTCP implementation - Balia Congestion Control @@ -7385,9 +7434,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_balia.c mptcp-mptcp_v0.94/net/mptcp/mp +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP BALIA CONGESTION CONTROL ALGORITHM"); +MODULE_VERSION("0.1"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_binder.c mptcp-mptcp_v0.94/net/mptcp/mptcp_binder.c ---- linux-4.14.127/net/mptcp/mptcp_binder.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_binder.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_binder.c mptcp-mptcp_v0.94/net/mptcp/mptcp_binder.c +--- linux-4.14.174/net/mptcp/mptcp_binder.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_binder.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,490 @@ +#include + @@ -7879,9 +7928,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_binder.c mptcp-mptcp_v0.94/net/mptcp/m +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("BINDER MPTCP"); +MODULE_VERSION("0.1"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_coupled.c mptcp-mptcp_v0.94/net/mptcp/mptcp_coupled.c ---- linux-4.14.127/net/mptcp/mptcp_coupled.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_coupled.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_coupled.c mptcp-mptcp_v0.94/net/mptcp/mptcp_coupled.c +--- linux-4.14.174/net/mptcp/mptcp_coupled.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_coupled.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,271 @@ +/* + * MPTCP implementation - Linked Increase congestion control Algorithm (LIA) @@ -8154,10 +8203,10 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_coupled.c mptcp-mptcp_v0.94/net/mptcp/ +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP LINKED INCREASE CONGESTION CONTROL ALGORITHM"); +MODULE_VERSION("0.1"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ctrl.c ---- linux-4.14.127/net/mptcp/mptcp_ctrl.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ctrl.c 2019-06-17 23:59:30.000000000 +0200 -@@ -0,0 +1,3014 @@ +diff -aurN linux-4.14.174/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ctrl.c +--- linux-4.14.174/net/mptcp/mptcp_ctrl.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ctrl.c 2020-03-23 09:45:33.000000000 +0100 +@@ -0,0 +1,3038 @@ +/* + * MPTCP implementation - MPTCP-control + * @@ -8933,6 +8982,24 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + } +} + ++static int mptcp_set_congestion_control(struct sock *meta_sk, const char *name, ++ bool load, bool reinit, bool cap_net_admin) ++{ ++ int err, result = 0; ++ struct sock *sk_it; ++ ++ result = __tcp_set_congestion_control(meta_sk, name, load, reinit, cap_net_admin); ++ ++ tcp_sk(meta_sk)->mpcb->tcp_ca_explicit_set = true; ++ ++ mptcp_for_each_sk(tcp_sk(meta_sk)->mpcb, sk_it) { ++ err = __tcp_set_congestion_control(sk_it, name, load, reinit, cap_net_admin); ++ if (err) ++ result = err; ++ } ++ return result; ++} ++ +static void mptcp_assign_congestion_control(struct sock *sk) +{ + struct inet_connection_sock *icsk = inet_csk(sk); @@ -8941,8 +9008,11 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + + /* Congestion control is the same as meta. Thus, it has been + * try_module_get'd by tcp_assign_congestion_control. ++ * Congestion control on meta was not explicitly configured by ++ * application, leave default or route based. + */ -+ if (icsk->icsk_ca_ops == ca) ++ if (icsk->icsk_ca_ops == ca || ++ !tcp_sk(mptcp_meta_sk(sk))->mpcb->tcp_ca_explicit_set) + return; + + /* Use the same congestion control as set on the meta-sk */ @@ -8954,6 +9024,7 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + WARN(1, "Could not get the congestion control!"); + return; + } ++ module_put(icsk->icsk_ca_ops->owner); + icsk->icsk_ca_ops = ca; + + /* Clear out private data before diag gets it and @@ -9221,6 +9292,7 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + .retransmit_timer = mptcp_meta_retransmit_timer, + .time_wait = mptcp_time_wait, + .cleanup_rbuf = mptcp_cleanup_rbuf, ++ .set_cong_ctrl = mptcp_set_congestion_control, +}; + +static const struct tcp_sock_ops mptcp_sub_specific = { @@ -9238,6 +9310,7 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + .retransmit_timer = mptcp_sub_retransmit_timer, + .time_wait = tcp_time_wait, + .cleanup_rbuf = tcp_cleanup_rbuf, ++ .set_cong_ctrl = __tcp_set_congestion_control, +}; + +static int mptcp_alloc_mpcb(struct sock *meta_sk, __u64 remote_key, @@ -9261,6 +9334,7 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + goto err_alloc_master; + + master_tp = tcp_sk(master_sk); ++ master_tp->inside_tk_table = 0; + + mpcb = kmem_cache_zalloc(mptcp_cb_cache, GFP_ATOMIC); + if (!mpcb) @@ -9331,7 +9405,6 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + local_bh_enable(); + rcu_read_unlock(); + } -+ master_tp->inside_tk_table = 0; + +#if IS_ENABLED(CONFIG_IPV6) + if (meta_icsk->icsk_af_ops == &mptcp_v6_mapped) { @@ -10312,7 +10385,6 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + u8 hash_mac_check[20]; + + child_tp->out_of_order_queue = RB_ROOT; -+ child_tp->inside_tk_table = 0; + + if (!mopt->join_ack) { + MPTCP_INC_STATS(sock_net(meta_sk), MPTCP_MIB_JOINACKFAIL); @@ -10453,11 +10525,12 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + if (tw->mptcp_tw->in_list) { + list_del_rcu(&tw->mptcp_tw->list); + tw->mptcp_tw->in_list = 0; ++ /* Put, because we added it to the list */ ++ mptcp_mpcb_put(mpcb); + } + spin_unlock(&mpcb->tw_lock); + -+ /* Twice, because we increased it above */ -+ mptcp_mpcb_put(mpcb); ++ /* Second time, because we increased it above */ + mptcp_mpcb_put(mpcb); + } + @@ -11143,7 +11216,7 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt + if (mptcp_register_scheduler(&mptcp_sched_default)) + goto register_sched_failed; + -+ pr_info("MPTCP: Stable release v0.94.6"); ++ pr_info("MPTCP: Stable release v0.94.7"); + + mptcp_init_failed = false; + @@ -11172,9 +11245,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ctrl.c mptcp-mptcp_v0.94/net/mptcp/mpt +mptcp_sock_cache_failed: + mptcp_init_failed = true; +} -diff -aurN linux-4.14.127/net/mptcp/mptcp_fullmesh.c mptcp-mptcp_v0.94/net/mptcp/mptcp_fullmesh.c ---- linux-4.14.127/net/mptcp/mptcp_fullmesh.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_fullmesh.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_fullmesh.c mptcp-mptcp_v0.94/net/mptcp/mptcp_fullmesh.c +--- linux-4.14.174/net/mptcp/mptcp_fullmesh.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_fullmesh.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,2016 @@ +#include +#include @@ -13192,9 +13265,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_fullmesh.c mptcp-mptcp_v0.94/net/mptcp +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Full-Mesh MPTCP"); +MODULE_VERSION("0.88"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_input.c mptcp-mptcp_v0.94/net/mptcp/mptcp_input.c ---- linux-4.14.127/net/mptcp/mptcp_input.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_input.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_input.c mptcp-mptcp_v0.94/net/mptcp/mptcp_input.c +--- linux-4.14.174/net/mptcp/mptcp_input.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_input.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,2475 @@ +/* + * MPTCP implementation - Sending side @@ -15671,9 +15744,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_input.c mptcp-mptcp_v0.94/net/mptcp/mp + tcp_set_rto(sk); + mptcp_set_rto(sk); +} -diff -aurN linux-4.14.127/net/mptcp/mptcp_ipv4.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv4.c ---- linux-4.14.127/net/mptcp/mptcp_ipv4.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv4.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_ipv4.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv4.c +--- linux-4.14.174/net/mptcp/mptcp_ipv4.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv4.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,436 @@ +/* + * MPTCP implementation - IPv4-specific functions @@ -16111,9 +16184,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ipv4.c mptcp-mptcp_v0.94/net/mptcp/mpt + kmem_cache_destroy(mptcp_request_sock_ops.slab); + kfree(mptcp_request_sock_ops.slab_name); +} -diff -aurN linux-4.14.127/net/mptcp/mptcp_ipv6.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv6.c ---- linux-4.14.127/net/mptcp/mptcp_ipv6.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv6.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_ipv6.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv6.c +--- linux-4.14.174/net/mptcp/mptcp_ipv6.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ipv6.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,465 @@ +/* + * MPTCP implementation - IPv6-specific functions @@ -16580,9 +16653,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ipv6.c mptcp-mptcp_v0.94/net/mptcp/mpt + kmem_cache_destroy(mptcp6_request_sock_ops.slab); + kfree(mptcp6_request_sock_ops.slab_name); +} -diff -aurN linux-4.14.127/net/mptcp/mptcp_ndiffports.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ndiffports.c ---- linux-4.14.127/net/mptcp/mptcp_ndiffports.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ndiffports.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_ndiffports.c mptcp-mptcp_v0.94/net/mptcp/mptcp_ndiffports.c +--- linux-4.14.174/net/mptcp/mptcp_ndiffports.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_ndiffports.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,173 @@ +#include + @@ -16757,9 +16830,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_ndiffports.c mptcp-mptcp_v0.94/net/mpt +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("NDIFF-PORTS MPTCP"); +MODULE_VERSION("0.88"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_olia.c mptcp-mptcp_v0.94/net/mptcp/mptcp_olia.c ---- linux-4.14.127/net/mptcp/mptcp_olia.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_olia.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_olia.c mptcp-mptcp_v0.94/net/mptcp/mptcp_olia.c +--- linux-4.14.174/net/mptcp/mptcp_olia.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_olia.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,310 @@ +/* + * MPTCP implementation - OPPORTUNISTIC LINKED INCREASES CONGESTION CONTROL: @@ -17071,9 +17144,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_olia.c mptcp-mptcp_v0.94/net/mptcp/mpt +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("MPTCP COUPLED CONGESTION CONTROL"); +MODULE_VERSION("0.1"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_output.c mptcp-mptcp_v0.94/net/mptcp/mptcp_output.c ---- linux-4.14.127/net/mptcp/mptcp_output.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_output.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_output.c mptcp-mptcp_v0.94/net/mptcp/mptcp_output.c +--- linux-4.14.174/net/mptcp/mptcp_output.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_output.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,1824 @@ +/* + * MPTCP implementation - Sending side @@ -18899,9 +18972,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_output.c mptcp-mptcp_v0.94/net/mptcp/m + return max(xmit_size_goal, mss_now); +} + -diff -aurN linux-4.14.127/net/mptcp/mptcp_pm.c mptcp-mptcp_v0.94/net/mptcp/mptcp_pm.c ---- linux-4.14.127/net/mptcp/mptcp_pm.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_pm.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_pm.c mptcp-mptcp_v0.94/net/mptcp/mptcp_pm.c +--- linux-4.14.174/net/mptcp/mptcp_pm.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_pm.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,226 @@ +/* + * MPTCP implementation - MPTCP-subflow-management @@ -19129,9 +19202,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_pm.c mptcp-mptcp_v0.94/net/mptcp/mptcp + return mptcp_set_default_path_manager(CONFIG_DEFAULT_MPTCP_PM); +} +late_initcall(mptcp_path_manager_default); -diff -aurN linux-4.14.127/net/mptcp/mptcp_redundant.c mptcp-mptcp_v0.94/net/mptcp/mptcp_redundant.c ---- linux-4.14.127/net/mptcp/mptcp_redundant.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_redundant.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_redundant.c mptcp-mptcp_v0.94/net/mptcp/mptcp_redundant.c +--- linux-4.14.174/net/mptcp/mptcp_redundant.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_redundant.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,301 @@ +/* + * MPTCP Scheduler to reduce latency and jitter. @@ -19434,9 +19507,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_redundant.c mptcp-mptcp_v0.94/net/mptc +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("REDUNDANT MPTCP"); +MODULE_VERSION("0.90"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_rr.c mptcp-mptcp_v0.94/net/mptcp/mptcp_rr.c ---- linux-4.14.127/net/mptcp/mptcp_rr.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_rr.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_rr.c mptcp-mptcp_v0.94/net/mptcp/mptcp_rr.c +--- linux-4.14.174/net/mptcp/mptcp_rr.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_rr.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,301 @@ +/* MPTCP Scheduler module selector. Highly inspired by tcp_cong.c */ + @@ -19739,10 +19812,10 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_rr.c mptcp-mptcp_v0.94/net/mptcp/mptcp +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("ROUNDROBIN MPTCP"); +MODULE_VERSION("0.89"); -diff -aurN linux-4.14.127/net/mptcp/mptcp_sched.c mptcp-mptcp_v0.94/net/mptcp/mptcp_sched.c ---- linux-4.14.127/net/mptcp/mptcp_sched.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_sched.c 2019-06-17 23:59:30.000000000 +0200 -@@ -0,0 +1,634 @@ +diff -aurN linux-4.14.174/net/mptcp/mptcp_sched.c mptcp-mptcp_v0.94/net/mptcp/mptcp_sched.c +--- linux-4.14.174/net/mptcp/mptcp_sched.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_sched.c 2020-03-23 09:45:33.000000000 +0100 +@@ -0,0 +1,633 @@ +/* MPTCP Scheduler module selector. Highly inspired by tcp_cong.c */ + +#include @@ -20041,7 +20114,7 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_sched.c mptcp-mptcp_v0.94/net/mptcp/mp + if (tcp_jiffies32 - dsp->last_rbuf_opti < usecs_to_jiffies(tp->srtt_us >> 3)) + goto retrans; + -+ /* Half the cwnd of the slow flow */ ++ /* Half the cwnd of the slow flows */ + mptcp_for_each_tp(tp->mpcb, tp_it) { + if (tp_it != tp && + TCP_SKB_CB(skb_head)->path_mask & mptcp_pi_to_flag(tp_it->mptcp->path_index)) { @@ -20056,7 +20129,6 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_sched.c mptcp-mptcp_v0.94/net/mptcp/mp + + dsp->last_rbuf_opti = tcp_jiffies32; + } -+ //break; + } + } + @@ -20377,9 +20449,9 @@ diff -aurN linux-4.14.127/net/mptcp/mptcp_sched.c mptcp-mptcp_v0.94/net/mptcp/mp + return mptcp_set_default_scheduler(CONFIG_DEFAULT_MPTCP_SCHED); +} +late_initcall(mptcp_scheduler_default); -diff -aurN linux-4.14.127/net/mptcp/mptcp_wvegas.c mptcp-mptcp_v0.94/net/mptcp/mptcp_wvegas.c ---- linux-4.14.127/net/mptcp/mptcp_wvegas.c 1970-01-01 01:00:00.000000000 +0100 -+++ mptcp-mptcp_v0.94/net/mptcp/mptcp_wvegas.c 2019-06-17 23:59:30.000000000 +0200 +diff -aurN linux-4.14.174/net/mptcp/mptcp_wvegas.c mptcp-mptcp_v0.94/net/mptcp/mptcp_wvegas.c +--- linux-4.14.174/net/mptcp/mptcp_wvegas.c 1970-01-01 01:00:00.000000000 +0100 ++++ mptcp-mptcp_v0.94/net/mptcp/mptcp_wvegas.c 2020-03-23 09:45:33.000000000 +0100 @@ -0,0 +1,270 @@ +/* + * MPTCP implementation - WEIGHTED VEGAS