tcp: use REXMIT_NEW instead of magic number
authorMao Wenan <maowenan@huawei.com>
Thu, 2 Jan 2020 14:02:27 +0000 (22:02 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jan 2020 00:37:23 +0000 (16:37 -0800)
REXMIT_NEW is a macro for "FRTO-style
transmit of unsent/new packets", this patch
makes it more readable.

Signed-off-by: Mao Wenan <maowenan@huawei.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c

index 88b987ca9ebbbbf0f28ea4560e3731837aea7fb3..1d1e3493965f43ca84d9303a988f9cba44dd25bb 100644 (file)
@@ -3550,7 +3550,7 @@ static void tcp_xmit_recovery(struct sock *sk, int rexmit)
        if (rexmit == REXMIT_NONE || sk->sk_state == TCP_SYN_SENT)
                return;
 
-       if (unlikely(rexmit == 2)) {
+       if (unlikely(rexmit == REXMIT_NEW)) {
                __tcp_push_pending_frames(sk, tcp_current_mss(sk),
                                          TCP_NAGLE_OFF);
                if (after(tp->snd_nxt, tp->high_seq))