nuttx-mirror/net
meijian d1786507b6 net/tcp_timer: fix tcp RTO abnormally large after retransmission occurs
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>
2024-12-10 22:00:55 +08:00
..
arp net/arp: modify some flow of arp return failure. 2024-09-30 15:43:02 +08:00
bluetooth net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
can net: Copy out also can cmsg data into the end of packet 2024-10-16 15:39:11 +08:00
devif net: Copy out also can cmsg data into the end of packet 2024-10-16 15:39:11 +08:00
icmp net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
icmpv6 net:Compatible with cellular network cards of lladdr generation 2024-11-12 15:17:24 +08:00
ieee802154 net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
igmp net:when work_cancel_sync is excuted,it releases net_lock 2024-10-13 02:05:26 +08:00
inet net: fix inet #14634 regression 2024-11-05 18:36:02 +08:00
ipfilter fix compile warning with implicit declaration of function 'icmp_reply' 2024-10-08 22:30:11 +08:00
ipforward fix compile warning with implicit declaration of function 'icmp_reply' 2024-10-08 22:30:11 +08:00
ipfrag ipfrag:fix warnig 2024-09-12 17:15:13 +08:00
local userspace: Exclude nuttx/arch.h 2024-11-01 16:59:37 +08:00
mld net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
nat net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
neighbor net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
netdev net/netdev/netdev_default.c: Exclude socket can from default devices 2024-10-16 15:39:11 +08:00
netfilter fix compile warning with ipt_sockopt.c and ip6t_sockopt.c: implicit declaration of function 'popcount' 2024-10-08 22:30:11 +08:00
netlink net/netlink: improve comments 2024-11-04 18:18:28 +08:00
pkt net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
procfs net: Move NET_TCP/UDP_HAVE_STACK to netconfig.h 2024-11-21 23:07:30 +08:00
route net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
rpmsg net/rpmsg: Don't set POLLHUP if rpmsg channel has not been established 2024-10-31 15:35:03 +08:00
sixlowpan net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
socket net: fix inet #14634 regression 2024-11-05 18:36:02 +08:00
tcp net/tcp_timer: fix tcp RTO abnormally large after retransmission occurs 2024-12-10 22:00:55 +08:00
udp net: Move NET_TCP/UDP_HAVE_STACK to netconfig.h 2024-11-21 23:07:30 +08:00
usrsock net/usrsock: usrsock supports offload netlink 2024-10-28 19:42:05 +08:00
utils userspace: Exclude nuttx/arch.h 2024-11-01 16:59:37 +08:00
CMakeLists.txt net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
Kconfig usb_cdcmbim: add mbim device driver 2024-08-22 01:56:26 +08:00
Makefile Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00
net_initialize.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00