Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3537987pxb; Mon, 24 Jan 2022 11:42:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwoIrlqbEODXybKZZ8ILUv7ZCgklfs4+FUvrn97HoDUuXxl563PI98wqmnc+A3Gmb5VwO1x X-Received: by 2002:a05:6a00:14ca:b0:4c1:e9da:4b15 with SMTP id w10-20020a056a0014ca00b004c1e9da4b15mr15297139pfu.33.1643053357419; Mon, 24 Jan 2022 11:42:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643053357; cv=none; d=google.com; s=arc-20160816; b=IlWg+U2rQdvp6RYN/Dq4FmHxol/guMCCEcgJRVVBe5hAFuBkjMJHUSa9Ib7UepDvA/ Gz0GtbogfL5d842QG6Dc7cUVLZ4bZYo8pPklw8JmcUzwNL+Lwo7oMjBFSUC/lKY7v2M7 ab9n97PiQCSFDmWfvR8MlnKtb6LPRmRX/u12XltpXxg+Ub9csq6FZHB+hASdxSHP2/ys 3YYp5Mw7iSBugzbHE1T+BMv59xFQw7kN+qfmQ7/o1lNpgJRCXmizL+N4xiBCDIzVeM21 jcP+ZEPkWSmXWnW0adWWf7D/c1I+66u4aB4BcwK1+FcR4mQ6dLTM0JA15iPti1TSWtc8 ozOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=tl956gc/9cT1vnzc8Ef+ZZ8SiBXrv7Y+gKly7nlpuZo=; b=h0v/91qktDQyyy54eE1mPv5AURYLoazAe8aZTHzmGGSHgaXkuVAegkOahIZeon4jMN zrOMdfKc8LUP2RKQfS3dneyPHbsN10AA9GX+PMo8L2zrYs2F3udd8p24wwF2YEpZkHlN 7M/KOI6Ky0NZl1p6tyCsaHsNLuIBpl5l8VV4o0g3T0v1wTWMNfWB2f/aZ5GsiSW91Sdn mt/tFi/9EXc/e9KyogfDvuTezS8/E7DAA7uzcHdst/hKZqT3bzecCfWZtpNFNm0Dwid7 MgqZeohiL987Ab4z0QOXIlBwvJ4Zj+K/+kgXAsghxEZIobVkWmoO8uUDoWTaF+KyI7lk /lrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RnvoP58W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si14247213plw.84.2022.01.24.11.42.19; Mon, 24 Jan 2022 11:42:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RnvoP58W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244396AbiAXR31 (ORCPT + 99 others); Mon, 24 Jan 2022 12:29:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232302AbiAXR31 (ORCPT ); Mon, 24 Jan 2022 12:29:27 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 379A3C06173B; Mon, 24 Jan 2022 09:29:27 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CAEF961261; Mon, 24 Jan 2022 17:29:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1CDBC340E5; Mon, 24 Jan 2022 17:29:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643045366; bh=ogGBVzyyN+YYSzH3BaF6lXVfYkJA5EmUbebAVPzmLh4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RnvoP58W/N/jVa8aIiNBe2tryjrtotDSkPY9Kf5gzcH+tRZHbU80XgsYhlEruI2Wc bKl4484JNr5Vdd4IjNo1f17xypA/0QUCWOthb0TXZjouZ+zfb0d8UispZ1R5sZpu6L ENaFXO/3Z2K0/HX9pMpFtkZukM40VewumKWL+c3v4ATziGJ0ED77f9qyqmQ4CxLFoi 6YhK1ZjnMcUb551jmNi2z7tMrneLwsuh7RpGjS9T0+jk+ApmmaUc0cAeSlWjw/EK3r Tu2NtQrmZMwX0pxC5R4yxaeBd4KEQKyjXeUr0IMnh34vzMffD8rd5Ux6MGf1mJ43hQ 9WAmLVKN/WKdA== Date: Mon, 24 Jan 2022 09:29:24 -0800 From: Jakub Kicinski To: Brian Vazquez Cc: Jeffrey Ji , Eric Dumazet , "David S . Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, jeffreyji Subject: Re: [PATCH net-next] net-core: add InMacErrors counter Message-ID: <20220124092924.0eb17027@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> In-Reply-To: References: <20220122000301.1872828-1-jeffreyji@google.com> <20220121194057.17079951@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 24 Jan 2022 09:13:12 -0800 Brian Vazquez wrote: > On Fri, Jan 21, 2022 at 7:41 PM Jakub Kicinski wrote: > > On Sat, 22 Jan 2022 00:03:01 +0000 Jeffrey Ji wrote: > > > From: jeffreyji > > > > > > Increment InMacErrors counter when packet dropped due to incorrect dest > > > MAC addr. > > > > > > example output from nstat: > > > \~# nstat -z "*InMac*" > > > \#kernel > > > Ip6InMacErrors 0 0.0 > > > IpExtInMacErrors 1 0.0 > > > > > > Tested: Created 2 netns, sent 1 packet using trafgen from 1 to the other > > > with "{eth(daddr=$INCORRECT_MAC...}", verified that nstat showed the > > > counter was incremented. > > > > > > Signed-off-by: jeffreyji > > > > How about we use the new kfree_skb_reason() instead to avoid allocating > > per-netns memory the stats? > > I'm not too familiar with the new kfree_skb_reason , but my > understanding is that it needs either the drop_monitor or ebpf to get > the reason from the tracepoint, right? This is not too different from > using perf tool to find where the pkt is being dropped. > > The idea here was to have a high level metric that is easier to find > for users that have less expertise on using more advance tools. That much it's understood, but it's a trade off. This drop point existed for 20 years, why do we need to consume extra memory now?