tcp: Use REXMIT_NEW instead of 2
Subsystems (3)
PATCH 1/1 tcp: Use REXMIT_NEW instead of 2
Use REXMIT_NEW instead of the confusing 2 in tcp_xmit_recovery()
Signed-off-by Pengcheng Yang <[email protected]>
--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_input.c +1 -1
@@ -3554,7 +3554,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))
Signature · 1 line
1.8.3.1
Quoted 13 lines · Pengcheng Yang
Use
REXMIT_NEWinstead of the confusing 2 intcp_xmit_recovery()Signed-off-by Pengcheng Yang <[email protected]>--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/ipv4/tcp_input.c +0
-0
net/ipv4/tcp_input.c static void tcp_xmit_recovery(struct sock *sk, int rexmit)
Quoted 9 lines
net/ipv4/tcp_input.c +1
-2@@ -3554,7 +3554,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)) --
This change was already made recently in the net-next branch (see below). To avoid duplicate work like this, please submit improvement patches like this as patches against the very latest net-next branch (or net branch, for bug fixes).
thanks,
neal
--
commit d0e8bcafc8aff5553beffe55046795f9bab9fe7b
Author: Mao Wenan <[email protected]> Date: Thu Jan 2 22:02:27 2020 +0800
tcp: use REXMIT_NEW instead of magic number
REXMIT_NEW is a macro for "FRTO-style
transmit of unsent/new packets", this patch
makes it more readable.
Signed-off-by Mao Wenan <[email protected]>
Acked-by Neal Cardwell <[email protected]>
Signed-off-by David S. Miller <[email protected]>
net/ipv4/tcp_input.c +1 -1
@@ -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))