All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tcp: Use REXMIT_NEW instead of 2
@ 2020-01-17 10:03 Pengcheng Yang
  2020-01-17 14:28 ` Neal Cardwell
  0 siblings, 1 reply; 2+ messages in thread
From: Pengcheng Yang @ 2020-01-17 10:03 UTC (permalink / raw)
  To: edumazet, davem, kuznet, yoshfuji; +Cc: netdev, linux-kernel, Pengcheng Yang

Use REXMIT_NEW instead of the confusing 2 in tcp_xmit_recovery()

Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
---
 net/ipv4/tcp_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 5347ab2..de07439 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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))
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tcp: Use REXMIT_NEW instead of 2
  2020-01-17 10:03 [PATCH] tcp: Use REXMIT_NEW instead of 2 Pengcheng Yang
@ 2020-01-17 14:28 ` Neal Cardwell
  0 siblings, 0 replies; 2+ messages in thread
From: Neal Cardwell @ 2020-01-17 14:28 UTC (permalink / raw)
  To: Pengcheng Yang
  Cc: Eric Dumazet, David Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
	Netdev, LKML

On Fri, Jan 17, 2020 at 5:04 AM Pengcheng Yang <yangpc@wangsu.com> wrote:
>
> Use REXMIT_NEW instead of the confusing 2 in tcp_xmit_recovery()
>
> Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> ---
>  net/ipv4/tcp_input.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 5347ab2..de07439 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -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 <maowenan@huawei.com>
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 <maowenan@huawei.com>
    Acked-by: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 88b987ca9ebb..1d1e3493965f 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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))

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-17 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-17 10:03 [PATCH] tcp: Use REXMIT_NEW instead of 2 Pengcheng Yang
2020-01-17 14:28 ` Neal Cardwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.