netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pengcheng Yang" <yangpc@wangsu.com>
To: "'Eric Dumazet'" <edumazet@google.com>,
	"'Jakub Kicinski'" <kuba@kernel.org>
Cc: "'David Miller'" <davem@davemloft.net>,
	"'netdev'" <netdev@vger.kernel.org>
Subject: Re: [PATCH net] tcp: fix TCP_SKB_CB(skb)->tcp_tw_isn not being used
Date: Fri, 15 Jan 2021 11:03:27 +0800	[thread overview]
Message-ID: <000501d6eaea$ff921960$feb64c20$@wangsu.com> (raw)
In-Reply-To: <CANn89iK5N-u-DKLmAF4+RSiG1g4Y1YkcizTX5h12hsTdpMt0DA@mail.gmail.com>

On Fri, Jan 15, 2021 at 1:12 AM Eric Dumazet <edumazet@google.com> wrote:
> 
> On Thu, Jan 14, 2021 at 5:53 PM Jakub Kicinski <kuba@kernel.org> wrote:
> >
> > On Tue, 29 Dec 2020 05:59:20 +0800 Pengcheng Yang wrote:
> > > TCP_SKB_CB(skb)->tcp_tw_isn contains an ISN, chosen by
> > > tcp_timewait_state_process() , when SYN is received in TIMEWAIT state.
> > > But tcp_tw_isn is not used because it is overwritten by
> > > tcp_v4_restore_cb() after commit eeea10b83a13 ("tcp: add
> > > tcp_v4_fill_cb()/tcp_v4_restore_cb()").
> > >
> > > To fix this case, we record tcp_tw_isn before tcp_v4_restore_cb() and
> > > then set it in tcp_v4_fill_cb(). V6 does the same.
> > >
> > > Fixes: eeea10b83a13 ("tcp: add tcp_v4_fill_cb()/tcp_v4_restore_cb()")
> > > Reported-by: chenc <chenc9@wangsu.com>
> > > Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
> >
> > Please fix the date and resend. This patch came in last night,
> > but it has a date of December 28th.
> 
> Not this whole madness about tcp_v4_fill_cb()/tcp_v4_restore_cb()
> could be reverted

This makes isn always been 0 in tcp_conn_request(), because tcp_tw_isn
is always initialized to 0 in tcp_v4_fill_cb() and tcp_tw_isn becomes meaningless.
Do we need to make tcp_tw_isn work again?

> now we have an RB tree for out-of-order packets.

I don't quite understand how setting tcp_tw_isn for SYN would affect
out_of_order_queue?


      reply	other threads:[~2021-01-15  3:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 21:59 [PATCH net] tcp: fix TCP_SKB_CB(skb)->tcp_tw_isn not being used Pengcheng Yang
2021-01-14 16:53 ` Jakub Kicinski
2021-01-14 17:11   ` Eric Dumazet
2021-01-15  3:03     ` Pengcheng Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000501d6eaea$ff921960$feb64c20$@wangsu.com' \
    --to=yangpc@wangsu.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).