From patchwork Thu Jan 17 19:23:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 1026920 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="QDCbdWag"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43gYsT6hP1z9sBZ for ; Fri, 18 Jan 2019 06:23:57 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728479AbfAQTXz (ORCPT ); Thu, 17 Jan 2019 14:23:55 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:38407 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726811AbfAQTXx (ORCPT ); Thu, 17 Jan 2019 14:23:53 -0500 Received: by mail-pl1-f195.google.com with SMTP id e5so5180732plb.5 for ; Thu, 17 Jan 2019 11:23:52 -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=8vChZulYXQQw5LZAYTihXyExBUxLh5752IfQyWqGAB0=; b=QDCbdWag4yXWmluGFMIRRln9ZWEFnCpBKZ8WPyrjyXJKGGsYspCfJi6GUnR3cuZfTj I3JSn6Zk5txdKUB0C+p2wRvKIeH0TYT5hI0wY+8ch5iP1HFWYFrHKtiPRVLYpS1f9oot zcTfLWz6qlhCq2g7Z3A8sXP+WoaC/wuqW26REhajtk29g4NONiV28HyLD7MtRMiuug3F KcDiT3vv04p3IAJM/+lafYE1S91vsH3MoLPkVWysZwJ3RSCRZ5jGSswClufvbb89Rig+ nlXbHX0Euib7snVWRs2Q/r3Iuh+5m8RV/7pmDD8RDRtcjU10+OsapdQf4cy0lBV9zqra 04nA== 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=8vChZulYXQQw5LZAYTihXyExBUxLh5752IfQyWqGAB0=; b=hX640mAxafC7NFbmfBZMU7KP9JQKiv1Ug/qRKd6kfyVBCBosjVdWw7Yga3JEaTP//0 0PlDT+g+8oFViLGJnSWk1qcVWAMTE+Bb0OcT8piLtcdgt8l268nMykhzDYg+NyyXxMHl zmeOcW2AF8NCqjwMEURgtUWOdBLc8nN2svijHi8iU5G9LQNStw9C7BgVhoN31m1FG9Ph Ge7HwnRFyOYaoSzkHBuPFTGc0d0TesRmeko50gvB/6f4TsOFy2iGUtjF1zEFDI1sfxin Y3zxYXCVpFjanOBmGprRCKGD1YIxFAYfuISD+diydYh75DptQnhy3hyJm9fhRQPBxIJ2 8nfg== X-Gm-Message-State: AJcUukfc4D0cmna7ZWoWYFVqrh9A4H025cyljYdPWO9ck+1mmnOYIaR7 qC9i9HyC+gEH+VGkJjE9qiOn2g== X-Google-Smtp-Source: ALg8bN6k8Pn4M5zOP66rmSNNyb6NVFGVCzGER9/1DTbIcDQgppbM+7wO7EnYpVTD1DUOIoKPSxIAyQ== X-Received: by 2002:a17:902:bb86:: with SMTP id m6mr16339625pls.315.1547753032325; Thu, 17 Jan 2019 11:23:52 -0800 (PST) Received: from localhost ([2620:15c:2c4:201:f5a:7eca:440a:3ead]) by smtp.gmail.com with ESMTPSA id p6sm4007178pfn.53.2019.01.17.11.23.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 Jan 2019 11:23:51 -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 03/11] tcp: do not clear packets_out in tcp_create_openreq_child() Date: Thu, 17 Jan 2019 11:23:34 -0800 Message-Id: <20190117192342.71126-4-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 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org New sockets have this field cleared, and tcp_disconnect() calls tcp_write_queue_purge() which among other things also clear tp->packets_out So a listener is guaranteed to have this field cleared. Signed-off-by: Eric Dumazet --- net/ipv4/tcp_minisocks.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 9799f1d32e44f4c733b41c4d8fc7739970ccca28..830e4eb558f8861fb3813c35b215425a53cacf62 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -484,7 +484,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, minmax_reset(&newtp->rtt_min, tcp_jiffies32, ~0U); newicsk->icsk_ack.lrcvtime = tcp_jiffies32; - newtp->packets_out = 0; newtp->retrans_out = 0; newtp->sacked_out = 0; newtp->tlp_high_seq = 0;