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=-16.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham 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 0BABFC43387 for ; Thu, 17 Jan 2019 19:24:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDCAF20859 for ; Thu, 17 Jan 2019 19:24:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GkyL0fd2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728599AbfAQTYG (ORCPT ); Thu, 17 Jan 2019 14:24:06 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:43536 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728577AbfAQTYF (ORCPT ); Thu, 17 Jan 2019 14:24:05 -0500 Received: by mail-pf1-f194.google.com with SMTP id w73so5283300pfk.10 for ; Thu, 17 Jan 2019 11:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fSbSz0jGKrJSoGIO4W9LcTdIeM0vHMDhnFGnRA9Ydkk=; b=GkyL0fd2nVgh8pW0LA9PjQKJ1aeCLt1oS2Kwh2IhyGfgKI4hZ+5c0GKPgwT/OdVfMG bPB0sP5ouLnwou0nEAVOGfTn/7+nmPAQaJe6bKdjsV5B6JQBhyM/TQPNy8cWMv/VJ6bx HKli0SBzMq1dYIijd7PGRDTTwj2ZXWiHBQ0GV3BIvt07RS6JaLuha2zJ63oG1nR9u8bU ZUqvlzdnUXFM+J6yW8klbk30GbArHNHuHPZLYZg5L/D79uolTu1ur2O53Ef8U/ZfAzje bLowauK9sh/763TOE6EmZShTRF36MZSAkZv9HhVAEfKCedN3Rpe1/64DZqyr65km5EKx i6yw== 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 :references:mime-version:content-transfer-encoding; bh=fSbSz0jGKrJSoGIO4W9LcTdIeM0vHMDhnFGnRA9Ydkk=; b=T5AqKo+QstmVGgb3bhPR1HuYWHs0OQRkEpn3QBle89lpPJyoayBca2+pUFnJCFPKS5 Y/tj1a07JwTN6hSZRz6a9gaFDQUkr2g8aryr+8kG4vO8Xb00Vsg0wvBZw6R1EvzBg6Ro ASiGig/gWm/Fyqd4oLNPNbbFTb4r0WY99wlQgpnk7X9yCVjqEff6z6NrnPF7qGMp+Ryx pwqXGCDQaV8htw8Bux799iN39r6/91VEGZkKonlbA6/okauyP685pY4ZBXMkX06xSJAW TDw6CYmyoGfoltNcJimLKwtS3SmbozeHaiZ1cPDZ3bi9RDxDj6+ui7GdnfiW9mMXkphn vS8g== X-Gm-Message-State: AJcUukfr8FSCPH7CIuw4B1yZuD3NZ3/MT8DSKFut/IP7W1e6wriu3F7t CbdzXyQsZOeI/7Mh0SWqcgOBPA== X-Google-Smtp-Source: ALg8bN6OG872mgE4LSyQXywlDaAgkis1C2LIEKn9SU9/d7LXLPkLyycNTDHxirR/kjk9sQ/H6TAxKg== X-Received: by 2002:a62:140a:: with SMTP id 10mr15975983pfu.157.1547753044271; Thu, 17 Jan 2019 11:24:04 -0800 (PST) Received: from localhost ([2620:15c:2c4:201:f5a:7eca:440a:3ead]) by smtp.gmail.com with ESMTPSA id 5sm5199925pfz.149.2019.01.17.11.24.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Jan 2019 11:24:03 -0800 (PST) From: Eric Dumazet To: "David S . Miller" Cc: netdev , Soheil Hassas Yeganeh , Neal Cardwell , Yuchung Cheng , Eric Dumazet , Eric Dumazet Subject: [PATCH net-next 09/11] tcp: move app_limited init to tcp_disconnect() Date: Thu, 17 Jan 2019 11:23:40 -0800 Message-Id: <20190117192342.71126-10-edumazet@google.com> X-Mailer: git-send-email 2.20.1.321.g9e740568ce-goog In-Reply-To: <20190117192342.71126-1-edumazet@google.com> References: <20190117192342.71126-1-edumazet@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If we make sure all listeners have app_limited set to ~0U, then a clone will also inherit proper initial value. Signed-off-by: Eric Dumazet --- net/ipv4/tcp.c | 3 +++ net/ipv4/tcp_minisocks.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 551ad8604bea0cb459805165bb216a99fd3bd8e2..5f15fcc9612ae6b6964ca15660dbb7eb8cd71d83 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2609,6 +2609,9 @@ int tcp_disconnect(struct sock *sk, int flags) tp->sacked_out = 0; tp->tlp_high_seq = 0; tp->last_oow_ack_time = 0; + /* There's a bubble in the pipe until at least the first ACK. */ + tp->app_limited = ~0U; + /* Clean up fastopen related fields */ tcp_free_fastopen_req(tp); diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 29fba13849a79695b3f62a989b27157b57caedfb..13f3c6444efa63b63fe38bf4606c91fa962ec584 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -486,9 +486,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, newsk->sk_txhash = treq->txhash; newtp->total_retrans = req->num_retrans; - /* There's a bubble in the pipe until at least the first ACK. */ - newtp->app_limited = ~0U; - tcp_init_xmit_timers(newsk); newtp->write_seq = newtp->pushed_seq = treq->snt_isn + 1; -- 2.20.1.321.g9e740568ce-goog