@@ -904,8 +904,6 @@ static void tcp_update_reordering(struct sock *sk, const int metric,
904904 tcp_disable_fack (tp );
905905 }
906906
907- if (metric > 0 )
908- tcp_disable_early_retrans (tp );
909907 tp -> rack .reord = 1 ;
910908}
911909
@@ -2054,30 +2052,6 @@ static inline int tcp_dupack_heuristics(const struct tcp_sock *tp)
20542052 return tcp_is_fack (tp ) ? tp -> fackets_out : tp -> sacked_out + 1 ;
20552053}
20562054
2057- static bool tcp_pause_early_retransmit (struct sock * sk , int flag )
2058- {
2059- struct tcp_sock * tp = tcp_sk (sk );
2060- unsigned long delay ;
2061-
2062- /* Delay early retransmit and entering fast recovery for
2063- * max(RTT/4, 2msec) unless ack has ECE mark, no RTT samples
2064- * available, or RTO is scheduled to fire first.
2065- */
2066- if (sysctl_tcp_early_retrans < 2 || sysctl_tcp_early_retrans > 3 ||
2067- (flag & FLAG_ECE ) || !tp -> srtt_us )
2068- return false;
2069-
2070- delay = max (usecs_to_jiffies (tp -> srtt_us >> 5 ),
2071- msecs_to_jiffies (2 ));
2072-
2073- if (!time_after (inet_csk (sk )-> icsk_timeout , (jiffies + delay )))
2074- return false;
2075-
2076- inet_csk_reset_xmit_timer (sk , ICSK_TIME_EARLY_RETRANS , delay ,
2077- TCP_RTO_MAX );
2078- return true;
2079- }
2080-
20812055/* Linux NewReno/SACK/FACK/ECN state machine.
20822056 * --------------------------------------
20832057 *
@@ -2221,16 +2195,6 @@ static bool tcp_time_to_recover(struct sock *sk, int flag)
22212195 tcp_is_sack (tp ) && !tcp_send_head (sk ))
22222196 return true;
22232197
2224- /* Trick#6: TCP early retransmit, per RFC5827. To avoid spurious
2225- * retransmissions due to small network reorderings, we implement
2226- * Mitigation A.3 in the RFC and delay the retransmission for a short
2227- * interval if appropriate.
2228- */
2229- if (tp -> do_early_retrans && !tp -> retrans_out && tp -> sacked_out &&
2230- (tp -> packets_out >= (tp -> sacked_out + 1 ) && tp -> packets_out < 4 ) &&
2231- !tcp_may_send_now (sk ))
2232- return !tcp_pause_early_retransmit (sk , flag );
2233-
22342198 return false;
22352199}
22362200
@@ -3050,8 +3014,7 @@ void tcp_rearm_rto(struct sock *sk)
30503014 } else {
30513015 u32 rto = inet_csk (sk )-> icsk_rto ;
30523016 /* Offset the time elapsed after installing regular RTO */
3053- if (icsk -> icsk_pending == ICSK_TIME_EARLY_RETRANS ||
3054- icsk -> icsk_pending == ICSK_TIME_REO_TIMEOUT ||
3017+ if (icsk -> icsk_pending == ICSK_TIME_REO_TIMEOUT ||
30553018 icsk -> icsk_pending == ICSK_TIME_LOSS_PROBE ) {
30563019 struct sk_buff * skb = tcp_write_queue_head (sk );
30573020 const u32 rto_time_stamp =
@@ -3068,24 +3031,6 @@ void tcp_rearm_rto(struct sock *sk)
30683031 }
30693032}
30703033
3071- /* This function is called when the delayed ER timer fires. TCP enters
3072- * fast recovery and performs fast-retransmit.
3073- */
3074- void tcp_resume_early_retransmit (struct sock * sk )
3075- {
3076- struct tcp_sock * tp = tcp_sk (sk );
3077-
3078- tcp_rearm_rto (sk );
3079-
3080- /* Stop if ER is disabled after the delayed ER timer is scheduled */
3081- if (!tp -> do_early_retrans )
3082- return ;
3083-
3084- tcp_enter_recovery (sk , false);
3085- tcp_update_scoreboard (sk , 1 );
3086- tcp_xmit_retransmit_queue (sk );
3087- }
3088-
30893034/* If we get here, the whole TSO packet has not been acked. */
30903035static u32 tcp_tso_acked (struct sock * sk , struct sk_buff * skb )
30913036{
@@ -3651,8 +3596,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
36513596
36523597 skb_mstamp_get (& sack_state .ack_time );
36533598
3654- if (icsk -> icsk_pending == ICSK_TIME_EARLY_RETRANS ||
3655- icsk -> icsk_pending == ICSK_TIME_LOSS_PROBE )
3599+ if (icsk -> icsk_pending == ICSK_TIME_LOSS_PROBE )
36563600 tcp_rearm_rto (sk );
36573601
36583602 if (after (ack , prior_snd_una )) {
0 commit comments