Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2343813rdb; Tue, 10 Oct 2023 00:32:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJbLE6jVOSMWSfTlIgdESamHAMK7FPq3mVQBE073j5iYXrKCZEM9x2mAxrDQNBgrNyHc3B X-Received: by 2002:a05:6a00:3981:b0:68f:c078:b0c9 with SMTP id fi1-20020a056a00398100b0068fc078b0c9mr22224952pfb.11.1696923120522; Tue, 10 Oct 2023 00:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696923120; cv=none; d=google.com; s=arc-20160816; b=bamT/dcibDPEAN569XZRrXyYanpmFu3og8yyKOfLPUSZIRlapS7LGHz2vr8j7Yt+6F 98NXotiJXrsqJyI0zyJMQsCx/kBIDOQODk4DrpOlIFEGQKClfTsCw22Yy1pTszfMifzw +4oxpPVb8bMHkHLWNvfsz5sg97diKvWuafcBpPfALWH1AINF6KBfrSDUtdDVYy9WNFdM QwOO8ZwcLemZiso8ENG3gKjVhvuC1Ydlck1qL2uY1aG5SiiPJB9FRWE3tSxbsCIzZTdv 8mONbofMtW8EN2NvohGaM1/wx6AGoRIvw5prGwvwzSFlzzJ2ESbuP4L2BGF6tOSXKaux /K4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=F4OjawN4EWFXnf+1aT4Y6ZvvcqO40Vz4jUYoVUP23pY=; fh=tX1pVPzUB4VqSEEJuD493A3oLLMsXX2GAylXkqZLhQo=; b=JG+kzXJ5XOQU0dfyKIASSIekzTQ5iXEjdO28roHO5Gx42sGGKaqXw/RS98bP+AHkpj +vho+KKdj3JbiPhw8CwbPhbOMtfl6xW95dzc3uS+fl5GjG1NQMxPgk634p60OLGSnS+W guygMZ9uXp0QsE5yWC8GNYKQdAWxxcmA/9qp8AzL8dcxVOmsAtvd31F+smRJ7i9Y+yy2 bncnNVji/Behf0KEPI/jhNNpfW7GW1CdIWS1C7OfkGVsVCIFnvo6e3Fwg5LlQK9zi9Uc R+qrZb1fUZC21uYUf2hxG5d6oqBCEFUuyCUC+iBeLeAxq9PCY/35o3hO09l7DrmVqBW1 Wa1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=r5eglyf4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id j13-20020a63cf0d000000b005704979833csi5076231pgg.855.2023.10.10.00.31.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 00:32:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=r5eglyf4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 99D818027F7F; Tue, 10 Oct 2023 00:31:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442446AbjJJHb3 (ORCPT + 99 others); Tue, 10 Oct 2023 03:31:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442324AbjJJHb1 (ORCPT ); Tue, 10 Oct 2023 03:31:27 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3E139E for ; Tue, 10 Oct 2023 00:31:25 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4053f24c900so155025e9.1 for ; Tue, 10 Oct 2023 00:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696923084; x=1697527884; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=F4OjawN4EWFXnf+1aT4Y6ZvvcqO40Vz4jUYoVUP23pY=; b=r5eglyf4sewHpDCwRlmOVSoLhJDZ60kwjEBWEDYSWNoKVHZhU43xrnwc2pwbVqKo03 Bg3FQm6v686c2qjnRfJoCzU5PdsrTS2zgbNNRoLVzVhsXPScVbtu2R3HV53g+8/SZwIk lgjjtH8A0jGbYSq6Ufjh9Gd1j5ygVaDizW+CAkPldVtSVXea09wGk5s/dkIdU4QP4RUw 0NhfG/+88brNFla9LGaOeGbZKINEAZQnIuRLyYzWhelNf76snsBOkBlQFqpK0XUK9lz/ ai6TmmxCxgODulXQ4Z0pedwQ2xRCBxNu5Qox20gIizVr28I2kXSJ3y3Bw5qePH4ed6dN JgzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696923084; x=1697527884; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F4OjawN4EWFXnf+1aT4Y6ZvvcqO40Vz4jUYoVUP23pY=; b=acnbs/Wa30TBUaBlJWqT2IE4fRfMMsurnN8hQQzEUPXK7t9noFSnyBPOScDOTcd+wG 3Ix4MVIU+eKmNJbF03r6RiGLYZRpXX3DFBN1Oe7gExqlQklimuOZ5rGRS2bnRCNZ23Hm 0UnVujqEscqJx2bvLvVzsXzVBkuaTTVWDDMyraY/LM5lyipVH+QG8svoHqgm6nnqrcRa B9MwCV5ksb1yhBStOFSqP/5VgKYF5GdRAruaogQag6JndTGgKBwb3QnKGSTThI8luzwc yMDWd39ZLEkDzBiTQw42hLGRo7NRIIZgCvz8a14rupn2Pcy/ZuoMb7Xv3rWSvowaTBsg gOqg== X-Gm-Message-State: AOJu0YwQXaqqjQdSO19CfOPq0FQB4pDse+fCEVPXkzltivuW83LlcKMK W7NabrF1ZAz3x1GO3BCJyHSFjgTsnhZpz01wSJYvgg== X-Received: by 2002:a05:600c:b93:b0:3fe:eb42:7ec with SMTP id fl19-20020a05600c0b9300b003feeb4207ecmr429407wmb.1.1696923083984; Tue, 10 Oct 2023 00:31:23 -0700 (PDT) MIME-Version: 1.0 References: <20231009111633.2319304-1-yajun.deng@linux.dev> In-Reply-To: <20231009111633.2319304-1-yajun.deng@linux.dev> From: Eric Dumazet Date: Tue, 10 Oct 2023 09:31:10 +0200 Message-ID: Subject: Re: [PATCH net-next v8] net/core: Introduce netdev_core_stats_inc() To: Yajun Deng Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Lobakin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 00:31:34 -0700 (PDT) On Mon, Oct 9, 2023 at 1:16=E2=80=AFPM Yajun Deng wr= ote: > > Although there is a kfree_skb_reason() helper function that can be used t= o > find the reason why this skb is dropped, but most callers didn't increase > one of rx_dropped, tx_dropped, rx_nohandler and rx_otherhost_dropped. > > For the users, people are more concerned about why the dropped in ip > is increasing. > > Introduce netdev_core_stats_inc() for trace the caller of > dev_core_stats_*_inc(). > > Also, add __code to netdev_core_stats_alloc(), as it's called with small > probability. And add noinline make sure netdev_core_stats_inc was never > inlined. > > Signed-off-by: Yajun Deng > Suggested-by: Alexander Lobakin Reviewed-by: Eric Dumazet Thanks.