[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACSApvaPH9oD7gM8KHnT1Pn=uD3g-6jDwyt0X5-MKooVcaySYA@mail.gmail.com>
Date: Fri, 31 Jan 2020 13:41:03 -0500
From: Soheil Hassas Yeganeh <soheil@...gle.com>
To: Neal Cardwell <ncardwell@...gle.com>
Cc: Eric Dumazet <edumazet@...gle.com>,
"David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Yuchung Cheng <ycheng@...gle.com>
Subject: Re: [PATCH net] tcp: clear tp->delivered in tcp_disconnect()
On Fri, Jan 31, 2020 at 1:32 PM Neal Cardwell <ncardwell@...gle.com> wrote:
>
> On Fri, Jan 31, 2020 at 1:22 PM Eric Dumazet <edumazet@...gle.com> wrote:
> >
> > tp->delivered needs to be cleared in tcp_disconnect().
> >
> > tcp_disconnect() is rarely used, but it is worth fixing it.
> >
> > Fixes: ddf1af6fa00e ("tcp: new delivery accounting")
> > Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> > Cc: Yuchung Cheng <ycheng@...gle.com>
> > Cc: Neal Cardwell <ncardwell@...gle.com>
> > ---
> > net/ipv4/tcp.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> > index dd57f1e3618160c1e51d6ff54afa984292614e5c..a8ffdfb61f422228d4af1de600b756c9d3894ef5 100644
> > --- a/net/ipv4/tcp.c
> > +++ b/net/ipv4/tcp.c
> > @@ -2622,6 +2622,7 @@ int tcp_disconnect(struct sock *sk, int flags)
> > tp->snd_cwnd = TCP_INIT_CWND;
> > tp->snd_cwnd_cnt = 0;
> > tp->window_clamp = 0;
> > + tp->delivered = 0;
> > tp->delivered_ce = 0;
> > tcp_set_ca_state(sk, TCP_CA_Open);
> > tp->is_sack_reneg = 0;
> > --
>
> Thanks, Eric!
>
> Acked-by: Neal Cardwell <ncardwell@...gle.com>
>
> neal
Acked-by: Soheil Hassas Yeganeh <soheil@...gle.com>
Nice catch! Thanks!
Powered by blists - more mailing lists