mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[TCP]: Add tcp_slow_start_after_idle sysctl.
A lot of people have asked for a way to disable tcp_cwnd_restart(), and it seems reasonable to add a sysctl to do that. Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
9e1881dec9
commit
35089bb203
5 changed files with 22 additions and 1 deletions
|
|
@ -690,6 +690,14 @@ ctl_table ipv4_table[] = {
|
|||
.proc_handler = &proc_dointvec
|
||||
},
|
||||
#endif
|
||||
{
|
||||
.ctl_name = NET_TCP_SLOW_START_AFTER_IDLE,
|
||||
.procname = "tcp_slow_start_after_idle",
|
||||
.data = &sysctl_tcp_slow_start_after_idle,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec
|
||||
},
|
||||
{ .ctl_name = 0 }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ int sysctl_tcp_tso_win_divisor = 3;
|
|||
int sysctl_tcp_mtu_probing = 0;
|
||||
int sysctl_tcp_base_mss = 512;
|
||||
|
||||
/* By default, RFC2861 behavior. */
|
||||
int sysctl_tcp_slow_start_after_idle = 1;
|
||||
|
||||
static void update_send_head(struct sock *sk, struct tcp_sock *tp,
|
||||
struct sk_buff *skb)
|
||||
{
|
||||
|
|
@ -138,7 +141,8 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
|
|||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
const u32 now = tcp_time_stamp;
|
||||
|
||||
if (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto)
|
||||
if (sysctl_tcp_slow_start_after_idle &&
|
||||
(!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto))
|
||||
tcp_cwnd_restart(sk, __sk_dst_get(sk));
|
||||
|
||||
tp->lsndtime = now;
|
||||
|
|
|
|||
Loading…
Reference in a new issue