Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4359562pxb; Sat, 5 Feb 2022 10:59:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwjePmAAj+hGTPO11ryiEYwUSQpw/TYPEcCvk4X9IpQelVJx7KT3qmaIVN/wpcmdNveAab X-Received: by 2002:aa7:84d5:: with SMTP id x21mr8853061pfn.72.1644087586484; Sat, 05 Feb 2022 10:59:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644087586; cv=none; d=google.com; s=arc-20160816; b=bYrvtHHXQqgeToIBvCXwZNuOfp5MrgMX+fbgSkXPi07jJT7cbnS2Fi6W+grZYYkypt HEL7DkXBtgwU0dzMuqHwyPyjpFH7oRIF3ATC8tonGVBkomx2N6UJUyPAa8e08rZ7dMbE gE0db80YO4AVlrRBJSzSJu9B/6KaDT+bH/C3IsUc74qSTKC30uKws82slVTvnMS2Iahj h6hb4dNwDqDVrl29Dqv5/kt/vnE9cC4kBUGfo1zaFbO5Vy4StMpZF9A+/x8XwE7XGLJC K8eMuWRXOQCLXSDNUaMtQMO3z+4j+snwb8btoj9xWE0lQLy3aUX8O0zQUxLux3OU4UBZ uOcQ== 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=YAhvi0zESkTUUCracgLglowy2oLV6Uw7LdTBQAarFQs=; b=Eys038lkGuCJFkOj77nKJ1iDdGZaP1hzQqzH7H2PMTnwa1M7TX2sv5fV//I+9ay+gL yc6ypTzAzuILXTbXAOCO4l+2DOl/NGasW+6NNbdzPwpX0NXBru1ieztHEDQcrE9Bmrdu +pGkztERS/1ItemWKuL5/xbURv0p31SWgt+nDvvtketLt+7C/RyHXp5TizSmWXhMimsC ctASDFAGZCLdnq5t2/UGOICCg3/qHuMvas0fMWubH4Zcqnl27lVe97AkraMix4+L+a5P RFtA7ot1eCOe70BF1LNjGIwpsWnIW7dGQOhp4tTJ/2h7r0Ax22Oi+fY9gtZ3dDnYWa4B qJ/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qjIGYBj9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k2si1864695plg.306.2022.02.05.10.59.33; Sat, 05 Feb 2022 10:59:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qjIGYBj9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1349315AbiBCE7W (ORCPT + 99 others); Wed, 2 Feb 2022 23:59:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbiBCE7V (ORCPT ); Wed, 2 Feb 2022 23:59:21 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A35BBC061714; Wed, 2 Feb 2022 20:59:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id 57D12B810E5; Thu, 3 Feb 2022 04:59:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E63CC340E8; Thu, 3 Feb 2022 04:59:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643864357; bh=X/IN/ufaQVVqsfNzGe5ik9OdqOkQduoWax2aLSQm6kY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qjIGYBj9mlOBAE96jS1sfVxgqO6RrhhMrfyusX1gBxXElem4To8eTuiQ78uuLJbZf 3o5e6bJFEr9pWSdQ36f4nSSMavy/qXzyQTz5iDNWFaJFdUtrNjnXppI0DnpIkf6a8W /d/HSL2h8inQKXpvxVOmsRv1JF8kDjBRczfM7IhTMFBZ0GH1gfVcovBk7IdRVyjIRg jCM2E0XlshrZd55yhVqYtmSnt78DlaTRkeWEspr6o0BVvzsjtQZbqkIVehLbOK+VkL QZVyU9hHwDG4wn/6cEEpWfc7gLuR984XQJd2i3/feN2KXleYELtHGG7vj6ZfOc2PO5 VrJ2bJLmF/YXA== Date: Wed, 2 Feb 2022 20:59:16 -0800 From: Jakub Kicinski To: Jeffrey Ji Cc: Eric Dumazet , "David S . Miller" , Brian Vazquez , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, jeffreyji Subject: Re: [PATCH v6 net-next] net-core: add InMacErrors counter Message-ID: <20220202205916.58f4a592@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20220201222845.3640041-1-jeffreyji@google.com> References: <20220201222845.3640041-1-jeffreyji@google.com> 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 Tue, 1 Feb 2022 22:28:45 +0000 Jeffrey Ji wrote: > From: jeffreyji > > Increment InMacErrors counter when packet dropped due to incorrect dest > MAC addr. > > An example when this drop can occur is when manually crafting raw > packets that will be consumed by a user space application via a tap > device. For testing purposes local traffic was generated using trafgen > for the client and netcat to start a server > > example output from nstat: > \~# nstat -a | grep InMac > Ip6InMacErrors 0 0.0 > IpExtInMacErrors 1 0.0 I had another thing and this still doesn't sit completely well with me :( Shouldn't we count those drops as skb->dev->rx_dropped? Commonly NICs will do such filtering and if I got it right in struct rtnl_link_stats64 kdoc - report them as rx_dropped. It'd be inconsistent if on a physical interface we count these as rx_dropped and on SW interface (or with promisc enabled etc.) in the SNMP counters. Or we can add a new link stat that NICs can use as well. In fact I'm not sure this is really a IP AKA L3 statistic, it's the L2 address that doesn't match. If everyone disagrees - should we at least rename the MIB counter similarly to the drop reason? Experience shows that users call for help when they see counters with Error in their name, I'd vote for IpExtInDropOtherhost or some such. The statistic should also be documented in Documentation/networking/snmp_counter.rst