Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1038675ybi; Fri, 14 Jun 2019 07:36:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxM2d5j+cLiHmsylZESE7xReFYbmwCovXZAtep9K+YJVufFELiA86OMeiMAANe+RVi5W0gK X-Received: by 2002:a17:902:2aa8:: with SMTP id j37mr51463303plb.316.1560522994471; Fri, 14 Jun 2019 07:36:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560522994; cv=none; d=google.com; s=arc-20160816; b=T23OK2Kxm4jtc/MDlkguEJbMlx/wnrO9vdOvIYamplP49oMgfTXPoQ/QNauFht44qt Ci9vhuOKn93l4jihn1glgVrJVq5r1AFazu2XzX/NpTrvOP7pdpo0yezB2KoTHLTULcyd kNcOoh3CdWWhwpkFBLw1f1hTwqGlaXmpFx96EVIbvZD0HDW9znHKMe6Wij6hCKgrZNb7 MsRWxC9ZBb9nQVoXbRwm8tA9dLW1ETfp0BsIV/0/FyQ2pF9tPsKps37Xx68dCFJJTK1O 9LpIlchUAfu/MTcekGZHiHMLZNQUXQvJTy3wPUyUCfof88kbaYPF8NJDCBVdRFLYFvie 9n2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hQ/2TCsgHd63qdgIeQy8ojRYEa5SdLlsBJg9pFxbgEs=; b=zfB9SZ0ZnLnDbUG+Lo4sPXX2o25TRtPuvyXqDbfNvgO+S7iB0wt3JmJvOjWDbwdQF2 r05U5NVIJ9btcS07XkoU0L5LjzPSsn2AxESdfCgVAm0ivaUgUI96rACna9nMHSwET+SZ MBoNly/PhMk7N3H5SsQfLgG0H1oBFwBBsN4koHiSZcceHd0zz6ARECYp8SQqSt+rFADF ExuRC62Fc/ZISiBjEyyxLbok20+0votH8UsdukHZjWPuyQlUUJCwZBnyN51tzgUjQ73e 9fp30xGBJwFjNyheA3dkUyPtEHGSHir5pUDwNQwOXDowjp2HHPVAsh3N1hwVfnnWAEAg qlyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=da6OKv1A; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h5si2753716pgs.486.2019.06.14.07.36.17; Fri, 14 Jun 2019 07:36:34 -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=@gmail.com header.s=20161025 header.b=da6OKv1A; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728488AbfFNOen (ORCPT + 99 others); Fri, 14 Jun 2019 10:34:43 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:44208 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728208AbfFNOen (ORCPT ); Fri, 14 Jun 2019 10:34:43 -0400 Received: by mail-pl1-f195.google.com with SMTP id t7so1091626plr.11; Fri, 14 Jun 2019 07:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hQ/2TCsgHd63qdgIeQy8ojRYEa5SdLlsBJg9pFxbgEs=; b=da6OKv1AnE6d1/z1ZGsq0j5uJ1whVPCoD3uYZVLLWfq9nZMg8Bt9jtBI6EREwpRdzq J4hhbpNC9nLg9fnKfGAYoNwTBxpOowltBZnDS6tyAsPOAwezJTi5TdhkXntxkA/mRLeq wE77tHiEGlS0c1mM3lVr1Wj4i5B8WPZQFaehdndEC2SW7iqcJEKrMwcukU+SPy7Cyv81 tpDau0+IoHSfGyWZWC6DGUAc3/xseYVon1P67Mjgpx1OuqoyuDuKypEwmJC8XNpoSBoT tcWKjJCQXvNVHTTXkQcrOjI7sUsXUGTbtWB09xZmtZnrgtXAJ6Es0f36340+AaxWf2nt IEVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hQ/2TCsgHd63qdgIeQy8ojRYEa5SdLlsBJg9pFxbgEs=; b=nKUjYJIBLcNRlKSQ5Jq3aGcFvl1tueBRKA2M/I+Rgd/y1+IrYRuEZGED97CHIHDL3B J8+V8/FeB/T+vkg0a/MA27iDTDL3lVe7reW1GNAglwIISCKnqlElLtJAm974N6YekMqW hN03r2oFkN+416KslySNWCVznhzEtoldemo5SuMzobfMZV0BpbpfwhL6Bw3qbcw6r9Td 4IWqt2pT0GiCoP+dypUNjmvcPlO6R1xhXiwLB1iAuGopYnL19hVe4iRPkAfKMH/ZDBrl YA3OprTCkWiK5qhqhjpmQ3IO+iElWqlcGIwFlcQ8B+00/1aaTkZnHIHfcYo/02e3fEpd bRRw== X-Gm-Message-State: APjAAAVkT1q0E3Cp0Ci6bKi05SsJHts96nlBl/y52ost/EwkM7d4LiDp mZSA0OD+qQ+UxvAQ9dsfaMmSAz6j X-Received: by 2002:a17:902:a516:: with SMTP id s22mr54018004plq.178.1560522882345; Fri, 14 Jun 2019 07:34:42 -0700 (PDT) Received: from [192.168.86.235] (c-73-241-150-70.hsd1.ca.comcast.net. [73.241.150.70]) by smtp.gmail.com with ESMTPSA id e26sm3196627pfn.94.2019.06.14.07.34.40 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 07:34:41 -0700 (PDT) Subject: Re: [PATCH net v2] tcp: avoid creating multiple req socks with the same tuples To: Eric Dumazet , maowenan Cc: David Miller , netdev , LKML 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> From: Eric Dumazet Message-ID: <0202f817-bd59-918e-96d5-ddf692f5e140@gmail.com> Date: Fri, 14 Jun 2019 07:34:37 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/14/19 7:25 AM, Eric Dumazet wrote: > 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 ? > 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)