Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp848778imm; Thu, 31 May 2018 10:24:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIrzS/YNUNh37AZT0BGMlzjz1G34T8rI2dEdICghQWDiGxzh2dVOXUzXCp925SMqMv/VZpP X-Received: by 2002:a62:b2c4:: with SMTP id z65-v6mr4151387pfl.21.1527787497687; Thu, 31 May 2018 10:24:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527787497; cv=none; d=google.com; s=arc-20160816; b=kgoICEND+Y4eXXpd7PM59H9Ms74biyWNudR84V/zPBnoY2YNsdxEbQg9Htw0TE8oOM LcKxiZfTnZYijkbbODgY94EbT2535MqZ3GmtiMUtY7Z6hWdFpbArp19i9Nt5ZaiPM9Dd XfiWdkEndDLskOmRVClZCEkyxgCX5tGnQf0L9+Bt4h3x54Fm9b8J8rCC2d/0KVO0nB17 e/Ibl7QYe45TB9HwOUS8z+u6/Q3/WOnxMHYFuzqPhJiIDrfHDEvyTEOLRIcwfG1gH4am lgTaeB6ixTSoEogDtOemgy5vDdIMEzcXmvspY+LFXzpI9UztomCdo/SjgC0sMYhnfmUw D5qw== 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 :arc-authentication-results; bh=ztOugGKDXmZ1qcVHoM6YNOFgTYdYooO1oHN7/Uud5zY=; b=utZON60GczuLY20fVpmNzRokVNV6mcSBwKAntXyQiJVR+mAQAD4yGxCLhSjrnfj2c8 Tv+ax98AmS7CcU+rXP2jotKQap+EMFJapDbJY/QdjfNj5g387aCSyIVGxhy2wVmaSYfL nKBC1g9cgnW27KaqgXMuyXtdm3d06POOL5TItgzV1I9sgswdyh82USgnEBjRzgw/vkj9 XgQY0Et2ynq1vvNx2up5S2nPI1E4qBgii2TOdwXDkrEfeJN9guxrjwvCMxeBaY+5RLlq rj2tB4RzXi8aSZmXgF2RvPJ9OILaNQ27PYnUmREtI/bJfgaV3YXBKpzwRpLLvGrpiL1p rZkA== 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 30-v6si9410431plf.596.2018.05.31.10.24.43; Thu, 31 May 2018 10:24:57 -0700 (PDT) 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 S1755900AbeEaRXu (ORCPT + 99 others); Thu, 31 May 2018 13:23:50 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:60094 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755827AbeEaRXs (ORCPT ); Thu, 31 May 2018 13:23:48 -0400 Received: from localhost (unknown [144.121.20.163]) (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 527F51016A1EC; Thu, 31 May 2018 10:23:47 -0700 (PDT) Date: Thu, 31 May 2018 13:23:44 -0400 (EDT) Message-Id: <20180531.132344.339904863786377155.davem@davemloft.net> To: laoar.shao@gmail.com Cc: edumazet@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] tcp: minor optimization around tcp_hdr() usage in receive path From: David Miller In-Reply-To: <1527607651-28262-1-git-send-email-laoar.shao@gmail.com> References: <1527607651-28262-1-git-send-email-laoar.shao@gmail.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) 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]); Thu, 31 May 2018 10:23:47 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yafang Shao Date: Tue, 29 May 2018 23:27:31 +0800 > This is additional to the > commit ea1627c20c34 ("tcp: minor optimizations around tcp_hdr() usage"). > At this point, skb->data is same with tcp_hdr() as tcp header has not > been pulled yet. So use the less expensive one to get the tcp header. > > Remove the third parameter of tcp_rcv_established() and put it into > the function body. > > Furthermore, the local variables are listed as a reverse christmas tree :) > > Cc: Eric Dumazet > Signed-off-by: Yafang Shao Applied, thanks.