Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1438079ybl; Fri, 31 Jan 2020 22:11:06 -0800 (PST) X-Google-Smtp-Source: APXvYqxzMjrK/6Yk2va7PLjxHKHuSf9GyLc3D0x91mf77MQeajs+Mi62S3ViliK/1mey4aa9VTWp X-Received: by 2002:a05:6830:184:: with SMTP id q4mr10448611ota.232.1580537466170; Fri, 31 Jan 2020 22:11:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580537466; cv=none; d=google.com; s=arc-20160816; b=EJRwgFQWZNQMqPCooV/ZVtLYNZTm4Wdcs77eUupOYaclRlKnxOASHsNo2DhSsDPBMA JD2AJWH8hES9qC0gFe6ILUCutKbnW03HoOsraSK7b6Qmor+qbqHlYMm6A0bVFQiHTcHO xZ7H3SgjVCv7MSsdyxsHupEK2cX35Zcuc65VKyi957wAEqZEYXeakgNbGDXxCFAvRZrz YNlL9ljkLFzuNujVRWII2JOTR+LApsptXHYi/Wyee8li5/9wAGMd6iXvA1S0LYRVJsZh I8rk4eTh994IWY04KTUApdHVGYqu8nKSrKw3c7AhmLA4dgmtTM32zMQfQQIlLvpQbb53 mTqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ishe3wylxU5DdbmCiVhXoDPa+Jea4eY6AcXsmXmzIFM=; b=S/IaRplFIHZ++vYkmjV9Oq5MuMxkkn2+GAraF2MWqq1Z854IZ6FL2NjRf0c3XZMM9d V0fK7s2/HGoOd+OGxxJLpwZ29JQqqJGh0mpPBrefiZ8REDoBFcMcB0QgQaovjryoZOhX XSQnLCt/k+dPGivJdHqfTMFVd+0k9W80VtX/DxEtXoU5et785XywzM52DTLvvfwsVm2E uSRRYk5clWhuej6Txp7XtaMp6arh+waPwhYEtaWVVagL2CdpP+OQ+jhUp0B8Hmep8xA6 OzNq3C0hF4/qnXhdp7WwODw77/gUE9OD3/8oR8O45rhnWZgSJjibHJhthfInx7fHzQAX G2rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lDpqA8x8; 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 w207si5291260oia.226.2020.01.31.22.10.41; Fri, 31 Jan 2020 22:11:06 -0800 (PST) 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=lDpqA8x8; 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 S1726265AbgBAGI7 (ORCPT + 99 others); Sat, 1 Feb 2020 01:08:59 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:34081 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbgBAGI6 (ORCPT ); Sat, 1 Feb 2020 01:08:58 -0500 Received: by mail-wm1-f65.google.com with SMTP id s144so10270994wme.1; Fri, 31 Jan 2020 22:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to; bh=ishe3wylxU5DdbmCiVhXoDPa+Jea4eY6AcXsmXmzIFM=; b=lDpqA8x8A/NCKTjaahbsIU0krLUS6y0Ky6ZEZ2VgZ0HEk/bFccMZBLbD07jgwPWgBv NCq8k5zTqQU3fmzETffHG+D3W/LIEUAumjlwx0+1GRTv1vApjO4U9RvDRSjc2x4MHSzd oqolgD7LfXS8e/amRdzyrI3tJ4kbNSTbY77GWlnRRZUEEMglF2TcSUjoyyYd83jexsJ8 EiWnMqWYkeGEABjiACvFLgvqThV2SN5wec9y5AkJfvYUuFr0KYLPMdNsha+4d5kOizav MqcMttv1RTFhIyrHoHWpavdHSj5SKqWFIzVM8EuF8dvm5q/hrqegCSTcZQn2r2tTRpIe Selw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to; bh=ishe3wylxU5DdbmCiVhXoDPa+Jea4eY6AcXsmXmzIFM=; b=Snl7/E5NXoWdnHhxhwI1+2jcsqjEqGdfpWw5THZpmRORtSLRBMOGl9F+Wljn3P17gX aNkGNtOxmoLGmcCTEAVtZT6hjD1GBoeOn+ZB1b7vdPgaJvLtVmhMuJ2fo0EVOb/FwY1S hgI4faAxYdaDzGgmpjqia91nKui/JWKw/TnX+uWJ2NpwwpQjC3zMLHiLUEx4bBUdjkU4 RnhTfzmzVUYnc8kX/GL0zb2NjMUM9GYVTyEDSQNSsUTZvRAuU09yD5j67few344mvAV+ fOA7YZHqM74QzPulXFne9lMwpyT45k/Kvz/H6E56gliqtjEOJfJRNBvxD79QL+trFccz duAw== X-Gm-Message-State: APjAAAU5fibQcpaQjhJwO27aNXKyUqiLq4o4GFTqtYbl6z87C7KsPdb4 ypADNIxWO9k1vAP9md/uUCw= X-Received: by 2002:a1c:7317:: with SMTP id d23mr16843328wmb.165.1580537336016; Fri, 31 Jan 2020 22:08:56 -0800 (PST) Received: from localhost.localdomain ([2a02:2450:10d2:194d:bcd7:b36c:40fc:d163]) by smtp.gmail.com with ESMTPSA id c15sm14815486wrt.1.2020.01.31.22.08.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2020 22:08:55 -0800 (PST) From: SeongJae Park To: Neal Cardwell Cc: SeongJae Park , Eric Dumazet , sjpark@amazon.com, Eric Dumazet , David Miller , shuah@kernel.org, Netdev , linux-kselftest@vger.kernel.org, LKML , aams@amazon.com, SeongJae Park , Yuchung Cheng Subject: Re: Re: Re: [PATCH 2/3] tcp: Reduce SYN resend delay if a suspicous ACK is received Date: Sat, 1 Feb 2020 07:08:43 +0100 Message-Id: <20200201060843.21626-1-sj38.park@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: (raw) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 Jan 2020 22:55:34 -0500 Neal Cardwell wrote: > On Fri, Jan 31, 2020 at 5:18 PM SeongJae Park wrote: > > > > On Fri, 31 Jan 2020 17:11:35 -0500 Neal Cardwell wrote: > > > > > On Fri, Jan 31, 2020 at 1:12 PM Eric Dumazet wrote: > > > > > > > > > > > > > > > > On 1/31/20 7:10 AM, Neal Cardwell wrote: > > > > > On Fri, Jan 31, 2020 at 7:25 AM wrote: > > > > >> > > > > >> From: SeongJae Park > > > > >> > > > > >> When closing a connection, the two acks that required to change closing > > > > >> socket's status to FIN_WAIT_2 and then TIME_WAIT could be processed in > > > > >> reverse order. This is possible in RSS disabled environments such as a > > > > >> connection inside a host. > > [...] > > > > > > I looked into fixing this, but my quick reading of the Linux > > > tcp_rcv_state_process() code is that it should behave correctly and > > > that a connection in FIN_WAIT_1 that receives a FIN/ACK should move to > > > TIME_WAIT. > > > > > > SeongJae, do you happen to have a tcpdump trace of the problematic > > > sequence where the "process A" ends up in FIN_WAIT_2 when it should be > > > in TIME_WAIT? > > > > Hi Neal, > > > > > > Yes, I have. You can get it from the previous discussion for this patchset > > (https://lore.kernel.org/bpf/20200129171403.3926-1-sjpark@amazon.com/). As it > > also has a reproducer program and how I got the tcpdump trace, I believe you > > could get your own trace, too. If you have any question or need help, feel > > free to let me know. :) > > Great. Thank you for the pointer. > > I had one quick question: in the message: > https://lore.kernel.org/bpf/20200129171403.3926-1-sjpark@amazon.com/ > ... it showed a trace with the client sending a RST/ACK, but this > email thread shows a FIN/ACK. I am curious about the motivation for > the difference? RST/ACK is traced if LINGER socket option is applied in the reproduce program, and FIN/ACK is traced if it is not applied. LINGER applied version shows the spikes more frequently, but the main problem logic has no difference. I confirmed this by testing both of the two versions. In the previous discussion, I showed the LINGER applied trace. However, as many other documents are using FIN/ACK, I changed the trace to FIN/ACK version in this patchset for better understanding. I will comment that it doesn't matter whether it is FIN/ACK or RST/ACK in the next spin. Thanks, SeongJae Park > > Anyway, thanks for the report, and thanks to Eric for further clarifying! > > neal >