diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index e43065654930..4cb5e6f408dc 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -89,6 +89,7 @@ int sysctl_tcp_frto; | |||
89 | int sysctl_tcp_nometrics_save; | 89 | int sysctl_tcp_nometrics_save; |
90 | 90 | ||
91 | int sysctl_tcp_moderate_rcvbuf = 1; | 91 | int sysctl_tcp_moderate_rcvbuf = 1; |
92 | int sysctl_tcp_abc = 1; | ||
92 | 93 | ||
93 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ | 94 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ |
94 | #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ | 95 | #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ |
@@ -1247,6 +1248,7 @@ void tcp_enter_loss(struct sock *sk, int how) | |||
1247 | tp->snd_cwnd_cnt = 0; | 1248 | tp->snd_cwnd_cnt = 0; |
1248 | tp->snd_cwnd_stamp = tcp_time_stamp; | 1249 | tp->snd_cwnd_stamp = tcp_time_stamp; |
1249 | 1250 | ||
1251 | tp->bytes_acked = 0; | ||
1250 | tcp_clear_retrans(tp); | 1252 | tcp_clear_retrans(tp); |
1251 | 1253 | ||
1252 | /* Push undo marker, if it was plain RTO and nothing | 1254 | /* Push undo marker, if it was plain RTO and nothing |
@@ -1904,6 +1906,7 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una, | |||
1904 | TCP_ECN_queue_cwr(tp); | 1906 | TCP_ECN_queue_cwr(tp); |
1905 | } | 1907 | } |
1906 | 1908 | ||
1909 | tp->bytes_acked = 0; | ||
1907 | tp->snd_cwnd_cnt = 0; | 1910 | tp->snd_cwnd_cnt = 0; |
1908 | tcp_set_ca_state(sk, TCP_CA_Recovery); | 1911 | tcp_set_ca_state(sk, TCP_CA_Recovery); |
1909 | } | 1912 | } |
@@ -2310,6 +2313,9 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag) | |||
2310 | if (before(ack, prior_snd_una)) | 2313 | if (before(ack, prior_snd_una)) |
2311 | goto old_ack; | 2314 | goto old_ack; |
2312 | 2315 | ||
2316 | if (sysctl_tcp_abc && icsk->icsk_ca_state < TCP_CA_CWR) | ||
2317 | tp->bytes_acked += ack - prior_snd_una; | ||
2318 | |||
2313 | if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) { | 2319 | if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) { |
2314 | /* Window is constant, pure forward advance. | 2320 | /* Window is constant, pure forward advance. |
2315 | * No more checks are required. | 2321 | * No more checks are required. |
@@ -4370,6 +4376,7 @@ discard: | |||
4370 | 4376 | ||
4371 | EXPORT_SYMBOL(sysctl_tcp_ecn); | 4377 | EXPORT_SYMBOL(sysctl_tcp_ecn); |
4372 | EXPORT_SYMBOL(sysctl_tcp_reordering); | 4378 | EXPORT_SYMBOL(sysctl_tcp_reordering); |
4379 | EXPORT_SYMBOL(sysctl_tcp_abc); | ||
4373 | EXPORT_SYMBOL(tcp_parse_options); | 4380 | EXPORT_SYMBOL(tcp_parse_options); |
4374 | EXPORT_SYMBOL(tcp_rcv_established); | 4381 | EXPORT_SYMBOL(tcp_rcv_established); |
4375 | EXPORT_SYMBOL(tcp_rcv_state_process); | 4382 | EXPORT_SYMBOL(tcp_rcv_state_process); |