Merge tag 'v4.9.209' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
[platform/kernel/linux-amlogic.git] / net / ipv4 / tcp_input.c
index 4901d17..5e2ef56 100644 (file)
@@ -100,6 +100,7 @@ int sysctl_tcp_thin_dupack __read_mostly;
 int sysctl_tcp_moderate_rcvbuf __read_mostly = 1;
 int sysctl_tcp_early_retrans __read_mostly = 3;
 int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2;
+int sysctl_tcp_default_init_rwnd __read_mostly = TCP_INIT_CWND * 2;
 
 #define FLAG_DATA              0x01 /* Incoming frame contained data.          */
 #define FLAG_WIN_UPDATE                0x02 /* Incoming ACK was a window update.       */
@@ -5170,8 +5171,10 @@ static void __tcp_ack_snd_check(struct sock *sk, int ofo_possible)
 {
        struct tcp_sock *tp = tcp_sk(sk);
 
-           /* More than one full frame received... */
-       if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss &&
+       /* More than one full frame received... */
+       if (((tp->rcv_nxt - tp->rcv_wup) >
+                       (inet_csk(sk)->icsk_ack.rcv_mss) *
+                               sysctl_tcp_delack_seg &&
             /* ... and right edge of window advances far enough.
              * (tcp_recvmsg() will send ACK otherwise). Or...
              */