Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1029939ybi; Fri, 14 Jun 2019 07:27:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuZtDudDp8XJXokB1YOdpDatJW+zs/JAQ+aGo7FNFKiBKRQcoNRCDfhllylmwtHxDeu08c X-Received: by 2002:a17:90a:f488:: with SMTP id bx8mr11352761pjb.91.1560522455075; Fri, 14 Jun 2019 07:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560522455; cv=none; d=google.com; s=arc-20160816; b=UB6NzauMQ8AzM8zurX/0rihZNFKq0U//uajT3RDlf47sjlfoIYZ1S1M8rfsXsg/9XW nyoqsNGYyoU1Rl+2zsKzkg0ABEj3h+nWkSv4+NX4zkdA6HDXRwSvBbpdoT8ndLMnq/m1 KLOhVlLxdBMsg2v0F87xttbuqJHJ4bFHrFM+l/4WOZQIysmm0PzldU24nn5dZPC0YLT5 MOvbN7KHYOGsAObnF4JEUrdW4ED1p1mI2GIKi9pf68k77Rfg7RD5riUDyBvagRfNnSdw OmsyuIMKTXdfW30cKrnTCO2+Xz2zrNnUyFTi+cQKXarwaHRf3/PNqV3CGwUfjHFrbp82 y7IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LYUOOkbDEtc/n63J16wUInERrQ528yDBZpQw3peOe88=; b=UCmNPmqe8lVhKx4Ds31JoPF4cxv20EgnTfHzkWNcCfCnTR2A7dJFOITx0zf2raFM2F M+ga7G0RfXUNu9EK8cXhi4EzFgQMu7dBVocGxVfKfIwIsvGGNbgpTCXajzKa7TzrfdH+ n1VMM1NA9MDMKut2xMFpmaElb26WZHI2rQ46yOhFNcCcW7+qv0n9LWFDGwWO+XGVqtcQ g2IzLYsAu6sUJL8ihSU5n4UPcHke6Nt48HsbtJwFTmsQ4vVJUus55iM/1GqwkJI/wUeD 01/B/6UTFKWJxDGgq1E/xBfZOYEVey2D7ZYVbYJp2WO3L6t/wEhaaCm+jtqyeCxsdjiO bFoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qdBwUMao; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s197si2487192pfs.289.2019.06.14.07.27.19; Fri, 14 Jun 2019 07:27:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qdBwUMao; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728290AbfFNOZg (ORCPT + 99 others); Fri, 14 Jun 2019 10:25:36 -0400 Received: from mail-yw1-f67.google.com ([209.85.161.67]:36790 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728050AbfFNOZf (ORCPT ); Fri, 14 Jun 2019 10:25:35 -0400 Received: by mail-yw1-f67.google.com with SMTP id t126so1179486ywf.3 for ; Fri, 14 Jun 2019 07:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LYUOOkbDEtc/n63J16wUInERrQ528yDBZpQw3peOe88=; b=qdBwUMaogc4xCMq8nYw9mw2BMaMCPofGrk0xtOBNrpZEcRu8ecbbJ2gRK++oUcFy5b zAxEFOZ7dWU6kj3Ouu7nkjWPiydd/HSwZxS/h/cGqhS3MtTsHYGuQN5gngcAEM1zFfvt xVTnTxA9dwYp0gMCXIHvKHhQGaYH1fCGFSdEVNMc3UAteWux7Y/PkW9pDXN3mkdJR8GH jY+2SPuU5r3E46sRf3k2E/ocAcEvf1O3JOtjWHiCG6klFVJTxwIXOLK5Mutg+7UP711J lai7oSTxDPCXXYbW8eLZR97IKWFsrUGD7Tlng14vj4yvsBKs7tyP3PIG9rt3QXh1pSnZ 8puw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LYUOOkbDEtc/n63J16wUInERrQ528yDBZpQw3peOe88=; b=THKQUQq0W8508OjoJVNXrMPQrjJXspW5s5w9S8XIQyGthp1QkmTveNSu9eZSesqv13 QWphMowAMJxTHtne1gU6RMCMIUd3s4aqXL4tlmmfw/C6vDwEN0m4jbSwsffIA5g/21LZ IhALkd2NHy38I9rJ3dWyAJxMWNnICQ4S8ucgcnqQjMPRRf1mVcLJhWx3uuxz3V6Opz60 bmnVG+oLkmKaV5CnXiIBnO4I99XicYDzbH7BKf791G1/CjJ4ildir4UPRqMXhjm8yLu9 ZNTN9j4JFTnzOskk638TAO5AcWtfR9drXnl0plR3ECUSsxCHjoqq3zAt1vS+QNXE6L9+ A3ww== X-Gm-Message-State: APjAAAXsZKxwNQroOpeHMr9HxVZJFXAhY9Kyd22eHKn5BOro8oSjACW1 p5EJgamlyTGnoQkeuWrPzm/lJsFB8wu1tQWtsX+m0A== X-Received: by 2002:a0d:fbc6:: with SMTP id l189mr34021112ywf.135.1560522334672; Fri, 14 Jun 2019 07:25:34 -0700 (PDT) MIME-Version: 1.0 References: <20190612035715.166676-1-maowenan@huawei.com> <6de5d6d8-e481-8235-193e-b12e7f511030@huawei.com> <6aa69ab5-ed81-6a7f-2b2b-214e44ff0ada@gmail.com> <52025f94-04d3-2a44-11cd-7aa66ebc7e27@huawei.com> <7d0f5a21-717c-74ee-18ad-fc0432dfbe33@huawei.com> In-Reply-To: <7d0f5a21-717c-74ee-18ad-fc0432dfbe33@huawei.com> From: Eric Dumazet Date: Fri, 14 Jun 2019 07:25:23 -0700 Message-ID: Subject: Re: [PATCH net v2] tcp: avoid creating multiple req socks with the same tuples To: maowenan Cc: Eric Dumazet , David Miller , netdev , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 14, 2019 at 7:04 AM maowenan 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 ?