Jason Xing
f0c10a4497
net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
...
commit e4dd0d3a2f64b8bd8029ec70f52bdbebd0644408 upstream.
In the real workload, I encountered an issue which could cause the RTO
timer to retransmit the skb per 1ms with linear option enabled. The amount
of lost-retransmitted skbs can go up to 1000+ instantly.
The root cause is that if the icsk_rto happens to be zero in the 6th round
(which is the TCP_THIN_LINEAR_RETRIES value), then it will always be zero
due to the changed calculation method in tcp_retransmit_timer() as follows:
icsk->icsk_rto = min(icsk->icsk_rto << 1, TCP_RTO_MAX);
Above line could be converted to
icsk->icsk_rto = min(0 << 1, TCP_RTO_MAX) = 0
Therefore, the timer expires so quickly without any doubt.
I read through the RFC 6298 and found that the RTO value can be rounded
up to a certain value, in Linux, say TCP_RTO_MIN as default, which is
regarded as the lower bound in this patch as suggested by Eric.
Fixes: 36e31b0af5 ("net: TCP thin linear timeouts")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Xing <kernelxing@tencent.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:27:19 +02:00
..
bpfilter
netfilter
treewide: Remove uninitialized_var() usage
2023-06-09 10:29:01 +02:00
af_inet.c
tcp: deny tcp_disconnect() when threads are waiting
2023-06-09 10:28:53 +02:00
ah4.c
arp.c
cipso_ipv4.c
cipso: Fix data-races around sysctl.
2022-07-21 20:59:20 +02:00
datagram.c
devinet.c
esp4.c
esp: limit skb_page_frag_refill use to a single page
2022-07-12 16:30:45 +02:00
esp4_offload.c
xfrm: Linearize the skb after offloading if needed.
2023-06-28 10:18:38 +02:00
fib_frontend.c
ipv4: Fix incorrect table ID in IOCTL path
2023-03-22 13:28:06 +01:00
fib_lookup.h
fib_notifier.c
fib_rules.c
fib_semantics.c
ipv4: Fix incorrect route flushing when source address is deleted
2023-02-22 12:50:38 +01:00
fib_trie.c
ipv4: Fix a data-race around sysctl_fib_sync_mem.
2022-07-21 20:59:21 +02:00
fou.c
gre_demux.c
gre_offload.c
icmp.c
icmp: guard against too small mtu
2023-04-20 12:07:33 +02:00
igmp.c
igmp: Fix data-races around sysctl_igmp_qrv.
2022-08-03 11:59:39 +02:00
inet_connection_sock.c
tcp: deny tcp_disconnect() when threads are waiting
2023-06-09 10:28:53 +02:00
inet_diag.c
inet_fragment.c
inet_hashtables.c
Revert "tcp: avoid the lookup process failing to get sk in ehash table"
2023-07-27 08:37:44 +02:00
inet_timewait_sock.c
Revert "tcp: avoid the lookup process failing to get sk in ehash table"
2023-07-27 08:37:44 +02:00
inetpeer.c
inetpeer: Fix data-races around sysctl.
2022-07-21 20:59:20 +02:00
ip_forward.c
ip_fragment.c
ip_gre.c
ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
2023-05-30 12:44:05 +01:00
ip_input.c
tcp/udp: Make early_demux back namespacified.
2022-11-10 17:57:55 +01:00
ip_options.c
ip_output.c
ipv4: Fix potential uninit variable access bug in __ip_make_skb()
2023-05-17 11:35:45 +02:00
ip_sockglue.c
ipv{4,6}/raw: fix output xfrm lookup wrt protocol
2023-06-05 08:17:33 +02:00
ip_tunnel.c
net: tunnels: annotate lockless accesses to dev->needed_headroom
2023-03-22 13:28:05 +01:00
ip_tunnel_core.c
ip_vti.c
ip_vti: fix potential slab-use-after-free in decode_session6
2023-08-30 16:27:16 +02:00
ipcomp.c
ipconfig.c
ipip.c
ipmr.c
ipmr_base.c
Kconfig
tcp: configurable source port perturb table size
2022-12-08 11:23:00 +01:00
Makefile
metrics.c
ipv4: prevent potential spectre v1 gadget in ip_metrics_convert()
2023-02-06 07:52:45 +01:00
netfilter.c
netlink.c
nexthop.c
nh: fix scope used to find saddr when adding non gw nh
2022-11-03 23:56:56 +09:00
ping.c
ping: fix address binding wrt vrf
2022-05-18 09:47:28 +02:00
proc.c
protocol.c
raw.c
ipv{4,6}/raw: fix output xfrm lookup wrt protocol
2023-06-05 08:17:33 +02:00
raw_diag.c
route.c
ip: Fix data-races around sysctl_ip_fwd_use_pmtu.
2022-07-29 17:14:10 +02:00
syncookies.c
tcp: Fix data-races around sysctl knobs related to SYN option.
2022-07-29 17:14:14 +02:00
sysctl_net_ipv4.c
tcp/udp: Make early_demux back namespacified.
2022-11-10 17:57:55 +01:00
tcp.c
tcp: annotate data-races around fastopenq.max_qlen
2023-07-27 08:37:45 +02:00
tcp_bbr.c
tcp_bic.c
tcp_bpf.c
bpf, sockmap: Fix data loss caused by using apply_bytes on ingress redirect
2023-01-18 11:41:08 +01:00
tcp_cdg.c
tcp: cdg: allow tcp_cdg_release() to be called multiple times
2022-11-25 17:42:21 +01:00
tcp_cong.c
tcp_cubic.c
tcp_dctcp.c
tcp_dctcp.h
tcp_diag.c
tcp_fastopen.c
tcp: annotate data-races around fastopenq.max_qlen
2023-07-27 08:37:45 +02:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c
tcp: annotate data races in __tcp_oow_rate_limited()
2023-07-27 08:37:23 +02:00
tcp_ipv4.c
dccp/tcp: Reset saddr on failure after inet6?_hash_connect().
2022-12-08 11:22:59 +01:00
tcp_lp.c
tcp_metrics.c
tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
2023-08-11 11:53:58 +02:00
tcp_minisocks.c
tcp: tcp_check_req() can be called from process context
2023-03-11 16:44:12 +01:00
tcp_nv.c
tcp_offload.c
tcp_output.c
tcp: tcp_make_synack() can be called from process context
2023-03-22 13:28:04 +01:00
tcp_rate.c
tcp: ensure to use the most recently sent skb when filling the rate sample
2022-05-09 09:03:24 +02:00
tcp_recovery.c
tcp: Fix data-races around sysctl_tcp_recovery.
2022-07-29 17:14:15 +02:00
tcp_scalable.c
tcp_timer.c
net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
2023-08-30 16:27:19 +02:00
tcp_ulp.c
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c
tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct().
2023-04-26 11:24:05 +02:00
udp_diag.c
udp_impl.h
udp_offload.c
udp_tunnel.c
net/tunnel: wait until all sk_user_data reader finish before releasing the sock
2023-01-18 11:41:14 +01:00
udplite.c
udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().
2023-05-30 12:44:09 +01:00
xfrm4_input.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
net: xfrm: unexport __init-annotated xfrm4_protocol_init()
2022-06-14 18:11:58 +02:00
xfrm4_state.c
xfrm4_tunnel.c