diff options
author | Eric Dumazet <edumazet@google.com> | 2014-05-03 00:18:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-03 19:23:07 -0400 |
commit | 249015515fe3fc9818d86cb5c83bbc92505ad7dc (patch) | |
tree | 98db6ccb0d19abccf3c0745551ee1bc5a8076fb3 /net/ipv4/tcp_input.c | |
parent | e114a710aa5058c0ba4aa1dfb105132aefeb5e04 (diff) |
tcp: remove in_flight parameter from cong_avoid() methods
Commit e114a710aa505 ("tcp: fix cwnd limited checking to improve
congestion control") obsoleted in_flight parameter from
tcp_is_cwnd_limited() and its callers.
This patch does the removal as promised.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 6efed134ab63..350b2072f0ab 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2938,10 +2938,11 @@ static void tcp_synack_rtt_meas(struct sock *sk, const u32 synack_stamp) | |||
2938 | tcp_ack_update_rtt(sk, FLAG_SYN_ACKED, seq_rtt_us, -1L); | 2938 | tcp_ack_update_rtt(sk, FLAG_SYN_ACKED, seq_rtt_us, -1L); |
2939 | } | 2939 | } |
2940 | 2940 | ||
2941 | static void tcp_cong_avoid(struct sock *sk, u32 ack, u32 acked, u32 in_flight) | 2941 | static void tcp_cong_avoid(struct sock *sk, u32 ack, u32 acked) |
2942 | { | 2942 | { |
2943 | const struct inet_connection_sock *icsk = inet_csk(sk); | 2943 | const struct inet_connection_sock *icsk = inet_csk(sk); |
2944 | icsk->icsk_ca_ops->cong_avoid(sk, ack, acked, in_flight); | 2944 | |
2945 | icsk->icsk_ca_ops->cong_avoid(sk, ack, acked); | ||
2945 | tcp_sk(sk)->snd_cwnd_stamp = tcp_time_stamp; | 2946 | tcp_sk(sk)->snd_cwnd_stamp = tcp_time_stamp; |
2946 | } | 2947 | } |
2947 | 2948 | ||
@@ -3364,7 +3365,6 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3364 | u32 ack_seq = TCP_SKB_CB(skb)->seq; | 3365 | u32 ack_seq = TCP_SKB_CB(skb)->seq; |
3365 | u32 ack = TCP_SKB_CB(skb)->ack_seq; | 3366 | u32 ack = TCP_SKB_CB(skb)->ack_seq; |
3366 | bool is_dupack = false; | 3367 | bool is_dupack = false; |
3367 | u32 prior_in_flight; | ||
3368 | u32 prior_fackets; | 3368 | u32 prior_fackets; |
3369 | int prior_packets = tp->packets_out; | 3369 | int prior_packets = tp->packets_out; |
3370 | const int prior_unsacked = tp->packets_out - tp->sacked_out; | 3370 | const int prior_unsacked = tp->packets_out - tp->sacked_out; |
@@ -3397,7 +3397,6 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3397 | flag |= FLAG_SND_UNA_ADVANCED; | 3397 | flag |= FLAG_SND_UNA_ADVANCED; |
3398 | 3398 | ||
3399 | prior_fackets = tp->fackets_out; | 3399 | prior_fackets = tp->fackets_out; |
3400 | prior_in_flight = tcp_packets_in_flight(tp); | ||
3401 | 3400 | ||
3402 | /* ts_recent update must be made after we are sure that the packet | 3401 | /* ts_recent update must be made after we are sure that the packet |
3403 | * is in window. | 3402 | * is in window. |
@@ -3452,7 +3451,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3452 | 3451 | ||
3453 | /* Advance cwnd if state allows */ | 3452 | /* Advance cwnd if state allows */ |
3454 | if (tcp_may_raise_cwnd(sk, flag)) | 3453 | if (tcp_may_raise_cwnd(sk, flag)) |
3455 | tcp_cong_avoid(sk, ack, acked, prior_in_flight); | 3454 | tcp_cong_avoid(sk, ack, acked); |
3456 | 3455 | ||
3457 | if (tcp_ack_is_dubious(sk, flag)) { | 3456 | if (tcp_ack_is_dubious(sk, flag)) { |
3458 | is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP)); | 3457 | is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP)); |