Tcp timeout adujustment

how to edit tcp timeout?
I have found the way on internet( LinuxのTCP SYNの再送間隔の初期値が3秒から1秒に変更されていた - 元RX-7乗りの適当な日々 ) but they said have to fixed in tcp.h file. I cannot found tcp.h file on my OS.

If anyone know please tell me where is it??

did you check the yocto source code?


owner@CNHKG-EX-001367:~/Yocto/WP76/R17_SWI9X07Y_03.01.07.00/yocto$ find ./kernel -name "tcp.h"
./kernel/include/uapi/linux/tcp.h
./kernel/include/linux/tcp.h
./kernel/include/net/tcp.h
./kernel/fs/ocfs2/cluster/tcp.h
./kernel/net/rds/tcp.h

So, If I want to edit tcp.h file,I have to install os to the board again??
Does it have anyway to edit without install new os??

Yes, you need to rebuild the yocto linux if you edit the tcp.h.

for alternative way, does this help?

I saw there are many TCP setting:


root@swi-mdm9x28-wp:~# ls /proc/sys/net/ipv4/
cipso_cache_bucket_size            tcp_early_retrans
cipso_cache_enable                 tcp_ecn
cipso_rbm_optfmt                   tcp_fack
cipso_rbm_strictvalid              tcp_fastopen
conf                               tcp_fastopen_key
fwmark_reflect                     tcp_fin_timeout
icmp_echo_ignore_all               tcp_frto
icmp_echo_ignore_broadcasts        tcp_fwmark_accept
icmp_errors_use_inbound_ifaddr     tcp_keepalive_intvl
icmp_ignore_bogus_error_responses  tcp_keepalive_probes
icmp_msgs_burst                    tcp_keepalive_time
icmp_msgs_per_sec                  tcp_limit_output_bytes
icmp_ratelimit                     tcp_low_latency
icmp_ratemask                      tcp_max_orphans
igmp_max_memberships               tcp_max_syn_backlog
igmp_max_msf                       tcp_max_tw_buckets
igmp_qrv                           tcp_mem
inet_peer_maxttl                   tcp_min_snd_mss
inet_peer_minttl                   tcp_min_tso_segs
inet_peer_threshold                tcp_moderate_rcvbuf
ip_default_ttl                     tcp_mtu_probing
ip_dynaddr                         tcp_no_metrics_save
ip_early_demux                     tcp_notsent_lowat
ip_forward                         tcp_orphan_retries
ip_forward_use_pmtu                tcp_reordering
ip_local_port_range                tcp_retrans_collapse
ip_local_reserved_ports            tcp_retries1
ip_no_pmtu_disc                    tcp_retries2
ip_nonlocal_bind                   tcp_rfc1337
ipfrag_high_thresh                 tcp_rmem
ipfrag_low_thresh                  tcp_sack
ipfrag_max_dist                    tcp_slow_start_after_idle
ipfrag_secret_interval             tcp_stdurg
ipfrag_time                        tcp_syn_retries
neigh                              tcp_synack_retries
netfilter                          tcp_syncookies
ping_group_range                   tcp_thin_dupack
reserved_port_bind                 tcp_thin_linear_timeouts
route                              tcp_timestamps
tcp_abort_on_overflow              tcp_tso_win_divisor
tcp_adv_win_scale                  tcp_tw_recycle
tcp_allowed_congestion_control     tcp_tw_reuse
tcp_app_win                        tcp_use_userconfig
tcp_autocorking                    tcp_window_scaling
tcp_available_congestion_control   tcp_wmem
tcp_base_mss                       tcp_workaround_signed_windows
tcp_challenge_ack_limit            udp_mem
tcp_congestion_control             udp_rmem_min
tcp_default_init_rwnd              udp_wmem_min
tcp_delack_seg                     xfrm4_gc_thresh
tcp_dsack

There don’t have tcp_tw_timeout to setting as the link had used.

How about tcp_fin_timeout or tcp_thin_linear_timeouts?

If they don’t help, maybe you need to rebuild the yocto linux for editing the tcp.h.