Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1436147imm; Wed, 25 Jul 2018 18:46:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfkg2I2/adKNtGWRXowiCvn14cjDti4H5WnKmDRCqHUkzPgabcu2+vY7KG5ckuaD4JrVHIg X-Received: by 2002:a17:902:9a8a:: with SMTP id w10-v6mr22133584plp.14.1532569569509; Wed, 25 Jul 2018 18:46:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532569569; cv=none; d=google.com; s=arc-20160816; b=szf/0zUg6aXI5VWm0TT0gVdv/ov2fFicLTN2RQ1Z3R5rtOw3L41FCR2O69syf9xadC +G8W1J94gOWKsWlnCKS4ZBkvcuSrG6njp6j5zujYCdJ9M1wJk6vnUhvIsAXl3tFFvH21 XEwoCquaS1WAdA3xJfEnNEchWY0IqdMzFu6sGLhfq5odxHYokO1OzJYzVm0VRk8aDpmj HXjW6z0bXg2tXk05Uxq5vr0PZKPaCDAEL/Sw6tQySodDCNx7JkG22zixIZoeLbzBa/pS d3tv8NNvx1bb3xTkdujkhsFx7Vx72V8E+Nujb68pGJRHZKuLzf7Q64ECd4zTfpiKtnUO 4h0w== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=28igxy1/bTrjGplMxdc/TLk+L1N2lSFIChL3GAHhTrU=; b=mJAmon12u2dPUauAxTvdbIoSaekq5EGTYQH6cq5sp/P+csbPRp1qdWixpAmSpHx1oL 9m1FElCyNmtaKarPky/6PbaHvLOZ9xB+LG7QwkDejxEjPTFr1UQct7ugL5uhlZgvvHFq 9CG6GzSkaAXWFwSMwNiYpmGos0mNSuyqU32mxZL87T59vqhlgsD/ueKTGp/NcZiIWStt mgLO7m/zdk+XkVa1lnq3Rkb4pYCXehh0zDKYS+Dyh+/1klePwFBpjKZQKphBi2jURs3i PRZdK+kHOBKbKjCpbPXxTHATkvqAqFYbuT+5v+hY5rUqjHpDqUtY5f4aEuE2M1ShWEZW Xgug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="UMgl/HWc"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q4-v6si13292pgh.412.2018.07.25.18.45.54; Wed, 25 Jul 2018 18:46:09 -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=@gmail.com header.s=20161025 header.b="UMgl/HWc"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728657AbeGZC5z (ORCPT + 99 others); Wed, 25 Jul 2018 22:57:55 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:37232 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728378AbeGZC5y (ORCPT ); Wed, 25 Jul 2018 22:57:54 -0400 Received: by mail-it0-f66.google.com with SMTP id h20-v6so576774itf.2; Wed, 25 Jul 2018 18:43:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=28igxy1/bTrjGplMxdc/TLk+L1N2lSFIChL3GAHhTrU=; b=UMgl/HWcnQw+1W141j7+F2WD6vdAyuF9l8bxqTSFV4Wjysa4z0tJWBKHmPDbbKfOhg gJHtMq/4DmXccSFOuYmOEoL9HI4FQRrz0jyRY0SU8JSkMk1/wOwBLcTr7u4irGa3Ov5S CbtwyX8E3SyLuxA7sE6YmkZJt3ozx+UkBK33btrVWLkadFbxt1aztuRROuKd2zZJliYA xrnYyibPgC5Stm4oL3np5nQI1qfy+Btif9lLDqFJxRew9HuzIaJFbD5CxqPHXPNTB1Q8 uOF+K6qJc9S10lUEwp52+pFrdfbwHXrtlXd/G0b1yMbj6CiNscHHV9sPyc1XELrQttF/ L2Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=28igxy1/bTrjGplMxdc/TLk+L1N2lSFIChL3GAHhTrU=; b=Jq5C02ya85KW2w4JUrX7XTUjZ6sMWwfqFvntpuP+AqlYf4Sn1idz+RXg5wWog5YqxY /45NVlt80JymKdhfOZik6xfn5ltPeTwF9q4+DyAJDeEtSXOIgzzob+yTGKaoxUD8X0UG BEriRAGZkIassL/3Bs//87kbSMM/c2TSfe0V38vaCsG4q1xfKXSqN3HBOEvYMlowifkR e7me1f0eWnkN9Vgm8M2PTjfGHMQyfaQ8Nq7+FXF3uf4YvaraNV+grOcgYC0L0RvB3OOC /ZkAxUfSm3UDSQQAZIyzbF/CI9B9lKN2ZzYaTJZ2ENOQdJqgZH1sT9mV+EG+0ZcCx3a/ QJYw== X-Gm-Message-State: AOUpUlEetBH5I8jLLY3/Yj+eHJyhX4Pgnds3Jp2STz1ChkYW+W/1ZVIc pE4Smok41ZRGn76LSczZvFfrLzHcX2AkSEDp97s= X-Received: by 2002:a24:5004:: with SMTP id m4-v6mr334420itb.38.1532569411010; Wed, 25 Jul 2018 18:43:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:7a47:0:0:0:0:0 with HTTP; Wed, 25 Jul 2018 18:42:50 -0700 (PDT) In-Reply-To: References: <1532524010-11855-1-git-send-email-laoar.shao@gmail.com> <047bc12f-9eb5-e512-10c5-6334c494c77e@gmail.com> <096a8a2f-ea32-2107-b2af-c246450cc3b9@gmail.com> From: Yafang Shao Date: Thu, 26 Jul 2018 09:42:50 +0800 Message-ID: Subject: Re: [PATCH net-next] tcp: add SNMP counter for the number of packets pruned from ofo queue To: Eric Dumazet Cc: David Miller , Eric Dumazet , 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 Wed, Jul 25, 2018 at 9:59 PM, Yafang Shao wrote: > On Wed, Jul 25, 2018 at 9:55 PM, Eric Dumazet wrote: >> >> >> On 07/25/2018 06:40 AM, Yafang Shao wrote: >> >>> >>> Because we want to know why packets were dropped. >>> If that could be show in netstat, we could easily find that it is >>> dropped due to ofo prune. >> >> >> We have a counter already for these events : LINUX_MIB_OFOPRUNED >> >> You want to add another counter tracking number of _skbs_, >> which has no precise value for user, >> given each skb can contain a variable number of _packets_. >> > > Got it. > > But with LINUX_MIB_OFOPRUNED, we only know tcp_prune_ofo_queue is > called, but have no idea how many skbs are dropped. > Hi Eric, LINUX_MIB_TCPOFOQUEUE, LINUX_MIB_TCPOFODROP and LINUX_MIB_TCPOFOMERGE are all for the number of SKBs, but only LINUX_MIB_OFOPRUNED is for the event, that could lead misunderstading. So I think introducing a counter for the number of SKB pruned could be better, that could help us to track the whole behavior of ofo queue. That is why I submit this patch. Thanks Yafang