Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp204881pxb; Thu, 7 Apr 2022 03:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM87mqcJO5x++neFDekZNKqrKFMNyi0BdF1xuc7eRvhJJkj60kdcXbiefN3gD6zZNVcxZq X-Received: by 2002:aa7:9afc:0:b0:4fa:8750:152e with SMTP id y28-20020aa79afc000000b004fa8750152emr13595290pfp.52.1649327484755; Thu, 07 Apr 2022 03:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649327484; cv=none; d=google.com; s=arc-20160816; b=AEq9rmGMqpRrO1dPOehxMUJysHLSw7BITnla841LWMi1Wtl967gc4sCK98SXHMNJya VIMKO/gxRd4SOt7wzLAA/GoCtCu0N+JkCeI6aThN617HlOP/SBb+Ldnl6jF8k1wb+hdJ 9L/EpQW6TdlrTo9w3+5yCh2yt09EYQuum3tXxES7TCOdywOjNhKOUbn830TbSGDSauNd acUZfUBSHH7rFIyAeJgoH2O1fJFmvJkCpa3PN09IbAtmdz6Z8Ygi98qyj4Ak9fZW4VSi xuz6zenYRXFlfrG4btJ8gPd+Lvtkj0+xAvSDo1hNqiMrD5wj4gROjCHpZ5ZSFUxlSrSe 42qw== 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=39FtD+Ga9Cl3Uw/hLAVDyZhz2FYG7T0LLUjwJ39kZEo=; b=rBPc4aDPe6OVYCo2UkiSS79f74Fdi2JqMJ7ypp/tf6qT0kVnPf+7ir8Ef4kqfSSKvF 6KLSUlUzNg8YXS2ipzhJfzYgaUIiHHy2XmD3p1//p9yr9Dt7XhocJ3WWC+fxeWHibrrf eN2j0CWwGMbJcJ2i2dsAkj90pSMD1+oPCyO+uu1SM5pGg8T8FP5cANB6UGPcFTHY0LXD trSzIQfuVxWpcY2PN1xqi0VEl5Is7xx0gtdaCOuajqXgNdMcz69E/RX2Nz2dDXse7Jol 9updNHffh59r+PMHSl7dVUYNHT3/hioguhgrVN+//9NY/gGdNeZNK/XMfNGLF3sQUNWE YA0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PC83kK1o; 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 bb2-20020a17090b008200b001bd14e01fc9si1262046pjb.183.2022.04.07.03.31.07; Thu, 07 Apr 2022 03:31:24 -0700 (PDT) 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=PC83kK1o; 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 S240923AbiDGFds (ORCPT + 99 others); Thu, 7 Apr 2022 01:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240920AbiDGFdp (ORCPT ); Thu, 7 Apr 2022 01:33:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B606BD894; Wed, 6 Apr 2022 22:31:47 -0700 (PDT) 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 DD19FB826B8; Thu, 7 Apr 2022 05:31:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B75EBC385A4; Thu, 7 Apr 2022 05:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649309504; bh=kZ4xvxYTVp/AgVCG+LNaH831+XO3cxHf1AnkJUAtjzE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PC83kK1orbeSftoJA0VJHG+OwCc0N+NIOQof9rLBNhvUGCrR7tvWROjNDAfFnVBFa W1xhU+r+LcFOZsZQSzS0hWqqaF0v+7ALJaLk7iy0AzJd89d4J80XIYJhHN8GR82EyY uVwl/ePw+osNn7nEgrPtb7LuEeBZdBiQFyPS8/xJdpCAjJBKXZZFuPZtqniqdvWaAK tDWcmn312LH7p/gCHUsOJEY1jgvzw1mSSpl1+SOCsJ9m5tVxF5z6o8T9H04XwrB1/1 00sSIYN0YfnITvgOcQ2Fgm1xDQwN0BYeTdX6tMpC7gWUnA3v+Hb5Njp9XieKdYzEhR aAhqXohnz9uTA== Date: Wed, 6 Apr 2022 22:31:41 -0700 From: Jakub Kicinski To: Jeffrey Ji Cc: Brian Vazquez , "David S . Miller" , Paolo Abeni , Hideaki YOSHIFUJI , David Ahern , Eric Dumazet , Sebastian Andrzej Siewior , Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , Menglong Dong , Petr Machata , Kumar Kartikeya Dwivedi , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jeffrey Ji Subject: Re: [PATCH net-next] net-core: rx_otherhost_dropped to core_stats Message-ID: <20220406223141.51881854@kernel.org> In-Reply-To: <20220406172600.1141083-1-jeffreyjilinux@gmail.com> References: <20220406172600.1141083-1-jeffreyjilinux@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 6 Apr 2022 17:26:00 +0000 Jeffrey Ji wrote: > From: Jeffrey Ji > > Increment rx_otherhost_dropped counter when packet dropped due to > mismatched 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 > > Tested: Created 2 netns, sent 1 packet using trafgen from 1 to the other > with "{eth(daddr=$INCORRECT_MAC...}", verified that iproute2 showed the > counter was incremented. (Also had to modify iproute2 to show the stat, > additional patch for that coming next.) > > Signed-off-by: Jeffrey Ji Acked-by: Jakub Kicinski