diff options
| author | ronaxdevil <pratabidya.007@gmail.com> | 2020-06-06 12:16:58 +0530 |
|---|---|---|
| committer | lucasponez <lucasponez@outlook.com> | 2020-12-06 05:32:19 -0800 |
| commit | c9d101bffe7b6a10fddc18bc7a2d0dc0962ed71f (patch) | |
| tree | cc92c8d9bbff0f97a4036908f210b2adb2adaf1a /net/ipv4/tcp_input.c | |
| parent | 13ba6318ccffd7e3167f514ac34358ab74ff6b6c (diff) | |
Merge tag 'v3.18.140' of https://source.codeaurora.org/quic/la/kernel/msm-3.18 into android-10-release-qpk30.54r11.0
This is the 3.18.140 stable release
gpg: Signature made Thu 16 May 2019 12:47:33 PM IST
gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E
Signed-off-by: ronaxdevil <pratabidya.007@gmail.com>
Diffstat (limited to 'net/ipv4/tcp_input.c')
| -rw-r--r-- | net/ipv4/tcp_input.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 01b51ab23c10..2a2ec228d0bb 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -359,11 +359,12 @@ static int __tcp_grow_window(const struct sock *sk, const struct sk_buff *skb) static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) { struct tcp_sock *tp = tcp_sk(sk); + int room; + + room = min_t(int, tp->window_clamp, tcp_space(sk)) - tp->rcv_ssthresh; /* Check #1 */ - if (tp->rcv_ssthresh < tp->window_clamp && - (int)tp->rcv_ssthresh < tcp_space(sk) && - !sk_under_memory_pressure(sk)) { + if (room > 0 && !sk_under_memory_pressure(sk)) { int incr; /* Check #2. Increase window, if skb with such overhead @@ -376,8 +377,7 @@ static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) if (incr) { incr = max_t(int, incr, 2 * skb->len); - tp->rcv_ssthresh = min(tp->rcv_ssthresh + incr, - tp->window_clamp); + tp->rcv_ssthresh += min(room, incr); inet_csk(sk)->icsk_ack.quick |= 1; } } |
