3fdcd065cf
when tcp retransmission only double conn->timer in Karn(tcp_timer.c L602), after retransmission in Jacobson M is is now rtt test will become a negative value. ``` signed char m; m = conn->rto - conn->timer; // M is now rtt test /* This is taken directly from VJs original code in his paper */ m = m - (conn->sa >> 3); conn->sa += m; //conn->sa is a negative value if (m < 0) { m = -m; } m = m - (conn->sv >> 2); conn->sv += m; conn->rto = (conn->sa >> 3) + conn->sv; //rto ``` For example,we lost one ack packet, we will set conn->timer = 6 by backoff,conn->rto still 3. After retransmission we will Do RTT estimation, then will get ``` conn->sa = 253 conn->rto = 46 ``` Then if any packets lost it will wait for a long time before triggering a retransmission. Test method. We can reproduce this issue by adding drop ACK packets in tcp_input, and debug conn->rto after Jacobson. Signed-off-by: meijian <meijian@xiaomi.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
Make.defs | ||
tcp.h | ||
tcp_accept.c | ||
tcp_appsend.c | ||
tcp_backlog.c | ||
tcp_callback.c | ||
tcp_cc.c | ||
tcp_close.c | ||
tcp_conn.c | ||
tcp_connect.c | ||
tcp_devpoll.c | ||
tcp_dump.c | ||
tcp_finddev.c | ||
tcp_getsockopt.c | ||
tcp_input.c | ||
tcp_ioctl.c | ||
tcp_ipselect.c | ||
tcp_listen.c | ||
tcp_monitor.c | ||
tcp_netpoll.c | ||
tcp_notifier.c | ||
tcp_recvfrom.c | ||
tcp_recvwindow.c | ||
tcp_send.c | ||
tcp_send_buffered.c | ||
tcp_send_unbuffered.c | ||
tcp_sendfile.c | ||
tcp_seqno.c | ||
tcp_setsockopt.c | ||
tcp_shutdown.c | ||
tcp_timer.c | ||
tcp_txdrain.c | ||
tcp_wrbuffer.c |