mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
tcp: add tcp_comp_sack_delay_ns sysctl
This per netns sysctl allows for TCP SACK compression fine-tuning. Its default value is 1,000,000, or 1 ms to meet TSO autosizing period. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
200d95f457
commit
6d82aa2420
5 changed files with 18 additions and 2 deletions
|
@ -5113,13 +5113,13 @@ send_now:
|
|||
if (hrtimer_is_queued(&tp->compressed_ack_timer))
|
||||
return;
|
||||
|
||||
/* compress ack timer : 5 % of rtt, but no more than 1 ms */
|
||||
/* compress ack timer : 5 % of rtt, but no more than tcp_comp_sack_delay_ns */
|
||||
|
||||
rtt = tp->rcv_rtt_est.rtt_us;
|
||||
if (tp->srtt_us && tp->srtt_us < rtt)
|
||||
rtt = tp->srtt_us;
|
||||
|
||||
delay = min_t(unsigned long, NSEC_PER_MSEC,
|
||||
delay = min_t(unsigned long, sock_net(sk)->ipv4.sysctl_tcp_comp_sack_delay_ns,
|
||||
rtt * (NSEC_PER_USEC >> 3)/20);
|
||||
sock_hold(sk);
|
||||
hrtimer_start(&tp->compressed_ack_timer, ns_to_ktime(delay),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue