Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1914673imm; Sun, 9 Sep 2018 11:33:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYTO1WdwLsTav2dEOsFKIzGWT5T86RPzLNEnpqsNQdJ8rdx8SQQIGKcEaj8vNfrdHsWWPqv X-Received: by 2002:a62:6948:: with SMTP id e69-v6mr19654734pfc.166.1536518023481; Sun, 09 Sep 2018 11:33:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536518023; cv=none; d=google.com; s=arc-20160816; b=eGUu6A4DHTJoYHVty6BqQCV5hmYC/XpoqeHJGu0zEz6D5Vs/eVRzAQ2AZ71EG+NC/O 83lCkfZSfhteKCR/R11dYd3Cifm4AjnGiJBnKl5rsa4+mQ2u6/f/sCUJ4gmmVWmWn/hU XbOl9LZlGeyAdJ9Zm0i++lGpeUyhPXOGCjoo9vmjUnRnbdujPSQ0HSVPM+6YaKxe9c4+ aOAP2DCt0MGvR9Emv9K+rGco3Foo6uNQsLaGapy26/no36E9cSR4qkOWtkYxiXjghMa3 rETPHTnVqZ3Yxx7LmG1ahX8qxUgIwSoA2bXQAClTIQySmRlTJ3uinM2V7xQ2OQKtTVk3 Xnkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Yqq5h6PEbHBqcX3OMbxyqNyRECeqrPDt9D9M8MhzC/Q=; b=J7UD615viymfO4tyax96JkBglcSmNRavSHYaW9EKTghVcWfaI7xeZAgcp8w/MRv0Ts iSQziBwnCGZylJ1LrBNVogNNvdCdMArU6NgPfUL7zAKStpHkxXReaVSEEPZUHUfig4jS vkVxWBl8Sa4ykYGNts4vsh/lzrcoCM4GFweCtObKwXB4VemCu+ToGiRpkCy4nZXP7wYb VW/G8SBGdpYDxj9u3oHvAjVkNitfNmmAZv88UMGHWvGl6KjlmRxtTiCOweoCz0DirYGb qe2kTG+t7fCm/4UumYlDK3PIBP9HcwI6qD2lKFEGy9hixw1RHt1SlZV5dCnAu/pW0IxO FEyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=S+Oo9sGX; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p65-v6si15325482pga.401.2018.09.09.11.33.27; Sun, 09 Sep 2018 11:33:43 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=S+Oo9sGX; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727579AbeIIXWr (ORCPT + 99 others); Sun, 9 Sep 2018 19:22:47 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:53767 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726665AbeIIXWr (ORCPT ); Sun, 9 Sep 2018 19:22:47 -0400 Received: by mail-it0-f65.google.com with SMTP id p79-v6so26798907itp.3 for ; Sun, 09 Sep 2018 11:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yqq5h6PEbHBqcX3OMbxyqNyRECeqrPDt9D9M8MhzC/Q=; b=S+Oo9sGXBFFhVUn/oVl+Ve8VZZnKdq3XYkz8WhmGA8Vz852ODlyVA6PDTfMkXBM4fN dOZzyCSPmmZBxCkDYo4e5tBsbQArmfLU9CrEIyCojbN3IWbyWs+swRkn+765EoJ4PZZq cdg+8ttVXXcUD7xodDRYRksdgzLqD+PusYLlnCIRmXI+3w1ov8lBzGJZwbVD854N53Al o8fLr6Fb0tDTqlMRIuycz9SsovTD9cJhKWJRDPi+vAtODIqHWrsCIKKpSLgWE2w6Mr7v fN82V1Wuepbk9TiUorhhNYyju3YOoMZB28ZyR4dHOoOps7utOCNU1xZqrjWm6GcmAq7Z YXUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yqq5h6PEbHBqcX3OMbxyqNyRECeqrPDt9D9M8MhzC/Q=; b=IFTIbbzSCvUyTGtx3SJQ1T1V3257G5Y5gfL9R8u4HMIFFu7bYmkJS4Z6fMmC6/QGeV pKdGUKGUFCG5GZa7TUqcDQmo4TYaMF3TRSRdYb3p1Y/OYpUD7LR1eSHZYwsuLbjDgCLy IxYudrjoGXPPEa+THbG5FrSnOf1OO789LsX0B4bUwdljR1YwpxSd0Xq/97A3a8CZNSQp jr2+p5ZlR3Im9xoEapWKC3cOnIllEa2Vt4IlvuHuyZdpXQaLnNgslZn6X951MvGXrkXD EEVlqr4inkRdmCsmHWdCho6BtYAAyNJOROZxvhB+yGLQNPBr1Mcw2PaZ9Z/I8qkNDpEn nQQQ== X-Gm-Message-State: APzg51DGFTpFnKgoC37bsAv+bPRF86adnn6+d8C0ocjzU1lwRD1Y84Tk g+KSDwlMcukgIVcSftlCCdDNGt6sjW2QJkMQ/yJN/w== X-Received: by 2002:a24:7f87:: with SMTP id r129-v6mr15007531itc.107.1536517935781; Sun, 09 Sep 2018 11:32:15 -0700 (PDT) MIME-Version: 1.0 References: <1536462862-11767-1-git-send-email-laoar.shao@gmail.com> <1536462862-11767-2-git-send-email-laoar.shao@gmail.com> In-Reply-To: <1536462862-11767-2-git-send-email-laoar.shao@gmail.com> From: Eric Dumazet Date: Sun, 9 Sep 2018 11:32:04 -0700 Message-ID: Subject: Re: [PATCH v2 net-next 2/2] tcp: fix the error count of tcpInSegs To: Yafang Shao Cc: David Miller , netdev , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 8, 2018 at 8:14 PM Yafang Shao wrote: > > In RFC1213, the tcpInSegs is the total number of segments received. > While currently it is the total number of SKBs received. > The number of SKBs may be not equal with the numer of segments because of > GRO. > So fix this error count. > We have discussed this in the past and the consensus was it was too late to change this. IP counters have the same issue, so after your patch, we would have quite a difference between transport and network layers. Adding all these max_t(u16, 1, skb_shinfo(skb)->gso_segs)) everywhere add a cost