diff options
Diffstat (limited to 'SOURCES/cachy-bbr3.patch')
-rw-r--r-- | SOURCES/cachy-bbr3.patch | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/SOURCES/cachy-bbr3.patch b/SOURCES/cachy-bbr3.patch index c714f9d..51633e0 100644 --- a/SOURCES/cachy-bbr3.patch +++ b/SOURCES/cachy-bbr3.patch @@ -1,7 +1,7 @@ -From 3b7e1abbffd80645ae13f4fb033fa0f49a641e27 Mon Sep 17 00:00:00 2001 +From b8584936a7a1eb2149d0c10de2ac05ca7acc5c9f Mon Sep 17 00:00:00 2001 From: Peter Jung <admin@ptr1337.dev> -Date: Fri, 5 Jul 2024 10:31:38 +0200 -Subject: [PATCH 03/10] bbr3 +Date: Sat, 3 Aug 2024 09:32:56 +0200 +Subject: [PATCH 02/12] bbr3 Signed-off-by: Peter Jung <admin@ptr1337.dev> --- @@ -24,10 +24,10 @@ Signed-off-by: Peter Jung <admin@ptr1337.dev> 16 files changed, 1940 insertions(+), 553 deletions(-) diff --git a/include/linux/tcp.h b/include/linux/tcp.h -index 55399ee2a57e..c6193d87a8e6 100644 +index 6a5e08b937b3..27aab715490e 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h -@@ -368,7 +368,9 @@ struct tcp_sock { +@@ -369,7 +369,9 @@ struct tcp_sock { u8 compressed_ack; u8 dup_ack_counter:2, tlp_retrans:1, /* TLP is a retransmission */ @@ -36,10 +36,10 @@ index 55399ee2a57e..c6193d87a8e6 100644 + tlp_orig_data_app_limited:1, /* app-limited before TLP rtx? */ + unused:2; u8 thin_lto : 1,/* Use linear timeouts for thin streams */ - recvmsg_inq : 1,/* Indicate # of bytes in queue upon recvmsg */ fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */ + fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */ diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h -index 146ece8563ca..0217922aa100 100644 +index c0deaafebfdc..d53f042d936e 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h @@ -137,8 +137,8 @@ struct inet_connection_sock { @@ -54,10 +54,10 @@ index 146ece8563ca..0217922aa100 100644 #define ICSK_TIME_RETRANS 1 /* Retransmit timer */ diff --git a/include/net/tcp.h b/include/net/tcp.h -index 2bcf30381d75..54e1af0789b8 100644 +index 32815a40dea1..109b8d1ddc31 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h -@@ -381,6 +381,8 @@ static inline void tcp_dec_quickack_mode(struct sock *sk) +@@ -375,6 +375,8 @@ static inline void tcp_dec_quickack_mode(struct sock *sk) #define TCP_ECN_QUEUE_CWR 2 #define TCP_ECN_DEMAND_CWR 4 #define TCP_ECN_SEEN 8 @@ -66,7 +66,7 @@ index 2bcf30381d75..54e1af0789b8 100644 enum tcp_tw_status { TCP_TW_SUCCESS = 0, -@@ -782,6 +784,15 @@ static inline void tcp_fast_path_check(struct sock *sk) +@@ -779,6 +781,15 @@ static inline void tcp_fast_path_check(struct sock *sk) u32 tcp_delack_max(const struct sock *sk); @@ -82,7 +82,7 @@ index 2bcf30381d75..54e1af0789b8 100644 /* Compute the actual rto_min value */ static inline u32 tcp_rto_min(const struct sock *sk) { -@@ -887,6 +898,11 @@ static inline u32 tcp_stamp_us_delta(u64 t1, u64 t0) +@@ -884,6 +895,11 @@ static inline u32 tcp_stamp_us_delta(u64 t1, u64 t0) return max_t(s64, t1 - t0, 0); } @@ -94,7 +94,7 @@ index 2bcf30381d75..54e1af0789b8 100644 /* provide the departure time in us unit */ static inline u64 tcp_skb_timestamp_us(const struct sk_buff *skb) { -@@ -975,9 +991,14 @@ struct tcp_skb_cb { +@@ -973,9 +989,14 @@ struct tcp_skb_cb { /* pkts S/ACKed so far upon tx of skb, incl retrans: */ __u32 delivered; /* start of send pipeline phase */ @@ -111,7 +111,7 @@ index 2bcf30381d75..54e1af0789b8 100644 } tx; /* only used for outgoing skbs */ union { struct inet_skb_parm h4; -@@ -1081,6 +1102,7 @@ enum tcp_ca_event { +@@ -1079,6 +1100,7 @@ enum tcp_ca_event { CA_EVENT_LOSS, /* loss timeout */ CA_EVENT_ECN_NO_CE, /* ECT set, but not CE marked */ CA_EVENT_ECN_IS_CE, /* received CE marked IP packet */ @@ -119,7 +119,7 @@ index 2bcf30381d75..54e1af0789b8 100644 }; /* Information about inbound ACK, passed to cong_ops->in_ack_event() */ -@@ -1103,7 +1125,11 @@ enum tcp_ca_ack_event_flags { +@@ -1101,7 +1123,11 @@ enum tcp_ca_ack_event_flags { #define TCP_CONG_NON_RESTRICTED 0x1 /* Requires ECN/ECT set on all packets */ #define TCP_CONG_NEEDS_ECN 0x2 @@ -132,7 +132,7 @@ index 2bcf30381d75..54e1af0789b8 100644 union tcp_cc_info; -@@ -1123,10 +1149,13 @@ struct ack_sample { +@@ -1121,10 +1147,13 @@ struct ack_sample { */ struct rate_sample { u64 prior_mstamp; /* starting timestamp for interval */ @@ -147,7 +147,7 @@ index 2bcf30381d75..54e1af0789b8 100644 long interval_us; /* time for tp->delivered to incr "delivered" */ u32 snd_interval_us; /* snd interval for delivered packets */ u32 rcv_interval_us; /* rcv interval for delivered packets */ -@@ -1137,7 +1166,9 @@ struct rate_sample { +@@ -1135,7 +1164,9 @@ struct rate_sample { u32 last_end_seq; /* end_seq of most recently ACKed packet */ bool is_app_limited; /* is sample from packet with bubble in pipe? */ bool is_retrans; /* is sample from retransmission? */ @@ -157,7 +157,7 @@ index 2bcf30381d75..54e1af0789b8 100644 }; struct tcp_congestion_ops { -@@ -1161,8 +1192,11 @@ struct tcp_congestion_ops { +@@ -1159,8 +1190,11 @@ struct tcp_congestion_ops { /* hook for packet ack accounting (optional) */ void (*pkts_acked)(struct sock *sk, const struct ack_sample *sample); @@ -171,7 +171,7 @@ index 2bcf30381d75..54e1af0789b8 100644 /* call when packets are delivered to update cwnd and pacing rate, * after all the ca_state processing. (optional) -@@ -1228,6 +1262,14 @@ static inline char *tcp_ca_get_name_by_key(u32 key, char *buffer) +@@ -1226,6 +1260,14 @@ static inline char *tcp_ca_get_name_by_key(u32 key, char *buffer) } #endif @@ -186,7 +186,7 @@ index 2bcf30381d75..54e1af0789b8 100644 static inline bool tcp_ca_needs_ecn(const struct sock *sk) { const struct inet_connection_sock *icsk = inet_csk(sk); -@@ -1247,6 +1289,7 @@ static inline void tcp_ca_event(struct sock *sk, const enum tcp_ca_event event) +@@ -1245,6 +1287,7 @@ static inline void tcp_ca_event(struct sock *sk, const enum tcp_ca_event event) void tcp_set_ca_state(struct sock *sk, const u8 ca_state); /* From tcp_rate.c */ @@ -194,7 +194,7 @@ index 2bcf30381d75..54e1af0789b8 100644 void tcp_rate_skb_sent(struct sock *sk, struct sk_buff *skb); void tcp_rate_skb_delivered(struct sock *sk, struct sk_buff *skb, struct rate_sample *rs); -@@ -1259,6 +1302,21 @@ static inline bool tcp_skb_sent_after(u64 t1, u64 t2, u32 seq1, u32 seq2) +@@ -1257,6 +1300,21 @@ static inline bool tcp_skb_sent_after(u64 t1, u64 t2, u32 seq1, u32 seq2) return t1 > t2 || (t1 == t2 && after(seq1, seq2)); } @@ -216,7 +216,7 @@ index 2bcf30381d75..54e1af0789b8 100644 /* These functions determine how the current flow behaves in respect of SACK * handling. SACK is negotiated with the peer, and therefore it can vary * between different flows. -@@ -2417,7 +2475,7 @@ struct tcp_plb_state { +@@ -2419,7 +2477,7 @@ struct tcp_plb_state { u8 consec_cong_rounds:5, /* consecutive congested rounds */ unused:3; u32 pause_until; /* jiffies32 when PLB can resume rerouting */ @@ -280,10 +280,10 @@ index 3b687d20c9ed..a7c30c243b54 100644 struct rta_session { __u8 proto; diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h -index c07e9f90c084..5c88336ced60 100644 +index dbf896f3146c..4702cd2f1ffc 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h -@@ -176,6 +176,7 @@ enum tcp_fastopen_client_fail { +@@ -178,6 +178,7 @@ enum tcp_fastopen_client_fail { #define TCPI_OPT_ECN_SEEN 16 /* we received at least one packet with ECT */ #define TCPI_OPT_SYN_DATA 32 /* SYN-ACK acked data in SYN sent or rcvd */ #define TCPI_OPT_USEC_TS 64 /* usec timestamps */ @@ -324,10 +324,10 @@ index 8e94ed7c56a0..50dc9970cad2 100644 choice prompt "Default TCP congestion control" diff --git a/net/ipv4/bpf_tcp_ca.c b/net/ipv4/bpf_tcp_ca.c -index 7f518ea5f4ac..8f9b677c20e1 100644 +index 18227757ec0c..f180befc28bd 100644 --- a/net/ipv4/bpf_tcp_ca.c +++ b/net/ipv4/bpf_tcp_ca.c -@@ -302,11 +302,15 @@ static void bpf_tcp_ca_pkts_acked(struct sock *sk, const struct ack_sample *samp +@@ -305,11 +305,15 @@ static void bpf_tcp_ca_pkts_acked(struct sock *sk, const struct ack_sample *samp { } @@ -341,10 +341,10 @@ index 7f518ea5f4ac..8f9b677c20e1 100644 +{ +} + - static void bpf_tcp_ca_cong_control(struct sock *sk, const struct rate_sample *rs) + static void bpf_tcp_ca_cong_control(struct sock *sk, u32 ack, int flag, + const struct rate_sample *rs) { - } -@@ -336,7 +340,8 @@ static struct tcp_congestion_ops __bpf_ops_tcp_congestion_ops = { +@@ -340,7 +344,8 @@ static struct tcp_congestion_ops __bpf_ops_tcp_congestion_ops = { .cwnd_event = bpf_tcp_ca_cwnd_event, .in_ack_event = bpf_tcp_ca_in_ack_event, .pkts_acked = bpf_tcp_ca_pkts_acked, @@ -355,10 +355,10 @@ index 7f518ea5f4ac..8f9b677c20e1 100644 .undo_cwnd = bpf_tcp_ca_undo_cwnd, .sndbuf_expand = bpf_tcp_ca_sndbuf_expand, diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c -index 77ee1eda3fd8..b3d43b2b8617 100644 +index ec6911034138..df7731a30198 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c -@@ -3099,6 +3099,7 @@ int tcp_disconnect(struct sock *sk, int flags) +@@ -3120,6 +3120,7 @@ int tcp_disconnect(struct sock *sk, int flags) tp->rx_opt.dsack = 0; tp->rx_opt.num_sacks = 0; tp->rcv_ooopack = 0; @@ -366,7 +366,7 @@ index 77ee1eda3fd8..b3d43b2b8617 100644 /* Clean up fastopen related fields */ -@@ -3825,6 +3826,8 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info) +@@ -3846,6 +3847,8 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info) info->tcpi_options |= TCPI_OPT_ECN; if (tp->ecn_flags & TCP_ECN_SEEN) info->tcpi_options |= TCPI_OPT_ECN_SEEN; @@ -376,7 +376,7 @@ index 77ee1eda3fd8..b3d43b2b8617 100644 info->tcpi_options |= TCPI_OPT_SYN_DATA; if (tp->tcp_usec_ts) diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c -index 05dc2d05bc7c..61ed3e549350 100644 +index 760941e55153..a180fa648d5e 100644 --- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c @@ -1,18 +1,19 @@ @@ -1549,7 +1549,7 @@ index 05dc2d05bc7c..61ed3e549350 100644 + return 3; } --__bpf_kfunc static void bbr_main(struct sock *sk, const struct rate_sample *rs) +-__bpf_kfunc static void bbr_main(struct sock *sk, u32 ack, int flag, const struct rate_sample *rs) +/* Incorporate a new bw sample into the current window of our max filter. */ +static void bbr_take_max_bw_sample(struct sock *sk, u32 bw) { @@ -2651,7 +2651,7 @@ index 05dc2d05bc7c..61ed3e549350 100644 + return false; +} + -+__bpf_kfunc static void bbr_main(struct sock *sk, const struct rate_sample *rs) ++__bpf_kfunc static void bbr_main(struct sock *sk, u32 ack, int flag, const struct rate_sample *rs) +{ + struct tcp_sock *tp = tcp_sk(sk); + struct bbr *bbr = inet_csk_ca(sk); @@ -2993,7 +2993,7 @@ index 05dc2d05bc7c..61ed3e549350 100644 .get_info = bbr_get_info, .set_state = bbr_set_state, }; -@@ -1161,10 +2361,11 @@ BTF_KFUNCS_START(tcp_bbr_check_kfunc_ids) +@@ -1159,10 +2359,11 @@ BTF_KFUNCS_START(tcp_bbr_check_kfunc_ids) BTF_ID_FLAGS(func, bbr_init) BTF_ID_FLAGS(func, bbr_main) BTF_ID_FLAGS(func, bbr_sndbuf_expand) @@ -3004,9 +3004,9 @@ index 05dc2d05bc7c..61ed3e549350 100644 -BTF_ID_FLAGS(func, bbr_min_tso_segs) +BTF_ID_FLAGS(func, bbr_tso_segs) BTF_ID_FLAGS(func, bbr_set_state) - #endif - #endif -@@ -1199,5 +2400,12 @@ MODULE_AUTHOR("Van Jacobson <vanj@google.com>"); + BTF_KFUNCS_END(tcp_bbr_check_kfunc_ids) + +@@ -1195,5 +2396,12 @@ MODULE_AUTHOR("Van Jacobson <vanj@google.com>"); MODULE_AUTHOR("Neal Cardwell <ncardwell@google.com>"); MODULE_AUTHOR("Yuchung Cheng <ycheng@google.com>"); MODULE_AUTHOR("Soheil Hassas Yeganeh <soheil@google.com>"); @@ -3032,10 +3032,10 @@ index 28ffcfbeef14..7b13915ba288 100644 icsk->icsk_ca_ops->init(sk); if (tcp_ca_needs_ecn(sk)) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c -index 7b692bcb61d4..650db0ec7222 100644 +index 570e87ad9a56..c539ac50f7a6 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -364,7 +364,7 @@ static void __tcp_ecn_check_ce(struct sock *sk, const struct sk_buff *skb) +@@ -365,7 +365,7 @@ static void __tcp_ecn_check_ce(struct sock *sk, const struct sk_buff *skb) tcp_enter_quickack_mode(sk, 2); break; case INET_ECN_CE: @@ -3044,7 +3044,7 @@ index 7b692bcb61d4..650db0ec7222 100644 tcp_ca_event(sk, CA_EVENT_ECN_IS_CE); if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) { -@@ -375,7 +375,7 @@ static void __tcp_ecn_check_ce(struct sock *sk, const struct sk_buff *skb) +@@ -376,7 +376,7 @@ static void __tcp_ecn_check_ce(struct sock *sk, const struct sk_buff *skb) tp->ecn_flags |= TCP_ECN_SEEN; break; default: @@ -3053,7 +3053,7 @@ index 7b692bcb61d4..650db0ec7222 100644 tcp_ca_event(sk, CA_EVENT_ECN_NO_CE); tp->ecn_flags |= TCP_ECN_SEEN; break; -@@ -1112,7 +1112,12 @@ static void tcp_verify_retransmit_hint(struct tcp_sock *tp, struct sk_buff *skb) +@@ -1115,7 +1115,12 @@ static void tcp_verify_retransmit_hint(struct tcp_sock *tp, struct sk_buff *skb) */ static void tcp_notify_skb_loss_event(struct tcp_sock *tp, const struct sk_buff *skb) { @@ -3066,7 +3066,7 @@ index 7b692bcb61d4..650db0ec7222 100644 } void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb) -@@ -1493,6 +1498,17 @@ static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, +@@ -1496,6 +1501,17 @@ static bool tcp_shifted_skb(struct sock *sk, struct sk_buff *prev, WARN_ON_ONCE(tcp_skb_pcount(skb) < pcount); tcp_skb_pcount_add(skb, -pcount); @@ -3084,7 +3084,7 @@ index 7b692bcb61d4..650db0ec7222 100644 /* When we're adding to gso_segs == 1, gso_size will be zero, * in theory this shouldn't be necessary but as long as DSACK * code can come after this skb later on it's better to keep -@@ -3778,7 +3794,8 @@ static void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq) +@@ -3790,7 +3806,8 @@ static void tcp_replace_ts_recent(struct tcp_sock *tp, u32 seq) /* This routine deals with acks during a TLP episode and ends an episode by * resetting tlp_high_seq. Ref: TLP algorithm in draft-ietf-tcpm-rack */ @@ -3094,7 +3094,7 @@ index 7b692bcb61d4..650db0ec7222 100644 { struct tcp_sock *tp = tcp_sk(sk); -@@ -3795,6 +3812,7 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) +@@ -3807,6 +3824,7 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) /* ACK advances: there was a loss, so reduce cwnd. Reset * tlp_high_seq in tcp_init_cwnd_reduction() */ @@ -3102,7 +3102,7 @@ index 7b692bcb61d4..650db0ec7222 100644 tcp_init_cwnd_reduction(sk); tcp_set_ca_state(sk, TCP_CA_CWR); tcp_end_cwnd_reduction(sk); -@@ -3805,6 +3823,11 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) +@@ -3817,6 +3835,11 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag) FLAG_NOT_DUP | FLAG_DATA_SACKED))) { /* Pure dupack: original and TLP probe arrived; no loss */ tp->tlp_high_seq = 0; @@ -3114,7 +3114,7 @@ index 7b692bcb61d4..650db0ec7222 100644 } } -@@ -3913,6 +3936,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) +@@ -3925,6 +3948,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) prior_fack = tcp_is_sack(tp) ? tcp_highest_sack_seq(tp) : tp->snd_una; rs.prior_in_flight = tcp_packets_in_flight(tp); @@ -3122,7 +3122,7 @@ index 7b692bcb61d4..650db0ec7222 100644 /* ts_recent update must be made after we are sure that the packet * is in window. -@@ -3987,7 +4011,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) +@@ -3999,7 +4023,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) tcp_rack_update_reo_wnd(sk, &rs); if (tp->tlp_high_seq) @@ -3131,7 +3131,7 @@ index 7b692bcb61d4..650db0ec7222 100644 if (tcp_ack_is_dubious(sk, flag)) { if (!(flag & (FLAG_SND_UNA_ADVANCED | -@@ -4011,6 +4035,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) +@@ -4023,6 +4047,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) delivered = tcp_newly_delivered(sk, delivered, flag); lost = tp->lost - lost; /* freshly marked lost */ rs.is_ack_delayed = !!(flag & FLAG_ACK_MAYBE_DELAYED); @@ -3139,7 +3139,7 @@ index 7b692bcb61d4..650db0ec7222 100644 tcp_rate_gen(sk, delivered, lost, is_sack_reneg, sack_state.rate); tcp_cong_control(sk, ack, delivered, flag, sack_state.rate); tcp_xmit_recovery(sk, rexmit); -@@ -4030,7 +4055,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) +@@ -4042,7 +4067,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) tcp_ack_probe(sk); if (tp->tlp_high_seq) @@ -3148,7 +3148,7 @@ index 7b692bcb61d4..650db0ec7222 100644 return 1; old_ack: -@@ -5688,13 +5713,14 @@ static void __tcp_ack_snd_check(struct sock *sk, int ofo_possible) +@@ -5714,13 +5739,14 @@ static void __tcp_ack_snd_check(struct sock *sk, int ofo_possible) /* More than one full frame received... */ if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss && @@ -3166,7 +3166,7 @@ index 7b692bcb61d4..650db0ec7222 100644 tcp_in_quickack_mode(sk) || /* Protocol state mandates a one-time immediate ACK */ diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c -index f0761f060a83..90a9389499e6 100644 +index 0fbebf6266e9..6eb1d369c584 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -460,6 +460,8 @@ void tcp_ca_openreq_child(struct sock *sk, const struct dst_entry *dst) @@ -3179,10 +3179,10 @@ index f0761f060a83..90a9389499e6 100644 const struct tcp_congestion_ops *ca; diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c -index 02caeb7bcf63..0e445bc5cc60 100644 +index 95618d0e78e4..3f4bdd2b6476 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c -@@ -332,10 +332,9 @@ static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) +@@ -336,10 +336,9 @@ static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) bool bpf_needs_ecn = tcp_bpf_ca_needs_ecn(sk); bool use_ecn = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_ecn) == 1 || tcp_ca_needs_ecn(sk) || bpf_needs_ecn; @@ -3194,7 +3194,7 @@ index 02caeb7bcf63..0e445bc5cc60 100644 if (dst && dst_feature(dst, RTAX_FEATURE_ECN)) use_ecn = true; } -@@ -347,6 +346,9 @@ static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) +@@ -351,6 +350,9 @@ static void tcp_ecn_send_syn(struct sock *sk, struct sk_buff *skb) tp->ecn_flags = TCP_ECN_OK; if (tcp_ca_needs_ecn(sk) || bpf_needs_ecn) INET_ECN_xmit(sk); @@ -3204,7 +3204,7 @@ index 02caeb7bcf63..0e445bc5cc60 100644 } } -@@ -384,7 +386,8 @@ static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb, +@@ -388,7 +390,8 @@ static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb, th->cwr = 1; skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; } @@ -3214,7 +3214,7 @@ index 02caeb7bcf63..0e445bc5cc60 100644 /* ACK or retransmitted segment: clear ECT|CE */ INET_ECN_dontxmit(sk); } -@@ -1593,7 +1596,7 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, +@@ -1601,7 +1604,7 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, { struct tcp_sock *tp = tcp_sk(sk); struct sk_buff *buff; @@ -3223,7 +3223,7 @@ index 02caeb7bcf63..0e445bc5cc60 100644 long limit; int nlen; u8 flags; -@@ -1668,6 +1671,30 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, +@@ -1676,6 +1679,30 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, if (diff) tcp_adjust_pcount(sk, skb, diff); @@ -3254,7 +3254,7 @@ index 02caeb7bcf63..0e445bc5cc60 100644 } /* Link BUFF into the send queue. */ -@@ -2025,13 +2052,12 @@ static u32 tcp_tso_autosize(const struct sock *sk, unsigned int mss_now, +@@ -2033,13 +2060,12 @@ static u32 tcp_tso_autosize(const struct sock *sk, unsigned int mss_now, static u32 tcp_tso_segs(struct sock *sk, unsigned int mss_now) { const struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops; @@ -3273,7 +3273,7 @@ index 02caeb7bcf63..0e445bc5cc60 100644 return min_t(u32, tso_segs, sk->sk_gso_max_segs); } -@@ -2731,6 +2757,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, +@@ -2767,6 +2793,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, skb_set_delivery_time(skb, tp->tcp_wstamp_ns, true); list_move_tail(&skb->tcp_tsorted_anchor, &tp->tsorted_sent_queue); tcp_init_tso_segs(skb, mss_now); @@ -3281,7 +3281,7 @@ index 02caeb7bcf63..0e445bc5cc60 100644 goto repair; /* Skip network transmission */ } -@@ -2944,6 +2971,7 @@ void tcp_send_loss_probe(struct sock *sk) +@@ -2981,6 +3008,7 @@ void tcp_send_loss_probe(struct sock *sk) if (WARN_ON(!skb || !tcp_skb_pcount(skb))) goto rearm_timer; @@ -3370,10 +3370,10 @@ index a8f6d9d06f2e..8737f2134648 100644 rs->interval_us = max(snd_us, ack_us); diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c -index f96f68cf7961..af0ce59fbbc0 100644 +index 4d40615dc8fc..f27941201ef2 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c -@@ -682,6 +682,7 @@ void tcp_write_timer_handler(struct sock *sk) +@@ -689,6 +689,7 @@ void tcp_write_timer_handler(struct sock *sk) return; } @@ -3382,5 +3382,5 @@ index f96f68cf7961..af0ce59fbbc0 100644 event = icsk->icsk_pending; -- -2.45.2 +2.46.0.rc1 |