Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp988449imu; Sat, 15 Dec 2018 11:28:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/XKqMmamUoeDG76Wh5Oi8XhlK+kozQa2dPITwqiAvDKLDT7YjyaRTOgh7QTB24mxFGTNCGw X-Received: by 2002:a62:f5da:: with SMTP id b87mr7508183pfm.253.1544902136932; Sat, 15 Dec 2018 11:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544902136; cv=none; d=google.com; s=arc-20160816; b=djfrArh1zUTEDnV/Smsic7ra3LRdzLt6iM938Gk7d8giJwLvr3+Ii/a0E0hFq2PUFM yzRATQ/iwW4z9jyA3FCYccQxx1V4IeGxluWmTMO5nx9P3JDdWCtAMZeSm3Mh/Cu5jDCI qQLX6/WazPUA5Wf0wIZlDKfrWJMLQ7kwfSiLM49609LMQH0nvkAkSFb+O6DGKOvhqt7l x/ItKPxE+6TZHp3jFrK1QWoWbcbDI7eRHUQSAT94M1xnDynfgFXMEcnWCH8DTjDtersI WIDggSH1eLilZBO7Bb4T+5kF8b37pgtQ5Rl1DSDGvNjgR+iWnaV4rIFza6n57ED3m93M vIYQ== 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:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=A6BaGmGMsrwn2h6FS0KUb6o8YTIUT9d5gN8CQiwo1HY=; b=Of2ErTE6lXxaxTWUYB/BGE/3yhi10a6EjGG6d/vMU4KzD2emzUvX/zsKyQajjjtzzr mrUElbJvkroDTBDB4OS5CQAclMmK5cES7rVcahFbt4VaXL1mLDsi+2LXQNVZShwsHJ6F 1C+mhwNhe35VoSuUrjt33O1NDYmjEju1IrnIxuZExQ+2trE1qOWuO1opdaunSYT66eFX /s8nZJ7KMiL+rhnT6TZL9sAcj/zntFrENfaHgT49yJPc0px3pkiGlxDm+iIrluZmwDJ+ AQociHbw8t5OSb0JDCSUpNoxA3FLzLOK2nAN1O4xk4sd2H4Kd9C7v6bmdaDpbDZuYGHw nBPQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k72si5952224pge.310.2018.12.15.11.28.40; Sat, 15 Dec 2018 11:28:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728612AbeLOT1w (ORCPT + 99 others); Sat, 15 Dec 2018 14:27:52 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:53876 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbeLOT1w (ORCPT ); Sat, 15 Dec 2018 14:27:52 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id D2CFB14E89C57; Sat, 15 Dec 2018 11:27:51 -0800 (PST) Date: Sat, 15 Dec 2018 11:27:51 -0800 (PST) Message-Id: <20181215.112751.741520579999284155.davem@davemloft.net> To: eric.dumazet@gmail.com Cc: laoar.shao@gmail.com, edumazet@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] tcp: minor optimization for calculating packets_out in tcp connect From: David Miller In-Reply-To: <48971720-96e1-a48f-a1f5-3a96aa3fae7a@gmail.com> References: <1544866389-11168-1-git-send-email-laoar.shao@gmail.com> <48971720-96e1-a48f-a1f5-3a96aa3fae7a@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 15 Dec 2018 11:27:52 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Dumazet Date: Sat, 15 Dec 2018 04:59:00 -0800 > > > On 12/15/2018 01:33 AM, Yafang Shao wrote: >> When we building a syn packet, the tcp_skb_pcount(skb) is always 1, >> which is set in tcp_init_nondata_skb(). >> Regarding the syn_data, it is set through >> memcpy(syn_data->cb, syn->cb, sizeof(syn->cb)), >> which is always 1 as well. >> >> So we don't need to use tcp_skb_pcount(skb), that could give us a >> little improvement. >> > > I dunno, I find current code more self-documented. > > This is not fast path, so I would suggest we keep it. I agree, I won't be applying this.