From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F20C33C9E for ; Sat, 1 Feb 2020 06:09:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 966692070C for ; Sat, 1 Feb 2020 06:08:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lDpqA8x8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726342AbgBAGI7 (ORCPT ); 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-Google-Smtp-Source: APXvYqxzUQRkgZgwqSu2maQusGbwl1Dh0Bz+Bn8Coh1ZaVif2TXk/PZnDh9dDWPNLyFTNDQaPUuutg== 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 >