Re: [PATCH net-next 1/2] tcp: don't extend RTO on failed loss probe attempts
On Fri, Jul 17, 2015 at 10:27 PM, Eric Dumazet eric.duma...@gmail.com wrote: On Fri, 2015-07-17 at 14:22 -0700, Yuchung Cheng wrote: If TLP was unable to send a probe, it extended the RTO to now + icsk_rto. But extending the RTO makes little sense if no TLP probe went out. With this commit, instead of extending the RTO we re-arm it relative to the transmit time of the write queue head. But what was the reason the probe could not be sent ? If it is local congestion or memory allocation error, it does make sense to not add fuel to the fire. Good point. We can identify those so we don't attempt to retransmit on these errors, but will retransmit on receive-window limit. I'll re-spin the patch. -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 1/2] tcp: don't extend RTO on failed loss probe attempts
On Fri, 2015-07-17 at 14:22 -0700, Yuchung Cheng wrote: If TLP was unable to send a probe, it extended the RTO to now + icsk_rto. But extending the RTO makes little sense if no TLP probe went out. With this commit, instead of extending the RTO we re-arm it relative to the transmit time of the write queue head. But what was the reason the probe could not be sent ? If it is local congestion or memory allocation error, it does make sense to not add fuel to the fire. -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH net-next 1/2] tcp: don't extend RTO on failed loss probe attempts
If TLP was unable to send a probe, it extended the RTO to now + icsk_rto. But extending the RTO makes little sense if no TLP probe went out. With this commit, instead of extending the RTO we re-arm it relative to the transmit time of the write queue head. Signed-off-by: Yuchung Cheng ych...@google.com Signed-off-by: Neal Cardwell ncardw...@google.com --- net/ipv4/tcp_output.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 7105784..deb944b 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2275,13 +2275,12 @@ void tcp_send_loss_probe(struct sock *sk) tp-tlp_high_seq = tp-snd_nxt; rearm_timer: - inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, - inet_csk(sk)-icsk_rto, - TCP_RTO_MAX); - - if (likely(!err)) - NET_INC_STATS_BH(sock_net(sk), -LINUX_MIB_TCPLOSSPROBES); + if (likely(!err)) { + /* Reset s.t. tcp_rearm_rto will restart timer from now */ + inet_csk(sk)-icsk_pending = 0; + NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPLOSSPROBES); + } + tcp_rearm_rto(sk); } /* Push out any pending frames which were held back due to -- 2.4.3.573.g4eafbef -- To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html