mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Eric Dumazet <edumazet@google.com>, maowenan <maowenan@huawei.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v2] tcp: avoid creating multiple req socks with the same tuples
Date: Fri, 14 Jun 2019 07:34:37 -0700	[thread overview]
Message-ID: <0202f817-bd59-918e-96d5-ddf692f5e140@gmail.com> (raw)
In-Reply-To: <CANn89iJW0DHBg=RKgdLq1r33THL15UO3c2n4MkR6DdD7-QwP1w@mail.gmail.com>



On 6/14/19 7:25 AM, Eric Dumazet wrote:
> On Fri, Jun 14, 2019 at 7:04 AM maowenan <maowenan@huawei.com> wrote:
>> I agree that this is a special case.
>> I propose one point about the sequence of synack, if two synack with two different
>> sequence since the time elapse 64ns, this issue disappear.
>>
>> tcp_conn_request->tcp_v4_init_seq->secure_tcp_seq->seq_scale
>> static u32 seq_scale(u32 seq)
>> {
>>         /*
>>          *      As close as possible to RFC 793, which
>>          *      suggests using a 250 kHz clock.
>>          *      Further reading shows this assumes 2 Mb/s networks.
>>          *      For 10 Mb/s Ethernet, a 1 MHz clock is appropriate.
>>          *      For 10 Gb/s Ethernet, a 1 GHz clock should be ok, but
>>          *      we also need to limit the resolution so that the u32 seq
>>          *      overlaps less than one time per MSL (2 minutes).
>>          *      Choosing a clock of 64 ns period is OK. (period of 274 s)
>>          */
>>         return seq + (ktime_get_real_ns() >> 6);
>> }
>>
>> So if the long delay larger than 64ns, the seq is difference.
> 
> The core issue has nothing to do with syncookies.
> 
> Are you sure you really understand this stack ?
> 

Oh well, maybe I should not have answered before my breakfast/coffee.

What I meant to say is that we do not want to fix this problem by working around
the issue you noticed (which leads to RST packets)


      reply	other threads:[~2019-06-14 14:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12  3:57 Mao Wenan
2019-06-12 16:25 ` David Miller
2019-06-13  6:34   ` maowenan
2019-06-12 16:30 ` Eric Dumazet
2019-06-13  4:21   ` maowenan
2019-06-14  4:19     ` maowenan
2019-06-14  4:28       ` Eric Dumazet
2019-06-14  9:35         ` maowenan
2019-06-14 12:27           ` Eric Dumazet
2019-06-14 14:03             ` maowenan
2019-06-14 14:25               ` Eric Dumazet
2019-06-14 14:34                 ` Eric Dumazet [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=0202f817-bd59-918e-96d5-ddf692f5e140@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --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

all inboxes | Powered by JetHome®